mirror of
https://github.com/lvgl/lvgl.git
synced 2024-11-29 12:43:50 +08:00
chore(rt.thread): improve rt-thread marcos (#3355)
This commit is contained in:
parent
941d95b049
commit
40e9c6b9e0
@ -32,7 +32,7 @@ for root, dirs, files in os.walk(lvgl_src_cwd):
|
||||
inc = inc + [current_path]
|
||||
|
||||
|
||||
if GetDepend('PKG_USING_LVGL_EXAMPLES'):
|
||||
if GetDepend('PKG_LVGL_USING_EXAMPLES'):
|
||||
lvgl_src_cwd = lvgl_cwd + 'examples/'
|
||||
inc = inc + [lvgl_src_cwd]
|
||||
for root, dirs, files in os.walk(lvgl_src_cwd):
|
||||
@ -42,7 +42,7 @@ if GetDepend('PKG_USING_LVGL_EXAMPLES'):
|
||||
if check_h_hpp_exsit(current_path):
|
||||
inc = inc + [current_path]
|
||||
|
||||
if GetDepend('PKG_USING_LVGL_DEMOS'):
|
||||
if GetDepend('PKG_LVGL_USING_DEMOS'):
|
||||
lvgl_src_cwd = lvgl_cwd + 'demos/'
|
||||
inc = inc + [lvgl_src_cwd]
|
||||
for root, dirs, files in os.walk(lvgl_src_cwd):
|
||||
|
@ -40,16 +40,6 @@
|
||||
* FEATURE CONFIGURATION
|
||||
*=======================*/
|
||||
|
||||
/*-------------
|
||||
* Logging
|
||||
*-----------*/
|
||||
|
||||
#ifdef PKG_LVGL_ENABLE_LOG
|
||||
# define LV_USE_LOG 1
|
||||
#else
|
||||
# define LV_USE_LOG 0
|
||||
#endif
|
||||
|
||||
/*-------------
|
||||
* Asserts
|
||||
*-----------*/
|
||||
@ -83,7 +73,7 @@
|
||||
* EXAMPLES
|
||||
*==================*/
|
||||
|
||||
#ifdef PKG_USING_LVGL_EXAMPLES
|
||||
#ifdef PKG_LVGL_USING_EXAMPLES
|
||||
# define LV_BUILD_EXAMPLES 1
|
||||
#endif
|
||||
|
||||
|
@ -18,20 +18,20 @@
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
#ifndef LVGL_THREAD_STACK_SIZE
|
||||
#define LVGL_THREAD_STACK_SIZE 4096
|
||||
#endif /* LVGL_THREAD_STACK_SIZE */
|
||||
#ifndef PKG_LVGL_THREAD_STACK_SIZE
|
||||
#define PKG_LVGL_THREAD_STACK_SIZE 4096
|
||||
#endif /* PKG_LVGL_THREAD_STACK_SIZE */
|
||||
|
||||
#ifndef LVGL_THREAD_PRIO
|
||||
#define LVGL_THREAD_PRIO (RT_THREAD_PRIORITY_MAX*2/3)
|
||||
#endif /* LVGL_THREAD_PRIO */
|
||||
#ifndef PKG_LVGL_THREAD_PRIO
|
||||
#define PKG_LVGL_THREAD_PRIO (RT_THREAD_PRIORITY_MAX*2/3)
|
||||
#endif /* PKG_LVGL_THREAD_PRIO */
|
||||
|
||||
extern void lv_port_disp_init(void);
|
||||
extern void lv_port_indev_init(void);
|
||||
extern void lv_user_gui_init(void);
|
||||
|
||||
static struct rt_thread lvgl_thread;
|
||||
static rt_uint8_t lvgl_thread_stack[LVGL_THREAD_STACK_SIZE];
|
||||
static rt_uint8_t lvgl_thread_stack[PKG_LVGL_THREAD_STACK_SIZE];
|
||||
|
||||
#if LV_USE_LOG
|
||||
static void lv_rt_log(const char *buf)
|
||||
@ -63,7 +63,7 @@ static int lvgl_thread_init(void)
|
||||
rt_err_t err;
|
||||
|
||||
err = rt_thread_init(&lvgl_thread, "LVGL", lvgl_thread_entry, RT_NULL,
|
||||
&lvgl_thread_stack[0], sizeof(lvgl_thread_stack), LVGL_THREAD_PRIO, 0);
|
||||
&lvgl_thread_stack[0], sizeof(lvgl_thread_stack), PKG_LVGL_THREAD_PRIO, 0);
|
||||
if(err != RT_EOK)
|
||||
{
|
||||
LOG_E("Failed to create LVGL thread");
|
||||
|
Loading…
Reference in New Issue
Block a user