Refactor power saving logic into display drivers and add ST7789 support
This commit is contained in:
@@ -47,6 +47,16 @@ public:
|
||||
// Color inversion control
|
||||
void set_invert_color(bool inv) { invert_color = inv; }
|
||||
bool get_invert_color() const { return invert_color; }
|
||||
|
||||
// Power saving hooks
|
||||
void on_idle_2min() override;
|
||||
void on_idle_10min() override;
|
||||
void on_user_interaction() override;
|
||||
|
||||
private:
|
||||
uint8_t saved_brightness = 100;
|
||||
bool is_dimmed = false;
|
||||
bool is_sleeping = false;
|
||||
};
|
||||
|
||||
#endif // LOW_LEVEL_DISPLAY_ST7796_H
|
||||
|
||||
Reference in New Issue
Block a user