File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ class TonePwmConfig {
64
64
uint8_t nrf_pin; // < the nrf pin for playback
65
65
nrf_pwm_task_t task_to_start; // < Whether to start playback at SEQ0 or SEQ1
66
66
nrf_pwm_short_mask_t shorts; // < shortcuts to enable
67
- boolean is_initialized; // < defaults to uninitialized
68
67
69
68
public:
70
69
bool ensurePwmPeripheralOwnership (void );
@@ -330,13 +329,9 @@ bool TonePwmConfig::initializeFromPulseCountAndTimePeriod(uint64_t pulse_count_x
330
329
this ->seq1_refresh = (total_refresh_count - seq0_count) - 1 ;
331
330
this ->shorts = NRF_PWM_SHORT_LOOPSDONE_STOP_MASK;
332
331
}
333
- this ->is_initialized = true ;
334
332
return true ;
335
333
}
336
334
bool TonePwmConfig::applyConfiguration (uint32_t pin) {
337
- if (!this ->is_initialized ) {
338
- return false ;
339
- }
340
335
if (pin >= PINS_COUNT) {
341
336
return false ;
342
337
}
@@ -389,10 +384,6 @@ bool TonePwmConfig::applyConfiguration(uint32_t pin) {
389
384
return true ;
390
385
}
391
386
bool TonePwmConfig::startPlayback (void ) {
392
- if (!this ->is_initialized ) {
393
- LOG_LV1 (" TON" , " Cannot start playback without first initializing" );
394
- return false ;
395
- }
396
387
if (!this ->ensurePwmPeripheralOwnership ()) {
397
388
LOG_LV1 (" TON" , " PWM peripheral not available for playback" );
398
389
return false ;
You can’t perform that action at this time.
0 commit comments