fix(rt-thread): include the rt-thread configuration header file (#2692)
This commit is contained in:
committed by
GitHub
parent
5d8ab8d5af
commit
c61c371ee9
@@ -16,22 +16,11 @@
|
||||
#define LV_RTTHREAD_INCLUDE <rtthread.h>
|
||||
#include LV_RTTHREAD_INCLUDE
|
||||
|
||||
/*====================
|
||||
COLOR SETTINGS
|
||||
*====================*/
|
||||
|
||||
#ifdef PKG_LVGL_ENABLE_COLOR_16_SWAP
|
||||
#define LV_COLOR_16_SWAP 1
|
||||
#else
|
||||
#define LV_COLOR_16_SWAP 0
|
||||
#endif
|
||||
|
||||
/*=========================
|
||||
MEMORY SETTINGS
|
||||
*=========================*/
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
/*1: use custom malloc/free, 0: use the built-in `lv_mem_alloc()` and `lv_mem_free()`*/
|
||||
# define LV_MEM_CUSTOM 1
|
||||
# define LV_MEM_CUSTOM_INCLUDE LV_RTTHREAD_INCLUDE
|
||||
# define LV_MEM_CUSTOM_ALLOC rt_malloc
|
||||
@@ -43,8 +32,6 @@
|
||||
HAL SETTINGS
|
||||
*====================*/
|
||||
|
||||
/*Use a custom tick source that tells the elapsed time in milliseconds.
|
||||
*It removes the need to manually update the tick with `lv_tick_inc()`)*/
|
||||
#define LV_TICK_CUSTOM 1
|
||||
#define LV_TICK_CUSTOM_INCLUDE LV_RTTHREAD_INCLUDE
|
||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (rt_tick_get_millisecond()) /*Expression evaluating to current system time in ms*/
|
||||
@@ -57,7 +44,6 @@
|
||||
* Logging
|
||||
*-----------*/
|
||||
|
||||
/*Enable the log module*/
|
||||
#ifdef PKG_LVGL_ENABLE_LOG
|
||||
# define LV_USE_LOG 1
|
||||
# define LV_LOG_PRINTF 0
|
||||
@@ -76,7 +62,6 @@
|
||||
* Others
|
||||
*-----------*/
|
||||
|
||||
/*Change the built in (v)snprintf functions*/
|
||||
#define LV_SPRINTF_CUSTOM 1
|
||||
#define LV_SPRINTF_INCLUDE LV_RTTHREAD_INCLUDE
|
||||
#define lv_snprintf rt_snprintf
|
||||
@@ -87,14 +72,12 @@
|
||||
* COMPILER SETTINGS
|
||||
*====================*/
|
||||
|
||||
/*For big endian systems set to 1*/
|
||||
#ifdef RT_USING_BIG_ENDIAN
|
||||
# define LV_BIG_ENDIAN_SYSTEM 1
|
||||
#else
|
||||
# define LV_BIG_ENDIAN_SYSTEM 0
|
||||
#endif
|
||||
|
||||
/*Will be added where memories needs to be aligned*/
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN ALIGN(4)
|
||||
|
||||
/*--END OF LV_RT_THREAD_CONF_H--*/
|
||||
|
||||
@@ -19,7 +19,8 @@ extern "C" {
|
||||
# ifdef __NuttX__
|
||||
# include <nuttx/config.h>
|
||||
# elif defined(__RTTHREAD__)
|
||||
# define LV_CONF_SKIP
|
||||
# define LV_CONF_INCLUDE_SIMPLE
|
||||
# include <lv_rt_thread_conf.h>
|
||||
# endif
|
||||
|
||||
#endif /*LV_CONF_KCONFIG_EXTERNAL_INCLUDE*/
|
||||
|
||||
Reference in New Issue
Block a user