43
43
/*Images pixels with this color will not be drawn (with chroma keying)*/
44
44
#define LV_COLOR_TRANSP LV_COLOR_LIME /*LV_COLOR_LIME: pure green*/
45
45
46
+ /* Enable chroma keying for indexed images. */
47
+ #define LV_INDEXED_CHROMA 1
48
+
46
49
/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
47
50
#define LV_ANTIALIAS 1
48
51
@@ -193,6 +196,14 @@ typedef void * lv_img_decoder_user_data_t;
193
196
* font's bitmaps */
194
197
#define LV_ATTRIBUTE_LARGE_CONST
195
198
199
+ /* Export integer constant to binding.
200
+ * This macro is used with constants in the form of LV_<CONST> that
201
+ * should also appear on lvgl binding API such as Micropython
202
+ *
203
+ * The default value just prevents a GCC warning.
204
+ */
205
+ #define LV_EXPORT_CONST_INT (int_value ) struct _silence_gcc_warning
206
+
196
207
/*===================
197
208
* HAL settings
198
209
*==================*/
@@ -220,14 +231,51 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i
220
231
* LV_LOG_LEVEL_INFO Log important events
221
232
* LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
222
233
* LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
234
+ * LV_LOG_LEVEL_NONE Do not log anything
223
235
*/
224
236
# define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
225
237
226
238
/* 1: Print the log with 'printf';
227
- * 0: user need to register a callback with `lv_log_register_print `*/
239
+ * 0: user need to register a callback with `lv_log_register_print_cb `*/
228
240
# define LV_LOG_PRINTF 0
229
241
#endif /*LV_USE_LOG*/
230
242
243
+ /*=================
244
+ * Debug settings
245
+ *================*/
246
+
247
+ /* If Debug is enabled LittelvGL validates the parameters of the functions.
248
+ * If an invalid parameter is found an error log message is printed and
249
+ * the MCU halts at the error. (`LV_USE_LOG` should be enabled)
250
+ * If you are debugging the MCU you can pause
251
+ * the debugger to see exactly where the issue is.
252
+ *
253
+ * The behavior of asserts can be overwritten by redefining them here.
254
+ * E.g. #define LV_ASSERT_MEM(p) <my_assert_code>
255
+ */
256
+ #define LV_USE_DEBUG 1
257
+ #if LV_USE_DEBUG
258
+
259
+ /*Check if the parameter is NULL. (Quite fast) */
260
+ #define LV_USE_ASSERT_NULL 1
261
+
262
+ /*Checks is the memory is successfully allocated or no. (Quite fast)*/
263
+ #define LV_USE_ASSERT_MEM 1
264
+
265
+ /* Check the strings.
266
+ * Search for NULL, very long strings, invalid characters, and unnatural repetitions. (Slow)
267
+ * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */
268
+ #define LV_USE_ASSERT_STR 0
269
+
270
+ /* Check NULL, the object's type and existence (e.g. not deleted). (Quite slow)
271
+ * If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */
272
+ #define LV_USE_ASSERT_OBJ 0
273
+
274
+ /*Check if the styles are properly initialized. (Fast)*/
275
+ #define LV_USE_ASSERT_STYLE 1
276
+
277
+ #endif /*LV_USE_DEBUG*/
278
+
231
279
/*================
232
280
* THEME USAGE
233
281
*================*/
@@ -259,6 +307,10 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i
259
307
#define LV_FONT_ROBOTO_22 0
260
308
#define LV_FONT_ROBOTO_28 0
261
309
310
+ /* Demonstrate special features */
311
+ #define LV_FONT_ROBOTO_12_SUBPX 1
312
+ #define LV_FONT_ROBOTO_28_COMPRESSED 1 /*bpp = 3*/
313
+
262
314
/*Pixel perfect monospace font
263
315
* http://pelulamu.net/unscii/ */
264
316
#define LV_FONT_UNSCII_8 0
@@ -274,6 +326,17 @@ typedef void * lv_indev_drv_user_data_t; /*Type of user data in the i
274
326
/*Always set a default font from the built-in fonts*/
275
327
#define LV_FONT_DEFAULT &lv_font_roboto_16
276
328
329
+ /* Enable it if you have fonts with a lot of characters.
330
+ * The limit depends on the font size, font face and bpp
331
+ * but with > 10,000 characters if you see issues probably you need to enable it.*/
332
+ #define LV_FONT_FMT_TXT_LARGE 0
333
+
334
+ /* Set the pixel order of the display.
335
+ * Important only if "subpx fonts" are used.
336
+ * With "normal" font it doesn't matter.
337
+ */
338
+ #define LV_FONT_SUBPX_BGR 0
339
+
277
340
/*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/
278
341
typedef void * lv_font_user_data_t ;
279
342
@@ -291,6 +354,42 @@ typedef void * lv_font_user_data_t;
291
354
/*Can break (wrap) texts on these chars*/
292
355
#define LV_TXT_BREAK_CHARS " ,.;:-_"
293
356
357
+ /* If a word is at least this long, will break wherever "prettiest"
358
+ * To disable, set to a value <= 0 */
359
+ #define LV_TXT_LINE_BREAK_LONG_LEN 12
360
+
361
+ /* Minimum number of characters in a long word to put on a line before a break.
362
+ * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
363
+ #define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3
364
+
365
+ /* Minimum number of characters in a long word to put on a line after a break.
366
+ * Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
367
+ #define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
368
+
369
+ /* The control character to use for signalling text recoloring. */
370
+ #define LV_TXT_COLOR_CMD "#"
371
+
372
+ /* Support bidirectional texts.
373
+ * Allows mixing Left-to-Right and Right-to-Left texts.
374
+ * The direction will be processed according to the Unicode Bidirectioanl Algorithm:
375
+ * https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
376
+ #define LV_USE_BIDI 0
377
+ #if LV_USE_BIDI
378
+ /* Set the default direction. Supported values:
379
+ * `LV_BIDI_DIR_LTR` Left-to-Right
380
+ * `LV_BIDI_DIR_RTL` Right-to-Left
381
+ * `LV_BIDI_DIR_AUTO` detect texts base direction */
382
+ #define LV_BIDI_BASE_DIR_DEF LV_BIDI_DIR_AUTO
383
+ #endif
384
+
385
+ /*Change the built in (v)snprintf functions*/
386
+ #define LV_SPRINTF_CUSTOM 0
387
+ #if LV_SPRINTF_CUSTOM
388
+ # define LV_SPRINTF_INCLUDE <stdio.h>
389
+ # define lv_snprintf snprintf
390
+ # define lv_vsnprintf vsnprintf
391
+ #endif /*LV_SPRINTF_CUSTOM*/
392
+
294
393
/*===================
295
394
* LV_OBJ SETTINGS
296
395
*==================*/
@@ -349,6 +448,9 @@ typedef void * lv_obj_user_data_t;
349
448
/*Container (dependencies: -*/
350
449
#define LV_USE_CONT 1
351
450
451
+ /*Color picker (dependencies: -*/
452
+ #define LV_USE_CPICKER 1
453
+
352
454
/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/
353
455
#define LV_USE_DDLIST 1
354
456
#if LV_USE_DDLIST != 0
0 commit comments