Workaround core3

This commit is contained in:
Theo Arends 2024-02-16 20:04:46 +01:00
parent 0faef8e4dd
commit 733b9254a5
1 changed files with 2 additions and 0 deletions

View File

@ -324,11 +324,13 @@ int32_t analogAttach(uint32_t pin, bool output_invert) { // returns ledc chan
}
void analogDetach(void) {
#if ESP_IDF_VERSION_MAJOR < 5
for (uint32_t pin = 0; pin < SOC_GPIO_PIN_COUNT; pin++) {
if (pin_to_channel[pin] > 0) {
ledcDetachPin(pin);
}
}
#endif
}
extern "C" uint32_t ledcReadFreq2(uint8_t chan) {