Skip to content

Commit a7ffaaa

Browse files
committed
@hathach doesn't like static_assert
1 parent 1ba1299 commit a7ffaaa

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

cores/nRF5/Tone.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ constexpr inline static uint64_t _calculate_pulse_count(uint32_t frequency, uint
104104
// range for frequency == [20..25000],
105105
// range for duration == [ 1..0xFFFF_FFFF]
106106
// so range of result == [ 1..0x18_FFFF_FFE7] (requires 37 bits)
107-
static_assert(sizeof(unsigned long long) >= sizeof(uint64_t));
108107
return
109108
(duration == 0) ?
110109
0 :
@@ -174,9 +173,6 @@ inline static int _bits_used(unsigned long long x) {
174173
*/
175174
void tone(uint8_t pin, unsigned int frequency, unsigned long duration)
176175
{
177-
static_assert(sizeof(unsigned long int) <= sizeof(uint32_t));
178-
static_assert(sizeof(unsigned int) <= sizeof(uint32_t));
179-
180176
// Used only to protect calls against simultaneous multiple calls to tone().
181177
// Using a function-local static to avoid accidental reference from ISR or elsewhere,
182178
// and to simplify ensuring the semaphore gets initialized.

0 commit comments

Comments
 (0)