We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a7eda1 commit 3722dbaCopy full SHA for 3722dba
cores/esp32/esp32-hal-ledc.c
@@ -52,8 +52,8 @@ static bool ledcDetachBus(void *bus) {
52
bool channel_found = false;
53
// Check if more pins are attached to the same ledc channel
54
for (uint8_t i = 0; i < SOC_GPIO_PIN_COUNT; i++) {
55
- if (!perimanPinIsValid(i)) {
56
- continue; //invalid pin, skip
+ if (!perimanPinIsValid(i) || i == handle->pin) {
+ continue; //invalid pin or same pin
57
}
58
peripheral_bus_type_t type = perimanGetPinBusType(i);
59
if (type == ESP32_BUS_TYPE_LEDC) {
0 commit comments