Skip to content

v1.0.8

Choose a tag to compare

@onexs-xsi onexs-xsi released this 28 Feb 08:18
· 5 commits to main since this release
  1. Fix _pollTask declaration scope for Arduino builds — Move TaskHandle_t _pollTask; from the #else (ESP-IDF-only) branch of #ifdef ARDUINO to the unconditional (shared) area after #endif, making it visible to both Arduino and ESP-IDF compilation paths. This resolves 8 compile errors ('_pollTask' was not declared in this scope) in functions _updatePollingForI2cSleep(), _arduinoIsrHandler(), _setupPollingArduino(), _cleanupPollingArduino(), _setupHardwareInterruptArduino(), and _cleanupHardwareInterruptArduino().

  2. Fix _pollTask initialization in constructor — Move _pollTask = nullptr; from the #else (ESP-IDF) branch of the constructor to the unconditional area after #endif, ensuring the task handle is properly zero-initialized regardless of platform. _intrQueue remains in the #else block as it is only used by ESP-IDF code paths.

  3. Add per-pin clearInterrupt(uint8_t pin) API overload — Introduce a new clearInterrupt(uint8_t pin) method alongside the existing no-argument clearInterrupt(). The new overload writes ~(1U << pin) to GPIO_IS_L/GPIO_IS_H using the hardware's "write 0 to clear" semantics, clearing only the specified pin's interrupt status bit while leaving other pins' status intact. This fixes compile errors in interrupt_hardware.ino and interrupt_polling.ino examples that were calling clearInterrupt(IOE1_PIN_x).

  4. Fix begin() parameter misalignment in interrupt_polling.ino example — Insert the missing intPin = -1 argument before M5IOE1_INT_MODE_POLLING in the begin() call. Previously, the enum value M5IOE1_INT_MODE_POLLING (= 1) was being passed to the intPin parameter, causing GPIO1 to be incorrectly registered as the hardware interrupt pin and later detachInterrupt()-ed on destruction.