modules: lvgl: provide alignment definition

For some systems, the display peripheral or GPU requires that buffers be
aligned on a boundary for optimal performance. We already align display
buffers using CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE, but some applications
will rely on the definition of LV_ATTRIBUTE_MEM_ALIGN. Provide this
definition so those buffers will be aligned as well.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2024-09-06 15:02:16 +00:00 committed by Anas Nashif
parent 0469de9626
commit c8161dc53d

View file

@ -8,6 +8,8 @@
#ifndef ZEPHYR_MODULES_LVGL_LV_CONF_H_
#define ZEPHYR_MODULES_LVGL_LV_CONF_H_
#include <zephyr/toolchain.h>
/* Memory manager settings */
#define LV_MEMCPY_MEMSET_STD 1
@ -42,6 +44,9 @@
#define lv_snprintf snprintf
#define lv_vsnprintf vsnprintf
/* Provide definition to align LVGL buffers */
#define LV_ATTRIBUTE_MEM_ALIGN __aligned(CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE)
/*
* Needed because of a workaround for a GCC bug,
* see https://github.com/lvgl/lvgl/issues/3078