Add auto-sleep/wake functionality with timer-based dimming

- Added PWM brightness control to ST7796 driver (0-100%)
- Implemented hardware sleep mode for ST7796 (saves ~150mA)
- Added sleep/wake functions preserving framebuffer and settings
- Implemented timer-based inactivity detection (checks every 10s)
- Auto-sleep after 5 minutes of no user input
- Touch controller remains active during TFT sleep for instant wake
- E-ink display also sleeps after timeout, requires re-init on wake
- Added hardware_pwm library dependency to CMakeLists.txt
- Brightness and sleep/wake methods exposed through display abstraction layer
This commit is contained in:
Adolfo Reyna
2026-02-10 20:29:10 -05:00
parent b16211f148
commit 8cbb95b181
7 changed files with 384 additions and 7 deletions

View File

@@ -113,6 +113,7 @@ target_include_directories(basic1 PRIVATE
target_link_libraries(basic1
hardware_spi
hardware_i2c
hardware_pwm
pico_multicore
m
)