Skip to content

Conversation

@meirarmon
Copy link
Contributor

@meirarmon meirarmon commented May 30, 2025

ports/esp32: esp32.wake_on_ext0 should only be available on boards
that have SOC_PM_SUPPORT_EXT0_WAKEUP=y
docs/library/esp32.rst: update docs to reflect that wake_on_ext0
is only available for boards that have support for ext0

Summary

Having code wrapped by definitions of whether or not the capability is supported on the
board instead of what board it is, is better practice.
I introduced this so that when using the method wake_on_ext0 on boards that don't
support it, it will be clear that it is not supported, instead of silently failing.

Testing

I tested this on the ESP32C3

Merge this after #17393

@meirarmon meirarmon marked this pull request as draft May 30, 2025 11:11
@meirarmon meirarmon force-pushed the wake-on-ext0-only-if-supported branch from a238ed8 to 2e08b04 Compare May 30, 2025 14:34
ports/esp32: esp32.wake_on_touch should only be available on boards
      that have SOC_TOUCH_SENSOR_SUPPORTED=y
docs/library/esp32.rst: update docs to reflect that wake_on_touch
      is only available for boards that have touch sensor support

Signed-off-by: Meir Armon <meirarmon@gmail.com>
ports/esp32: esp32.wake_on_ext0 should only be available on boards
      that have SOC_PM_SUPPORT_EXT0_WAKEUP=y
docs/library/esp32.rst: update docs to reflect that wake_on_ext0
      is only available for boards that have support for ext0

Signed-off-by: Meir Armon <meirarmon@gmail.com>
@meirarmon meirarmon force-pushed the wake-on-ext0-only-if-supported branch from efc6181 to 08cf66b Compare June 16, 2025 02:28
@dpgeorge
Copy link
Member

Closing in favour of #17397.

@dpgeorge dpgeorge closed this Jun 16, 2025
@meirarmon meirarmon deleted the wake-on-ext0-only-if-supported branch June 16, 2025 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants