Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit fc4f874

Browse files
committed
esp32/machine_pwm: Always set the channel in the PWM object.
1 parent 1e26345 commit fc4f874

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/esp32/machine_pwm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ STATIC void esp32_pwm_init_helper(esp32_pwm_obj_t *self,
131131
}
132132
channel = avail;
133133
}
134+
self->channel = channel;
134135

135136
// New PWM assignment
136137
self->active = 1;
@@ -148,7 +149,6 @@ STATIC void esp32_pwm_init_helper(esp32_pwm_obj_t *self,
148149
"PWM not supported on pin %d", self->pin));
149150
}
150151
chan_gpio[channel] = self->pin;
151-
self->channel = channel;
152152
}
153153

154154
// Maybe change PWM timer

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy