Print LVGL logs to SVC::OutputDebugString
This commit is contained in:
parent
f044825791
commit
03d40c0946
2 changed files with 11 additions and 5 deletions
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#define LV_USE_LOG 1
|
#define LV_USE_LOG 1
|
||||||
//#define LV_LOG_LEVEL LV_LOG_LEVEL_TRACE
|
//#define LV_LOG_LEVEL LV_LOG_LEVEL_TRACE
|
||||||
#define LV_LOG_PRINTF 1
|
//#define LV_LOG_PRINTF 1
|
||||||
|
|
||||||
#define LV_USE_ASSERT_NULL 1
|
#define LV_USE_ASSERT_NULL 1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ long unsigned int sys_tick(void)
|
||||||
void sys_init(void)
|
void sys_init(void)
|
||||||
{
|
{
|
||||||
gfxInitDefault();
|
gfxInitDefault();
|
||||||
consoleInit(GFX_TOP, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void sys_free(void)
|
void sys_free(void)
|
||||||
|
|
@ -31,6 +30,12 @@ void sys_free(void)
|
||||||
gfxExit();
|
gfxExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sys_log(lv_log_level_t level, const char * buf)
|
||||||
|
{
|
||||||
|
(level);
|
||||||
|
svcOutputDebugString(buf, strlen(buf)-1);
|
||||||
|
}
|
||||||
|
|
||||||
static void ui_timer_cb(lv_timer_t * t)
|
static void ui_timer_cb(lv_timer_t * t)
|
||||||
{
|
{
|
||||||
LV_UNUSED(t);
|
LV_UNUSED(t);
|
||||||
|
|
@ -198,9 +203,10 @@ int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
sys_init();
|
sys_init();
|
||||||
lv_init();
|
lv_init();
|
||||||
|
lv_log_register_print_cb(sys_log);
|
||||||
|
lv_tick_set_cb(sys_tick);
|
||||||
lv_ctr_disp_init();
|
lv_ctr_disp_init();
|
||||||
lv_ctr_indev_init();
|
lv_ctr_indev_init();
|
||||||
lv_tick_set_cb(sys_tick);
|
|
||||||
|
|
||||||
ui_prepare();
|
ui_prepare();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue