fix(rt-thread): sync rt-thread v5.0.0 rt_align (#3864)

This commit is contained in:
Man, Jianting (Meco)
2022-12-13 05:45:24 -05:00
committed by GitHub
parent eaea0c4cc8
commit 3c83a1e35b
2 changed files with 12 additions and 2 deletions

View File

@@ -67,7 +67,11 @@
# define LV_BIG_ENDIAN_SYSTEM 0
#endif
#define LV_ATTRIBUTE_MEM_ALIGN ALIGN(4)
#ifdef rt_align /* >= RT-Thread v5.0.0 */
# define LV_ATTRIBUTE_MEM_ALIGN rt_align(RT_ALIGN_SIZE)
#else
# define LV_ATTRIBUTE_MEM_ALIGN ALIGN(RT_ALIGN_SIZE)
#endif
/*==================
* EXAMPLES

View File

@@ -31,7 +31,13 @@ extern void lv_port_indev_init(void);
extern void lv_user_gui_init(void);
static struct rt_thread lvgl_thread;
static ALIGN(8) rt_uint8_t lvgl_thread_stack[PKG_LVGL_THREAD_STACK_SIZE];
#ifdef rt_align
rt_align(RT_ALIGN_SIZE)
#else
ALIGN(RT_ALIGN_SIZE)
#endif
static rt_uint8_t lvgl_thread_stack[PKG_LVGL_THREAD_STACK_SIZE];
#if LV_USE_LOG
static void lv_rt_log(const char *buf)