Skip to content

Commit 8e4e84c

Browse files
committed
Match channel number, not timer number
1 parent 93ee54a commit 8e4e84c

File tree

1 file changed

+1
-1
lines changed
  • ports/espressif/common-hal/pwmio

1 file changed

+1
-1
lines changed

ports/espressif/common-hal/pwmio/PWMOut.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ void common_hal_pwmio_pwmout_reset_ok(pwmio_pwmout_obj_t *self) {
170170
// Otherwise, we clear never_reset for the timer as well.
171171
bool other_never_reset = false;
172172
for (size_t i = 0; i < LEDC_CHANNEL_MAX; i++) {
173-
if (i != self->tim_handle.timer_num &&
173+
if (i != self->chan_handle.channel &&
174174
reserved_channels[i] == self->tim_handle.timer_num &&
175175
never_reset_chan[i]) {
176176
other_never_reset = true;

0 commit comments

Comments
 (0)