oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
lv_conf_common.h
1/*
2 * Copyright (C) 2026 Kamil Lulko <kamil.lulko@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 *
6 * This file is part of oveRTOS.
7 */
8
9/*
10 * Shared LVGL v9 configuration fragment for all oveRTOS boards.
11 *
12 * Board-specific lv_conf.h files set board-only knobs (color depth, memory
13 * pool, OS, rendering buffers, default font, NuttX device flag) and then
14 * #include <ove/lv_conf_common.h> to pick up the widgets, themes, layouts,
15 * features, and other bits that are uniform across targets.
16 *
17 * Widget and layout enables live HERE so flipping a feature for one target
18 * automatically flips it for all eight boards, removing the 8× drift that
19 * otherwise happens every time a new binding wrapper lands.
20 *
21 * This file must not be included directly outside an lv_conf.h.
22 */
23
24#ifndef OVE_LV_CONF_COMMON_H
25#define OVE_LV_CONF_COMMON_H
26
27/*=========================
28 * STDLIB WRAPPER SETTINGS
29 *=========================*/
30
31#define LV_USE_STDLIB_MALLOC LV_STDLIB_BUILTIN
32#define LV_USE_STDLIB_STRING LV_STDLIB_BUILTIN
33#define LV_USE_STDLIB_SPRINTF LV_STDLIB_BUILTIN
34
35#define LV_STDINT_INCLUDE <stdint.h>
36#define LV_STDDEF_INCLUDE <stddef.h>
37#define LV_STDBOOL_INCLUDE <stdbool.h>
38#define LV_INTTYPES_INCLUDE <inttypes.h>
39#define LV_LIMITS_INCLUDE <limits.h>
40#define LV_STDARG_INCLUDE <stdarg.h>
41
42/*====================
43 * HAL SETTINGS
44 *====================*/
45
46#define LV_DEF_REFR_PERIOD 33 /* 30 FPS */
47#define LV_DPI_DEF 130
48
49/*=======================
50 * FEATURE CONFIGURATION
51 *=======================*/
52
53#define LV_USE_LOG 0
54#define LV_USE_ASSERT_NULL 1
55#define LV_USE_ASSERT_MALLOC 1
56#define LV_USE_ASSERT_STYLE 0
57#define LV_USE_ASSERT_MEM_INTEGRITY 0
58#define LV_USE_ASSERT_OBJ 0
59
60#define LV_ASSERT_HANDLER_INCLUDE <stdint.h>
61#define LV_ASSERT_HANDLER \
62 while (1) \
63 ;
64
65#define LV_USE_REFR_DEBUG 0
66#define LV_USE_LAYER_DEBUG 0
67#define LV_USE_PARALLEL_DRAW_DEBUG 0
68
69#define LV_ENABLE_GLOBAL_CUSTOM 0
70
71#define LV_CACHE_DEF_SIZE 0
72#define LV_IMAGE_HEADER_CACHE_DEF_CNT 0
73
74#define LV_GRADIENT_MAX_STOPS 2
75
76#define LV_COLOR_MIX_ROUND_OFS 0
77#define LV_OBJ_STYLE_CACHE 0
78#define LV_USE_OBJ_ID 0
79#define LV_OBJ_ID_AUTO_ASSIGN 0
80#define LV_USE_OBJ_ID_BUILTIN 1
81#define LV_USE_OBJ_NAME 0
82#define LV_USE_OBJ_PROPERTY 0
83#define LV_USE_OBJ_PROPERTY_NAME 0
84#define LV_USE_GESTURE_RECOGNITION 0
85
86/*========================
87 * RENDERING (common bits)
88 *========================*/
89
90/* SW renderer and its support flags live in the board file; these two are
91 * identical across every target. */
92#define LV_DRAW_BUF_STRIDE_ALIGN 1
93#define LV_DRAW_TRANSFORM_USE_MATRIX 0
94
95/* GPU drivers — all disabled; boards that want one can override after
96 * the include. */
97#define LV_USE_DRAW_SDL 0
98#define LV_USE_NEMA_GFX 0
99#define LV_USE_PXP 0
100#define LV_USE_G2D 0
101#define LV_USE_DRAW_DAVE2D 0
102#define LV_USE_DRAW_VG_LITE 0
103#define LV_USE_DRAW_DMA2D 0
104#define LV_USE_DRAW_OPENGLES 0
105#define LV_USE_PPA 0
106#define LV_USE_DRAW_EVE 0
107
108/*=====================
109 * COMPILER SETTINGS
110 *====================*/
111
112#define LV_BIG_ENDIAN_SYSTEM 0
113#define LV_ATTRIBUTE_TICK_INC
114#define LV_ATTRIBUTE_TIMER_HANDLER
115#define LV_ATTRIBUTE_FLUSH_READY
116#define LV_ATTRIBUTE_MEM_ALIGN_SIZE 1
117#define LV_ATTRIBUTE_MEM_ALIGN
118#define LV_ATTRIBUTE_LARGE_CONST
119#define LV_ATTRIBUTE_LARGE_RAM_ARRAY
120#define LV_ATTRIBUTE_FAST_MEM
121#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning
122#define LV_ATTRIBUTE_EXTERN_DATA
123#define LV_USE_FLOAT 0
124#define LV_USE_MATRIX 0
125
126/*==================
127 * FONT USAGE
128 *===================*/
129
130/* Only the sizes referenced by oveRTOS framework apps (apps/c/example,
131 * apps/c/lvgl_benchmark) and external apps (overtos_apps/hiroic): 14, 24, 32.
132 * The linker dead-strips unreferenced fonts already, but keeping the enable
133 * list honest avoids confusion when reading the config or running stripped-
134 * down builds where -Wl,--gc-sections is disabled. */
135#define LV_FONT_MONTSERRAT_8 0
136#define LV_FONT_MONTSERRAT_10 0
137#define LV_FONT_MONTSERRAT_12 0
138#define LV_FONT_MONTSERRAT_14 1
139#define LV_FONT_MONTSERRAT_16 0
140#define LV_FONT_MONTSERRAT_18 0
141#define LV_FONT_MONTSERRAT_20 0
142#define LV_FONT_MONTSERRAT_22 0
143#define LV_FONT_MONTSERRAT_24 1
144#define LV_FONT_MONTSERRAT_26 0
145#define LV_FONT_MONTSERRAT_28 0
146#define LV_FONT_MONTSERRAT_30 0
147#define LV_FONT_MONTSERRAT_32 1
148#define LV_FONT_MONTSERRAT_34 0
149#define LV_FONT_MONTSERRAT_36 0
150#define LV_FONT_MONTSERRAT_38 0
151#define LV_FONT_MONTSERRAT_40 0
152#define LV_FONT_MONTSERRAT_42 0
153#define LV_FONT_MONTSERRAT_44 0
154#define LV_FONT_MONTSERRAT_46 0
155#define LV_FONT_MONTSERRAT_48 0
156
157#define LV_FONT_MONTSERRAT_28_COMPRESSED 0
158#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0
159#define LV_FONT_SOURCE_HAN_SANS_SC_14_CJK 0
160#define LV_FONT_SOURCE_HAN_SANS_SC_16_CJK 0
161#define LV_FONT_UNSCII_8 0
162#define LV_FONT_UNSCII_16 0
163
164#define LV_FONT_CUSTOM_DECLARE
165
166/* LV_FONT_DEFAULT is board-specific: desktop boards pick montserrat_32,
167 * embedded boards pick montserrat_14. Define it in the including file
168 * before this fragment (either order works — no conflict). */
169
170#define LV_FONT_FMT_TXT_LARGE 0
171#define LV_USE_FONT_COMPRESSED 0
172#define LV_USE_FONT_PLACEHOLDER 1
173
174/*=================
175 * TEXT SETTINGS
176 *=================*/
177
178#define LV_TXT_ENC LV_TXT_ENC_UTF8
179#define LV_TXT_BREAK_CHARS " ,.;:-_)]}"
180#define LV_TXT_LINE_BREAK_LONG_LEN 0
181#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3
182#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
183#define LV_USE_BIDI 0
184#define LV_USE_ARABIC_PERSIAN_CHARS 0
185
186/*==================
187 * WIDGETS
188 *==================*/
189
190#define LV_WIDGETS_HAS_DEFAULT_VALUE 1
191
192#define LV_USE_ANIMIMG 0
193#define LV_USE_ARC 1
194#define LV_USE_BAR 1
195#define LV_USE_BUTTON 1
196#define LV_USE_BUTTONMATRIX 1
197#define LV_USE_CALENDAR 1
198#define LV_USE_CANVAS 1
199#define LV_USE_CHART 1
200#define LV_USE_CHECKBOX 1
201#define LV_USE_DROPDOWN 1
202#define LV_USE_IMAGE 1
203#define LV_USE_IMAGEBUTTON 0
204#define LV_USE_KEYBOARD 1
205#define LV_USE_LED 1
206#define LV_USE_LINE 1
207#define LV_USE_LIST 1
208#define LV_USE_LOTTIE 0
209#define LV_USE_MENU 0
210#define LV_USE_MSGBOX 1
211#define LV_USE_ROLLER 1
212#define LV_USE_SCALE 1
213#define LV_USE_SLIDER 1
214#define LV_USE_SPAN 0
215#define LV_USE_SPINBOX 1
216#define LV_USE_SPINNER 1
217#define LV_USE_SWITCH 1
218#define LV_USE_TEXTAREA 1
219#define LV_USE_TABLE 1
220#define LV_USE_TABVIEW 1
221#define LV_USE_TILEVIEW 0
222#define LV_USE_WIN 0
223
224#define LV_USE_LABEL 1
225#if LV_USE_LABEL
226#define LV_LABEL_TEXT_SELECTION 0
227#define LV_LABEL_LONG_TXT_HINT 0
228#define LV_LABEL_WAIT_CHAR_COUNT 3
229#endif
230
231/*==================
232 * THEMES
233 *==================*/
234
235#define LV_USE_THEME_DEFAULT 1
236#define LV_USE_THEME_SIMPLE 0
237#define LV_USE_THEME_MONO 0
238
239/*==================
240 * LAYOUTS
241 *==================*/
242
243#define LV_USE_FLEX 1
244#define LV_USE_GRID 1
245
246/*====================
247 * 3RD PARTY LIBRARIES
248 *====================*/
249
250#define LV_FS_DEFAULT_DRIVER_LETTER '\0'
251
252#define LV_USE_FS_STDIO 0
253#define LV_USE_FS_POSIX 0
254#define LV_USE_FS_WIN32 0
255#define LV_USE_FS_FATFS 0
256#define LV_USE_FS_MEMFS 0
257#define LV_USE_FS_LITTLEFS 0
258#define LV_USE_FS_ARDUINO_ESP_LITTLEFS 0
259#define LV_USE_FS_ARDUINO_SD 0
260
261#define LV_USE_LODEPNG 0
262#define LV_USE_LIBPNG 0
263#define LV_USE_BMP 0
264#define LV_USE_TJPGD 0
265#define LV_USE_LIBJPEG_TURBO 0
266#define LV_USE_GIF 0
267#define LV_BIN_DECODER_RAM_LOAD 0
268#define LV_USE_RLE 0
269#define LV_USE_QRCODE 0
270#define LV_USE_BARCODE 0
271#define LV_USE_FREETYPE 0
272#define LV_USE_TINY_TTF 0
273#define LV_USE_RLOTTIE 0
274#define LV_USE_VECTOR_GRAPHIC 0
275#define LV_USE_THORVG_INTERNAL 0
276#define LV_USE_THORVG_EXTERNAL 0
277#define LV_USE_LZ4_INTERNAL 0
278#define LV_USE_LZ4_EXTERNAL 0
279#define LV_USE_FFMPEG 0
280
281/*==================
282 * DEVICES (common — NuttX flag is board-specific)
283 *==================*/
284
285#define LV_USE_SDL 0
286#define LV_USE_X11 0
287#define LV_USE_WAYLAND 0
288#define LV_USE_LINUX_FBDEV 0
289#define LV_USE_LINUX_DRM 0
290#define LV_USE_TFT_ESPI 0
291#define LV_USE_EVDEV 0
292#define LV_USE_LIBINPUT 0
293#define LV_USE_ST7735 0
294#define LV_USE_ST7789 0
295#define LV_USE_ST7796 0
296#define LV_USE_ILI9341 0
297#define LV_USE_GENERIC_MIPI 0
298#define LV_USE_RENESAS_GLCDC 0
299#define LV_USE_WINDOWS 0
300#define LV_USE_OPENGLES 0
301#define LV_USE_QNX 0
302
303/* Boards that embed LVGL via the NuttX driver set LV_USE_NUTTX 1 before
304 * including this fragment; guard the default so the override sticks. */
305#ifndef LV_USE_NUTTX
306#define LV_USE_NUTTX 0
307#endif
308
309/*==================
310 * OTHERS
311 *==================*/
312
313#define LV_USE_SNAPSHOT 0
314#define LV_USE_SYSMON 1
315#if LV_USE_SYSMON
316#define LV_USE_PERF_MONITOR 1
317#if LV_USE_PERF_MONITOR
318#define LV_USE_PERF_MONITOR_POS LV_ALIGN_BOTTOM_RIGHT
319#define LV_USE_PERF_MONITOR_LOG_MODE 1
320#endif
321#endif
322#define LV_USE_PROFILER 0
323#define LV_USE_MONKEY 0
324#define LV_USE_GRIDNAV 0
325#define LV_USE_FRAGMENT 0
326#define LV_USE_IMGFONT 0
327#define LV_USE_OBSERVER 1
328#define LV_USE_IME_PINYIN 0
329#define LV_USE_FILE_EXPLORER 0
330
331/*==================
332 * EXAMPLES / DEMOS
333 *==================*/
334
335#define LV_BUILD_EXAMPLES 0
336#define LV_USE_DEMO_WIDGETS 0
337#define LV_USE_DEMO_KEYPAD_AND_ENCODER 0
338#ifndef LV_USE_DEMO_BENCHMARK
339#define LV_USE_DEMO_BENCHMARK 0
340#endif
341#define LV_USE_DEMO_RENDER 0
342#define LV_USE_DEMO_STRESS 0
343#define LV_USE_DEMO_MUSIC 0
344#define LV_USE_DEMO_FLEX_LAYOUT 0
345#define LV_USE_DEMO_MULTILANG 0
346#define LV_USE_DEMO_TRANSFORM 0
347#define LV_USE_DEMO_SCROLL 0
348#define LV_USE_DEMO_VECTOR_GRAPHIC 0
349
350#endif /* OVE_LV_CONF_COMMON_H */