diff --git a/log.c b/log.c index 7449d0e..c0c4f34 100644 --- a/log.c +++ b/log.c @@ -34,7 +34,7 @@ static ul_log_level log_level = UL_LOG_LEVEL_ERROR; * Public functions */ -void ul_set_log_level(ul_log_level level) { +void ul_log_set_level(ul_log_level level) { log_level = level; } @@ -49,6 +49,6 @@ void ul_log(ul_log_level level, const char *format, ...) { va_end(args); } -void ul_print_cb(const char *msg) { +void ul_log_print_cb(const char *msg) { ul_log(UL_LOG_LEVEL_VERBOSE, "%s\n", msg); } diff --git a/log.h b/log.h index a194336..9cbec01 100644 --- a/log.h +++ b/log.h @@ -38,7 +38,7 @@ typedef enum { * * @param level new log level value */ -void ul_set_log_level(ul_log_level level); +void ul_log_set_level(ul_log_level level); /** * Log a message. @@ -54,6 +54,6 @@ void ul_log(ul_log_level level, const char *format, ...); * * @param msg message to print */ -void ul_print_cb(const char *msg); +void ul_log_print_cb(const char *msg); #endif /* UL_LOG_H */ diff --git a/main.c b/main.c index b4def86..581200b 100644 --- a/main.c +++ b/main.c @@ -333,9 +333,17 @@ int main(int argc, char *argv[]) { ul_cli_opts opts; ul_cli_parse_opts(argc, argv, &opts); + /* Parse config file */ + ul_config_opts config; + ul_config_init(&config); + ul_config_parse(opts.config, &config); + +printf("anim %d, pops %d, layout %d\n", config.animations, config.popovers, config.layout_id); +exit(1); + /* Set up log level */ if (opts.verbose) { - ul_set_log_level(UL_LOG_LEVEL_VERBOSE); + ul_log_set_level(UL_LOG_LEVEL_VERBOSE); } /* Announce ourselves */ @@ -343,7 +351,7 @@ int main(int argc, char *argv[]) { /* Initialise LVGL and set up logging callback */ lv_init(); - lv_log_register_print_cb(ul_print_cb); + lv_log_register_print_cb(ul_log_print_cb); /* Initialise framebuffer driver and query display size */ fbdev_init();