arch(env): move rt-thread into env_support folder (#3025)
This commit is contained in:
committed by
GitHub
parent
10866ce3f0
commit
bd243f3124
44
env_support/rt-thread/lv_rt_thread_port.c
Normal file
44
env_support/rt-thread/lv_rt_thread_port.c
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-10-18 Meco Man The first version
|
||||
*/
|
||||
|
||||
#ifdef __RTTHREAD__
|
||||
|
||||
#include <rtthread.h>
|
||||
#define DBG_TAG "LVGL"
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
#include <lv_port_disp.h>
|
||||
#include <lv_port_indev.h>
|
||||
|
||||
#if LV_USE_LOG
|
||||
static void lv_rt_log(const char *buf)
|
||||
{
|
||||
LOG_I(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int lv_port_init(void)
|
||||
{
|
||||
#if LV_USE_LOG
|
||||
lv_log_register_print_cb(lv_rt_log);
|
||||
#endif
|
||||
|
||||
lv_init();
|
||||
|
||||
lv_port_disp_init();
|
||||
lv_port_indev_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
INIT_COMPONENT_EXPORT(lv_port_init);
|
||||
|
||||
#endif /*__RTTHREAD__*/
|
||||
Reference in New Issue
Block a user