1 /* 2 * Copyright (c) 2025 MASSDRIVER EI (massdriver.space) 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <zephyr/kernel.h> 8 #include <lvgl.h> 9 #include "lvgl_display.h" 10 lvgl_flush_cb_8bit(lv_display_t * display,const lv_area_t * area,uint8_t * px_map)11void lvgl_flush_cb_8bit(lv_display_t *display, const lv_area_t *area, uint8_t *px_map) 12 { 13 uint16_t w = area->x2 - area->x1 + 1; 14 uint16_t h = area->y2 - area->y1 + 1; 15 struct lvgl_display_flush flush; 16 17 flush.display = display; 18 flush.x = area->x1; 19 flush.y = area->y1; 20 flush.desc.buf_size = w * h; 21 flush.desc.width = w; 22 flush.desc.pitch = w; 23 flush.desc.height = h; 24 flush.buf = (void *)px_map; 25 26 lvgl_flush_display(&flush); 27 } 28