Commit bc7042a
committed
esp32-hal-ledc.c: Clear bit in used_channels bitmap
When we attach pin to LEDC channel we set bit in used_channels bitmap variable.
But used_channels bit was not cleared on detach,
as result simply repeating attach/detach around 16 times
will falsely use all available channels and
emit error that channel is not available.
This happen for example in IRSenderESP32.cpp.
This patch fixes this bug.
Signed-off-by: Denys Fedoryshchenko <[email protected]>1 parent f5be003 commit bc7042a
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
274 | 281 | | |
275 | 282 | | |
276 | 283 | | |
| |||
0 commit comments