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_LOG_LEVEL LV_LOG_LEVEL_TRACE
|
||||
#define LV_LOG_PRINTF 1
|
||||
//#define LV_LOG_PRINTF 1
|
||||
|
||||
#define LV_USE_ASSERT_NULL 1
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ long unsigned int sys_tick(void)
|
|||
void sys_init(void)
|
||||
{
|
||||
gfxInitDefault();
|
||||
consoleInit(GFX_TOP, NULL);
|
||||
}
|
||||
|
||||
void sys_free(void)
|
||||
|
|
@ -31,12 +30,18 @@ void sys_free(void)
|
|||
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)
|
||||
{
|
||||
LV_UNUSED(t);
|
||||
|
||||
|
||||
lv_indev_t * indev = lv_indev_get_next(NULL);
|
||||
|
||||
|
||||
while (indev) {
|
||||
if (lv_indev_get_type(indev) == LV_INDEV_TYPE_POINTER) {
|
||||
lv_point_t p;
|
||||
|
|
@ -198,9 +203,10 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
sys_init();
|
||||
lv_init();
|
||||
lv_log_register_print_cb(sys_log);
|
||||
lv_tick_set_cb(sys_tick);
|
||||
lv_ctr_disp_init();
|
||||
lv_ctr_indev_init();
|
||||
lv_tick_set_cb(sys_tick);
|
||||
|
||||
ui_prepare();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue