/* * 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 #include #define DBG_TAG "LVGL" #define DBG_LVL DBG_INFO #include #ifndef PKG_USING_LVGL_DISP_DEVICE # include #endif #ifndef PKG_USING_LVGL_INDEV_DEVICE # include #endif #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(); #ifndef PKG_USING_LVGL_DISP_DEVICE lv_port_disp_init(); #endif #ifndef PKG_USING_LVGL_INDEV_DEVICE lv_port_indev_init(); #endif return 0; } INIT_COMPONENT_EXPORT(lv_port_init); #endif /*__RTTHREAD__*/