Print LVGL logs to SVC::OutputDebugString

This commit is contained in:
Rafał Kołucki 2026-06-15 21:19:35 +02:00
parent f044825791
commit 03d40c0946
2 changed files with 11 additions and 5 deletions

View file

@ -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();