Skip to content

adding support for waveshare esp32-C6 and power states#1703

Open
aslater3 wants to merge 1 commit intomeshcore-dev:devfrom
aslater3:pr/c6-power-led-clean-v2
Open

adding support for waveshare esp32-C6 and power states#1703
aslater3 wants to merge 1 commit intomeshcore-dev:devfrom
aslater3:pr/c6-power-led-clean-v2

Conversation

@aslater3
Copy link

PR Summary
This PR adds minimal ESP32-C6 sleep support required for Waveshare C6 enablement groundwork, while keeping behavior unchanged for all existing non-target boards.

Scope
Only file changed: ESP32Board.h
No variant additions in this PR
No LR1121 integration in this PR (deferred to follow-up)

What Changed
Added C6-only includes and logic behind:
CONFIG_IDF_TARGET_ESP32C6
WAVESHARE_ESP32_C6_LP_BASELINE
Added C6 wake-cause mapping in begin() so GPIO/EXT1 wake can report BD_STARTUP_RX_PACKET.
Added C6 sleep implementations:
enterLightSleep() with EXT1/GPIO wake handling and timer wake.
enterDeepSleep() (optional path via macro).
Updated C6 sleep() path to use light/deep sleep based on WAVESHARE_ESP32_C6_USE_DEEP_SLEEP.
Kept legacy behavior for all other ESP32 targets:
setInhibitSleep() retained.
sleep() still uses existing enterLightSleep() behavior when not in the C6 guarded path.
Small safety/type fixes in existing code path:
1L -> 1ULL
timer math cast to uint64_t.

Behavioral Impact
Non-C6 boards: no behavior change intended.
C6 Waveshare-gated builds: gain guarded low-power wake/sleep support needed for future board enablement.

Follow-up PRs
Add Waveshare ESP32-C6 variant/build envs.
Add LR1121 support and TX power handling (2.4 GHz vs sub-GHz limits).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant