Refractored epd handler

This commit is contained in:
GW_MC
2026-01-28 17:35:49 +08:00
parent 38d5facc24
commit fc79e92660
7 changed files with 619 additions and 786 deletions

View File

@@ -103,6 +103,10 @@ void LVGLHandler::flush_cb_(lv_display_t* disp, const lv_area_t* area, uint8_t*
int32_t area_w = lv_area_get_width(area);
int32_t area_h = lv_area_get_height(area);
if (area->x1 == 0 && area->y1 == 0 && area_w == DISPLAY_WIDTH && area_h == DISPLAY_HEIGHT) {
// revert the pixel data for e-ink (LVGL: 1=white, 0=black; E-Ink: 1=black, 0=white)
for (size_t i = 0; i < DISPLAY_BUFFER_SIZE; ++i) {
pixel_data[i] = ~pixel_data[i];
}
esp_err_t err = handler->display_handler_->full_write(
pixel_data,
true // white basemap