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:
@@ -32,6 +32,14 @@ public:
|
||||
|
||||
// Backlight control
|
||||
void set_backlight(bool on) override;
|
||||
|
||||
// Brightness control (0-100)
|
||||
void set_brightness(uint8_t brightness) override;
|
||||
uint8_t get_brightness() const override;
|
||||
|
||||
// Power management
|
||||
void sleep(); // Put display to sleep (low power, touch still active)
|
||||
void wake(); // Wake display from sleep
|
||||
|
||||
// Orientation control
|
||||
void set_rotation(uint8_t rotation) override;
|
||||
|
||||
Reference in New Issue
Block a user