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 {
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- boolean is_initialized; // < defaults to uninitialized
6867
6968 public:
7069 bool ensurePwmPeripheralOwnership (void );
@@ -330,13 +329,9 @@ bool TonePwmConfig::initializeFromPulseCountAndTimePeriod(uint64_t pulse_count_x
330329 this ->seq1_refresh = (total_refresh_count - seq0_count) - 1 ;
331330 this ->shorts = NRF_PWM_SHORT_LOOPSDONE_STOP_MASK;
332331 }
333- this ->is_initialized = true ;
334332 return true ;
335333}
336334bool TonePwmConfig::applyConfiguration (uint32_t pin) {
337- if (!this ->is_initialized ) {
338- return false ;
339- }
340335 if (pin >= PINS_COUNT) {
341336 return false ;
342337 }
@@ -389,10 +384,6 @@ bool TonePwmConfig::applyConfiguration(uint32_t pin) {
389384 return true ;
390385}
391386bool TonePwmConfig::startPlayback (void ) {
392- if (!this ->is_initialized ) {
393- LOG_LV1 (" TON" , " Cannot start playback without first initializing" );
394- return false ;
395- }
396387 if (!this ->ensurePwmPeripheralOwnership ()) {
397388 LOG_LV1 (" TON" , " PWM peripheral not available for playback" );
398389 return false ;
You can’t perform that action at this time.
0 commit comments