Skip to content

Commit 8aae043

Browse files
lv_conf.h: more logging
1 parent 7b203ad commit 8aae043

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

patches/lv_conf.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ extern void *mp_lv_roots;
293293
*-----------*/
294294

295295
/*Enable the log module*/
296-
#define LV_USE_LOG 0
296+
#define LV_USE_LOG 1
297297
#if LV_USE_LOG
298298

299299
/*How important log should be added:
@@ -307,7 +307,7 @@ extern void *mp_lv_roots;
307307

308308
/*1: Print the log with 'printf';
309309
*0: User need to register a callback with `lv_log_register_print_cb()`*/
310-
#define LV_LOG_PRINTF 0
310+
#define LV_LOG_PRINTF 1
311311

312312
/*Set callback to print the logs.
313313
*E.g `my_print`. The prototype should be `void my_print(lv_log_level_t level, const char * buf)`
@@ -344,12 +344,14 @@ extern void *mp_lv_roots;
344344
*If LV_USE_LOG is enabled an error message will be printed on failure*/
345345
#define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/
346346
#define LV_USE_ASSERT_MALLOC 1 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/
347-
#define LV_USE_ASSERT_STYLE 0 /*Check if the styles are properly initialized. (Very fast, recommended)*/
347+
#define LV_USE_ASSERT_STYLE 1 /*Check if the styles are properly initialized. (Very fast, recommended)*/
348348
#define LV_USE_ASSERT_MEM_INTEGRITY 0 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/
349349
#define LV_USE_ASSERT_OBJ 0 /*Check the object's type and existence (e.g. not deleted). (Slow)*/
350350

351351
/*Add a custom handler when assert happens e.g. to restart the MCU*/
352352
#define LV_ASSERT_HANDLER_INCLUDE <stdint.h>
353+
///home/user/sources/lvgl_micropython/lib/lv_conf.h:353:27: error: implicit declaration of function 'printf' [-Werror=implicit-function-declaration]
354+
//#define LV_ASSERT_HANDLER printf("custom handler when assert happens e.g. to restart the MCU"); while(1); /*Halt by default*/
353355
#define LV_ASSERT_HANDLER while(1); /*Halt by default*/
354356

355357
/*-------------

0 commit comments

Comments
 (0)