You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/lv_conf.h
+36-29Lines changed: 36 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
#defineMICROPY_SDL 0
15
15
#endif
16
16
#ifndefMICROPY_FFMPEG
17
-
#defineMICROPY_FFMPEG 0
17
+
#defineMICROPY_FFMPEG 0 // works on unix/desktop but not on esp32 (conflicting time.h time_t in /home/user/sources/lvgl_micropython/lib/esp-idf/components/mbedtls/mbedtls/include/mbedtls/platform_time.h)
18
18
#endif
19
19
#ifndefMICROPY_RLOTTIE
20
20
#defineMICROPY_RLOTTIE 0
@@ -23,10 +23,12 @@
23
23
#defineMICROPY_TINY_TTF 0
24
24
#endif
25
25
#ifndefMICROPY_CACHE_SIZE
26
-
#defineMICROPY_CACHE_SIZE 0
26
+
//#define MICROPY_CACHE_SIZE 50 * 64 * 64 * 2 // 50 images of 64x64 pixels at 2 bytes per pixel
27
+
//#define MICROPY_CACHE_SIZE 1320000 // one image of 1100x600 pixels at 2 bytes per pixel
28
+
#defineMICROPY_CACHE_SIZE 2518040 // one image of 1058x595 pixels at 4 bytes per pixel
27
29
#endif
28
30
#ifndefMICROPY_COLOR_DEPTH
29
-
#defineMICROPY_COLOR_DEPTH32
31
+
#defineMICROPY_COLOR_DEPTH16
30
32
#endif
31
33
#ifndefMICROPY_FLOAT
32
34
#defineMICROPY_FLOAT 0
@@ -216,7 +218,7 @@ extern void *mp_lv_roots;
216
218
* The circumference of 1/4 circle are saved for anti-aliasing
217
219
* radius * 4 bytes are used per circle (the most often used radiuses are saved)
218
220
* 0: to disable caching */
219
-
#defineLV_DRAW_SW_CIRCLE_CACHE_SIZE4
221
+
#defineLV_DRAW_SW_CIRCLE_CACHE_SIZE40
220
222
#endif
221
223
222
224
#defineLV_USE_DRAW_SW_ASM LV_DRAW_SW_ASM_NONE
@@ -293,7 +295,7 @@ extern void *mp_lv_roots;
293
295
*-----------*/
294
296
295
297
/*Enable the log module*/
296
-
#defineLV_USE_LOG0
298
+
#defineLV_USE_LOG1
297
299
#ifLV_USE_LOG
298
300
299
301
/*How important log should be added:
@@ -303,11 +305,14 @@ extern void *mp_lv_roots;
303
305
*LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
304
306
*LV_LOG_LEVEL_USER Only logs added by the user
305
307
*LV_LOG_LEVEL_NONE Do not log anything*/
306
-
#defineLV_LOG_LEVEL LV_LOG_LEVEL_WARN
308
+
// // 0 is trace, 1 is info, 2 is warn, 3 is error, 4 is user (FPS is here as 'sysmon' user)
309
+
// trace is useful but logs a LOT for every screen draw...
310
+
//#define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
311
+
#defineLV_LOG_LEVEL LV_LOG_LEVEL_INFO
307
312
308
313
/*1: Print the log with 'printf';
309
314
*0: User need to register a callback with `lv_log_register_print_cb()`*/
310
-
#defineLV_LOG_PRINTF 0
315
+
#defineLV_LOG_PRINTF 0 // this doesn't seem to print anything to the serial port, so don't use it
311
316
312
317
/*Set callback to print the logs.
313
318
*E.g `my_print`. The prototype should be `void my_print(lv_log_level_t level, const char * buf)`
@@ -344,12 +349,14 @@ extern void *mp_lv_roots;
344
349
*If LV_USE_LOG is enabled an error message will be printed on failure*/
345
350
#defineLV_USE_ASSERT_NULL 1/*Check if the parameter is NULL. (Very fast, recommended)*/
346
351
#defineLV_USE_ASSERT_MALLOC 1/*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/
347
-
#defineLV_USE_ASSERT_STYLE0/*Check if the styles are properly initialized. (Very fast, recommended)*/
352
+
#defineLV_USE_ASSERT_STYLE1/*Check if the styles are properly initialized. (Very fast, recommended)*/
348
353
#defineLV_USE_ASSERT_MEM_INTEGRITY 0/*Check the integrity of `lv_mem` after critical operations. (Slow)*/
349
354
#defineLV_USE_ASSERT_OBJ 0/*Check the object's type and existence (e.g. not deleted). (Slow)*/
350
355
351
356
/*Add a custom handler when assert happens e.g. to restart the MCU*/
352
357
#defineLV_ASSERT_HANDLER_INCLUDE <stdint.h>
358
+
///home/user/sources/lvgl_micropython/lib/lv_conf.h:353:27: error: implicit declaration of function 'printf' [-Werror=implicit-function-declaration]
359
+
//#define LV_ASSERT_HANDLER printf("custom handler when assert happens e.g. to restart the MCU"); while(1); /*Halt by default*/
353
360
#defineLV_ASSERT_HANDLER while(1);/*Halt by default*/
354
361
355
362
/*-------------
@@ -385,7 +392,7 @@ extern void *mp_lv_roots;
385
392
386
393
/*Default number of image header cache entries. The cache is used to store the headers of images
387
394
*The main logic is like `LV_CACHE_DEF_SIZE` but for image headers.*/
388
-
#defineLV_IMAGE_HEADER_CACHE_DEF_CNT0
395
+
#defineLV_IMAGE_HEADER_CACHE_DEF_CNT24
389
396
390
397
/*Number of stops allowed per gradient. Increase this to allow more stops.
391
398
*This adds (sizeof(lv_color_t) + 1) bytes per additional stop*/
@@ -492,18 +499,18 @@ extern void *mp_lv_roots;
492
499
493
500
/*Montserrat fonts with ASCII range and some symbols using bpp = 4
* Supports complete JPEG specifications and high-performance JPEG decoding. */
798
-
#defineLV_USE_LIBJPEG_TURBO 0
805
+
#defineLV_USE_LIBJPEG_TURBO 0 // needs LDFLAGS += -ljpeg in MicroPython's Makefile for this port. Only got it working on unix, not esp32 yet, needs libjpeg probably.
799
806
800
807
/*GIF decoder library*/
801
808
#defineLV_USE_GIF 1
802
809
#ifLV_USE_GIF
803
810
/*GIF decoder accelerate*/
804
-
#defineLV_GIF_CACHE_DECODE_DATA0
811
+
#defineLV_GIF_CACHE_DECODE_DATA1
805
812
#endif
806
813
807
814
@@ -869,19 +876,19 @@ extern void *mp_lv_roots;
869
876
#defineLV_USE_SNAPSHOT 1
870
877
871
878
/*1: Enable system monitor component*/
872
-
#defineLV_USE_SYSMON0
879
+
#defineLV_USE_SYSMON1
873
880
#ifLV_USE_SYSMON
874
881
/*Get the idle percentage. E.g. uint32_t my_get_idle(void);*/