mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-01 19:53:17 +00:00
This patch updates the module gluecode to be compatible with LVGL version 9.2. This includes changes done to display and input driver initialization and draw buffer handling. Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
28 lines
645 B
C
28 lines
645 B
C
/*
|
|
* Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
|
* Copyright 2023 NXP
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <zephyr/kernel.h>
|
|
#include <lvgl.h>
|
|
#include "lvgl_display.h"
|
|
|
|
void lvgl_flush_cb_32bit(lv_display_t *display, const lv_area_t *area, uint8_t *px_map)
|
|
{
|
|
uint16_t w = area->x2 - area->x1 + 1;
|
|
uint16_t h = area->y2 - area->y1 + 1;
|
|
struct lvgl_display_flush flush;
|
|
|
|
flush.display = display;
|
|
flush.x = area->x1;
|
|
flush.y = area->y1;
|
|
flush.desc.buf_size = w * 4U * h;
|
|
flush.desc.width = w;
|
|
flush.desc.pitch = w;
|
|
flush.desc.height = h;
|
|
flush.buf = (void *)px_map;
|
|
lvgl_flush_display(&flush);
|
|
}
|