@@ -67,13 +67,13 @@ class TONE_PWM_CONFIG {
67
67
boolean is_initialized; // < defaults to uninitialized
68
68
69
69
public:
70
- bool EnsurePwmPeripheralOwnership (void ) noexcept ;
71
- bool InitializeFromPulseCountAndTimePeriod (uint64_t pulse_count, uint16_t time_period) noexcept ;
72
- bool ApplyConfiguration (uint32_t pin) noexcept ;
73
- bool StartPlayback (void ) noexcept ;
74
- bool StopPlayback (bool releaseOwnership = false ) noexcept ;
75
- bool ApplyConfigurationAndStartPlayback (uint32_t pin) noexcept ;
76
- uint64_t CalculateExpectedPulseCount (void ) noexcept ;
70
+ bool EnsurePwmPeripheralOwnership (void );
71
+ bool InitializeFromPulseCountAndTimePeriod (uint64_t pulse_count, uint16_t time_period);
72
+ bool ApplyConfiguration (uint32_t pin);
73
+ bool StartPlayback (void );
74
+ bool StopPlayback (bool releaseOwnership = false );
75
+ bool ApplyConfigurationAndStartPlayback (uint32_t pin);
76
+ uint64_t CalculateExpectedPulseCount (void );
77
77
};
78
78
TONE_PWM_CONFIG _pwm_config;
79
79
@@ -116,15 +116,15 @@ constexpr inline static uint64_t _calculate_pulse_count(uint32_t frequency, uint
116
116
(duration / 1000ULL ) * frequency :
117
117
(((uint64_t )duration) * frequency / 1000ULL );
118
118
};
119
- inline static int _bits_used (unsigned long x) noexcept {
119
+ inline static int _bits_used (unsigned long x) {
120
120
if (0 == x) return 0 ;
121
121
unsigned int result = 0 ;
122
122
do {
123
123
result++;
124
124
} while (x >>= 1 );
125
125
return result;
126
126
}
127
- inline static int _bits_used (unsigned long long x) noexcept {
127
+ inline static int _bits_used (unsigned long long x) {
128
128
if (0 == x) return 0 ;
129
129
unsigned int result = 0 ;
130
130
do {
@@ -265,7 +265,7 @@ bool TONE_PWM_CONFIG::EnsurePwmPeripheralOwnership(void) {
265
265
// COUNT += (start at SEQ0) ? (SEQ0.CNT * (SEQ0.REFRESH+1) : 0;
266
266
// COUNT += 1; // final SEQ1 emits single pulse
267
267
//
268
- bool TONE_PWM_CONFIG::InitializeFromPulseCountAndTimePeriod (uint64_t pulse_count_x, uint16_t time_period) noexcept {
268
+ bool TONE_PWM_CONFIG::InitializeFromPulseCountAndTimePeriod (uint64_t pulse_count_x, uint16_t time_period) {
269
269
270
270
if (_bits_used (pulse_count_x) > 37 ) {
271
271
LOG_LV1 (" TON" , " pulse count is limited to 37 bit long value" );
@@ -339,7 +339,7 @@ bool TONE_PWM_CONFIG::InitializeFromPulseCountAndTimePeriod(uint64_t pulse_count
339
339
this ->is_initialized = true ;
340
340
return true ;
341
341
}
342
- bool TONE_PWM_CONFIG::ApplyConfiguration (uint32_t pin) noexcept {
342
+ bool TONE_PWM_CONFIG::ApplyConfiguration (uint32_t pin) {
343
343
if (!this ->is_initialized ) {
344
344
return false ;
345
345
}
@@ -394,7 +394,7 @@ bool TONE_PWM_CONFIG::ApplyConfiguration(uint32_t pin) noexcept {
394
394
nrf_pwm_event_clear (_PWMInstance, NRF_PWM_EVENT_LOOPSDONE);
395
395
return true ;
396
396
}
397
- bool TONE_PWM_CONFIG::StartPlayback (void ) noexcept {
397
+ bool TONE_PWM_CONFIG::StartPlayback (void ) {
398
398
if (!this ->is_initialized ) {
399
399
LOG_LV1 (" TON" , " Cannot start playback without first initializing" );
400
400
return false ;
0 commit comments