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