@@ -50,9 +50,9 @@ void pulse_finish(void) {
50
50
if (pulse_index >= pulse_length ) {
51
51
return ;
52
52
}
53
- add_alarm_in_us ( pulse_buffer [pulse_index ], pulseout_interrupt_handler , NULL , false);
53
+ add_alarm_in_us (pulse_buffer [pulse_index ], pulseout_interrupt_handler , NULL , false);
54
54
if (pulse_index % 2 == 0 ) {
55
- common_hal_pwmio_pwmout_set_duty_cycle (pwmout_obj ,current_duty_cycle );
55
+ common_hal_pwmio_pwmout_set_duty_cycle (pwmout_obj ,current_duty_cycle );
56
56
}
57
57
}
58
58
@@ -76,7 +76,7 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self,
76
76
current_duty_cycle = common_hal_pwmio_pwmout_get_duty_cycle (pwmout_obj );
77
77
self -> pin = carrier -> pin -> number ;
78
78
self -> slice = carrier -> slice ;
79
- pwm_set_enabled (pwmout_obj -> slice ,false);
79
+ pwm_set_enabled (pwmout_obj -> slice ,false);
80
80
}
81
81
82
82
bool common_hal_pulseio_pulseout_deinited (pulseio_pulseout_obj_t * self ) {
@@ -96,14 +96,14 @@ void common_hal_pulseio_pulseout_send(pulseio_pulseout_obj_t *self, uint16_t *pu
96
96
pulse_index = 0 ;
97
97
pulse_length = length ;
98
98
99
- add_alarm_in_us ( pulses [0 ], pulseout_interrupt_handler , NULL , false);
99
+ add_alarm_in_us (pulses [0 ], pulseout_interrupt_handler , NULL , false);
100
100
common_hal_pwmio_pwmout_set_duty_cycle (pwmout_obj ,current_duty_cycle );
101
- pwm_set_enabled (pwmout_obj -> slice ,true);
101
+ pwm_set_enabled (pwmout_obj -> slice ,true);
102
102
103
- while (pulse_index < length ) {
103
+ while (pulse_index < length ) {
104
104
// Do other things while we wait. The interrupts will handle sending the
105
105
// signal.
106
106
RUN_BACKGROUND_TASKS ;
107
107
}
108
- pwm_set_enabled (pwmout_obj -> slice ,false);
108
+ pwm_set_enabled (pwmout_obj -> slice ,false);
109
109
}
0 commit comments