feat(display): Implement singleton pattern for EInkDisplayHandler and enhance buffer allocation checks

This commit is contained in:
GW_MC
2026-04-20 15:11:48 +08:00
parent 05a65988dd
commit c5d6cfcd22
3 changed files with 72 additions and 40 deletions

View File

@@ -90,9 +90,11 @@ private:
esp_lcd_panel_io_handle_t tp_io_handle_ = nullptr;
esp_lcd_touch_handle_t tp_handle_ = nullptr;
// this buffer reflects the current display state (1=black, 0=white)
// Display buffers (1=black, 0=white)
uint8_t* draw_buffer_ = nullptr;
uint8_t* old_buffer_ = nullptr;
uint8_t* black_data_ = nullptr; // All 0xFF (black pattern)
uint8_t* white_data_ = nullptr; // All 0x00 (white pattern)
RefreshArea refresh_area_ = { 0, 0, 0, 0 };
};