From a7ffaaadbd073a4d9f4cb9254fa448dccbc7cc1e Mon Sep 17 00:00:00 2001 From: Henry Gabryjelski Date: Tue, 11 Aug 2020 23:35:59 -0700 Subject: [PATCH] @hathach doesn't like static_assert --- cores/nRF5/Tone.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cores/nRF5/Tone.cpp b/cores/nRF5/Tone.cpp index b60748ac..5bd1c9dd 100644 --- a/cores/nRF5/Tone.cpp +++ b/cores/nRF5/Tone.cpp @@ -104,7 +104,6 @@ constexpr inline static uint64_t _calculate_pulse_count(uint32_t frequency, uint // range for frequency == [20..25000], // range for duration == [ 1..0xFFFF_FFFF] // so range of result == [ 1..0x18_FFFF_FFE7] (requires 37 bits) - static_assert(sizeof(unsigned long long) >= sizeof(uint64_t)); return (duration == 0) ? 0 : @@ -174,9 +173,6 @@ inline static int _bits_used(unsigned long long x) { */ void tone(uint8_t pin, unsigned int frequency, unsigned long duration) { - static_assert(sizeof(unsigned long int) <= sizeof(uint32_t)); - static_assert(sizeof(unsigned int) <= sizeof(uint32_t)); - // Used only to protect calls against simultaneous multiple calls to tone(). // Using a function-local static to avoid accidental reference from ISR or elsewhere, // and to simplify ensuring the semaphore gets initialized.