File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
ports/espressif/common-hal/pulseio Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,9 @@ bool common_hal_pulseio_pulsein_deinited(pulseio_pulsein_obj_t *self) {
127127}
128128
129129void common_hal_pulseio_pulsein_deinit (pulseio_pulsein_obj_t * self ) {
130+ if (common_hal_pulseio_pulsein_deinited (self )) {
131+ return ;
132+ }
130133 rmt_disable (self -> channel );
131134 reset_pin_number (self -> pin -> number );
132135 rmt_del_channel (self -> channel );
Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ bool common_hal_pulseio_pulseout_deinited(pulseio_pulseout_obj_t *self) {
5454}
5555
5656void common_hal_pulseio_pulseout_deinit (pulseio_pulseout_obj_t * self ) {
57+ if (common_hal_pulseio_pulseout_deinited (self )) {
58+ return ;
59+ }
5760 rmt_disable (self -> channel );
5861 rmt_del_encoder (self -> encoder );
5962 rmt_del_channel (self -> channel );
You can’t perform that action at this time.
0 commit comments