adding support for waveshare esp32-C6 and power states#1703
Open
aslater3 wants to merge 1 commit intomeshcore-dev:devfrom
Open
adding support for waveshare esp32-C6 and power states#1703aslater3 wants to merge 1 commit intomeshcore-dev:devfrom
aslater3 wants to merge 1 commit intomeshcore-dev:devfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).