File tree 2 files changed +6
-0
lines changed
ports/espressif/common-hal/pulseio
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) {
127
127
}
128
128
129
129
void common_hal_pulseio_pulsein_deinit (pulseio_pulsein_obj_t * self ) {
130
+ if (common_hal_pulseio_pulsein_deinited (self )) {
131
+ return ;
132
+ }
130
133
rmt_disable (self -> channel );
131
134
reset_pin_number (self -> pin -> number );
132
135
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) {
54
54
}
55
55
56
56
void common_hal_pulseio_pulseout_deinit (pulseio_pulseout_obj_t * self ) {
57
+ if (common_hal_pulseio_pulseout_deinited (self )) {
58
+ return ;
59
+ }
57
60
rmt_disable (self -> channel );
58
61
rmt_del_encoder (self -> encoder );
59
62
rmt_del_channel (self -> channel );
You can’t perform that action at this time.
0 commit comments