File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ class TonePwmConfig {
6464 uint8_t nrf_pin; // < the nrf pin for playback
6565 nrf_pwm_task_t task_to_start; // < Whether to start playback at SEQ0 or SEQ1
6666 nrf_pwm_short_mask_t shorts; // < shortcuts to enable
67-
6867 public:
6968 bool ensurePwmPeripheralOwnership (void );
7069 bool initializeFromPulseCountAndTimePeriod (uint64_t pulse_count, uint16_t time_period);
@@ -112,15 +111,15 @@ constexpr static uint64_t _calculate_pulse_count(uint32_t frequency, uint32_t du
112111 (duration / 1000ULL ) * frequency :
113112 (((uint64_t )duration) * frequency / 1000ULL );
114113};
115- static int _bits_used (unsigned long x) {
114+ constexpr static int _bits_used (unsigned long x) {
116115 if (0 == x) return 0 ;
117116 unsigned int result = 0 ;
118117 do {
119118 result++;
120119 } while (x >>= 1 );
121120 return result;
122121}
123- static int _bits_used (unsigned long long x) {
122+ constexpr static int _bits_used (unsigned long long x) {
124123 if (0 == x) return 0 ;
125124 unsigned int result = 0 ;
126125 do {
You can’t perform that action at this time.
0 commit comments