lvgl: move the lvgl glue out of the zephyr tree
Start using the upstream Kconfig from LVGL and move the glue code out of the zephyr tree and put it under lvgl/zephyr/ in modules. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
This commit is contained in:
parent
1244a89a21
commit
6c190292c0
48 changed files with 117 additions and 3883 deletions
|
@ -400,7 +400,6 @@ Display drivers:
|
|||
- include/drivers/display.h
|
||||
- include/display/
|
||||
- include/drivers/display.h
|
||||
- lib/gui/
|
||||
- subsys/fb/
|
||||
- samples/subsys/display/
|
||||
labels:
|
||||
|
|
|
@ -71,8 +71,8 @@ config LVGL_VDB_SIZE
|
|||
config LVGL_DPI
|
||||
default 128
|
||||
|
||||
choice LVGL_COLOR_DEPTH
|
||||
default LVGL_COLOR_DEPTH_16
|
||||
choice LV_COLOR_DEPTH_BITS
|
||||
default LV_COLOR_DEPTH_16
|
||||
endchoice
|
||||
|
||||
endif # LVGL
|
||||
|
|
|
@ -71,8 +71,8 @@ config LVGL_VDB_SIZE
|
|||
config LVGL_DPI
|
||||
default 128
|
||||
|
||||
choice LVGL_COLOR_DEPTH
|
||||
default LVGL_COLOR_DEPTH_16
|
||||
choice LV_COLOR_DEPTH_BITS
|
||||
default LV_COLOR_DEPTH_16
|
||||
endchoice
|
||||
|
||||
endif # LVGL
|
||||
|
|
|
@ -65,8 +65,8 @@ config LVGL_VDB_SIZE
|
|||
config LVGL_DPI
|
||||
default 128
|
||||
|
||||
choice LVGL_COLOR_DEPTH
|
||||
default LVGL_COLOR_DEPTH_16
|
||||
choice LV_COLOR_DEPTH_BITS
|
||||
default LV_COLOR_DEPTH_16
|
||||
endchoice
|
||||
|
||||
endif # LVGL
|
||||
|
|
|
@ -28,8 +28,8 @@ endif # DISPLAY
|
|||
|
||||
if LVGL
|
||||
|
||||
choice LVGL_COLOR_DEPTH
|
||||
default LVGL_COLOR_DEPTH_1
|
||||
choice LV_COLOR_DEPTH_BITS
|
||||
default LV_COLOR_DEPTH_1
|
||||
endchoice
|
||||
|
||||
config LVGL_BITS_PER_PIXEL
|
||||
|
|
|
@ -36,8 +36,8 @@ config LVGL_VDB_SIZE
|
|||
config LVGL_BITS_PER_PIXEL
|
||||
default 24
|
||||
|
||||
choice LVGL_COLOR_DEPTH
|
||||
default LVGL_COLOR_DEPTH_32
|
||||
choice LV_COLOR_DEPTH_BITS
|
||||
default LV_COLOR_DEPTH_32
|
||||
endchoice
|
||||
|
||||
config KSCAN
|
||||
|
|
|
@ -33,11 +33,11 @@ config LVGL_VDB_SIZE
|
|||
config LVGL_BITS_PER_PIXEL
|
||||
default 16
|
||||
|
||||
choice LVGL_COLOR_DEPTH
|
||||
default LVGL_COLOR_DEPTH_16
|
||||
choice LV_COLOR_DEPTH_BITS
|
||||
default LV_COLOR_DEPTH_16
|
||||
endchoice
|
||||
|
||||
config LVGL_COLOR_16_SWAP
|
||||
config LV_COLOR_16_SWAP
|
||||
default y
|
||||
|
||||
config KSCAN
|
||||
|
|
|
@ -33,8 +33,8 @@ config LVGL_VDB_SIZE
|
|||
config LVGL_BITS_PER_PIXEL
|
||||
default 24
|
||||
|
||||
choice LVGL_COLOR_DEPTH
|
||||
default LVGL_COLOR_DEPTH_16
|
||||
choice LV_COLOR_DEPTH_BITS
|
||||
default LV_COLOR_DEPTH_16
|
||||
endchoice
|
||||
|
||||
config KSCAN
|
||||
|
|
|
@ -22,8 +22,8 @@ config LVGL_DPI
|
|||
config LVGL_BITS_PER_PIXEL
|
||||
default 1
|
||||
|
||||
choice LVGL_COLOR_DEPTH
|
||||
default LVGL_COLOR_DEPTH_1
|
||||
choice LV_COLOR_DEPTH_BITS
|
||||
default LV_COLOR_DEPTH_1
|
||||
endchoice
|
||||
|
||||
endif # LVGL
|
||||
|
|
|
@ -38,8 +38,8 @@ config LVGL_DPI
|
|||
config LVGL_BITS_PER_PIXEL
|
||||
default 1
|
||||
|
||||
choice LVGL_COLOR_DEPTH
|
||||
default LVGL_COLOR_DEPTH_1
|
||||
choice LV_COLOR_DEPTH_BITS
|
||||
default LV_COLOR_DEPTH_1
|
||||
endchoice
|
||||
|
||||
endif # LVGL
|
||||
|
|
|
@ -22,11 +22,11 @@ config LVGL_BITS_PER_PIXEL
|
|||
default 24 if SHIELD_ST7789V_TL019FQV01
|
||||
default 16 if SHIELD_ST7789V_WAVESHARE_240X240
|
||||
|
||||
choice LVGL_COLOR_DEPTH
|
||||
default LVGL_COLOR_DEPTH_16 if SHIELD_ST7789V_WAVESHARE_240X240
|
||||
choice LV_COLOR_DEPTH_BITS
|
||||
default LV_COLOR_DEPTH_16 if SHIELD_ST7789V_WAVESHARE_240X240
|
||||
endchoice
|
||||
|
||||
config LVGL_COLOR_16_SWAP
|
||||
config LV_COLOR_16_SWAP
|
||||
default y if SHIELD_ST7789V_WAVESHARE_240X240
|
||||
|
||||
endif # LVGL
|
||||
|
|
|
@ -34,8 +34,8 @@ config LVGL_DPI
|
|||
default 120 if SHIELD_WAVESHARE_EPAPER_GDEW042T2
|
||||
default 130
|
||||
|
||||
choice LVGL_COLOR_DEPTH
|
||||
default LVGL_COLOR_DEPTH_1
|
||||
choice LV_COLOR_DEPTH_BITS
|
||||
default LV_COLOR_DEPTH_1
|
||||
endchoice
|
||||
|
||||
config LVGL_BITS_PER_PIXEL
|
||||
|
|
|
@ -4,7 +4,6 @@ if(NOT CONFIG_EXTERNAL_LIBC)
|
|||
add_subdirectory(libc)
|
||||
add_subdirectory(posix)
|
||||
endif()
|
||||
add_subdirectory(gui)
|
||||
add_subdirectory(os)
|
||||
add_subdirectory(util)
|
||||
add_subdirectory_ifdef(CONFIG_SMF smf)
|
||||
|
|
|
@ -5,8 +5,6 @@ source "lib/libc/Kconfig"
|
|||
|
||||
menu "Additional libraries"
|
||||
|
||||
source "lib/gui/Kconfig"
|
||||
|
||||
source "lib/os/Kconfig"
|
||||
|
||||
source "lib/posix/Kconfig"
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
add_subdirectory_ifdef(CONFIG_LVGL lvgl)
|
|
@ -1,4 +0,0 @@
|
|||
# Copyright (c) 2018 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
rsource "lvgl/Kconfig"
|
|
@ -1,18 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_interface_library_named(lvgl)
|
||||
|
||||
target_include_directories(lvgl INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
zephyr_library()
|
||||
|
||||
zephyr_library_sources(lvgl.c)
|
||||
zephyr_library_sources(lvgl_display.c)
|
||||
zephyr_library_sources(lvgl_display_mono.c)
|
||||
zephyr_library_sources(lvgl_display_16bit.c)
|
||||
zephyr_library_sources(lvgl_display_24bit.c)
|
||||
zephyr_library_sources(lvgl_display_32bit.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_LVGL_USE_FILESYSTEM lvgl_fs.c)
|
||||
zephyr_library_sources_ifdef(CONFIG_LVGL_MEM_POOL_SYS_HEAP lvgl_mem.c)
|
||||
|
||||
zephyr_library_link_libraries(lvgl)
|
|
@ -1,35 +0,0 @@
|
|||
# Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menuconfig LVGL
|
||||
bool "LittlevGL GUI library"
|
||||
help
|
||||
This option enables the LittlevGL GUI library.
|
||||
|
||||
if LVGL
|
||||
|
||||
module = LVGL
|
||||
module-str = lvgl
|
||||
source "subsys/logging/Kconfig.template.log_config"
|
||||
|
||||
config APP_LINK_WITH_LVGL
|
||||
bool "Link 'app' with LVGL"
|
||||
default y
|
||||
help
|
||||
Add LVGL header files to the 'app' include path. It may be
|
||||
disabled if the include paths for LVGL are causing aliasing
|
||||
issues for 'app'.
|
||||
|
||||
rsource "Kconfig.graphical"
|
||||
rsource "Kconfig.memory"
|
||||
rsource "Kconfig.input"
|
||||
rsource "Kconfig.feature"
|
||||
rsource "Kconfig.image"
|
||||
rsource "Kconfig.debug"
|
||||
rsource "Kconfig.themes"
|
||||
rsource "Kconfig.fonts"
|
||||
rsource "Kconfig.text"
|
||||
rsource "Kconfig.objects"
|
||||
|
||||
endif # LVGL
|
|
@ -1,75 +0,0 @@
|
|||
# Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menu "Debug settings"
|
||||
|
||||
config LVGL_USE_DEBUG
|
||||
bool "Enable debug support"
|
||||
default y if TEST
|
||||
help
|
||||
Enable debug support.
|
||||
|
||||
If debug support is enabled LVGL will validate the parameters of
|
||||
any function call made and if an invalid parameter is found __ASSERT
|
||||
is called.
|
||||
|
||||
if LVGL_USE_DEBUG
|
||||
|
||||
config LVGL_USE_ASSERT_NULL
|
||||
bool "Enable null pointer assertion"
|
||||
default y if TEST
|
||||
help
|
||||
Enable null pointer assertion
|
||||
|
||||
Check if a null pointer is passed as a parameter (Quite fast)
|
||||
|
||||
config LVGL_USE_ASSERT_MEM
|
||||
bool "Enable memory allocation assertion"
|
||||
default y if TEST
|
||||
help
|
||||
Enable memory allocation assertion
|
||||
|
||||
Check if memory allocation is successful (Quite fast)
|
||||
|
||||
config LVGL_USE_ASSERT_MEM_INTEGRITY
|
||||
bool "Enable memory integrity check"
|
||||
default y if TEST
|
||||
help
|
||||
Check the integrity of lv_mem after critical operations. (Slow)
|
||||
|
||||
config LVGL_USE_ASSERT_STR
|
||||
bool "Enable string assertion"
|
||||
default y if TEST
|
||||
help
|
||||
Enable string assertion
|
||||
|
||||
Check if the string is not a NULL pointer, unusually long string,
|
||||
contains invalid characters or contains unusual repetitions. (Slow)
|
||||
|
||||
If this option is disabled and NULL pointer checking is enabled, the
|
||||
NULL pointer check is executed instead.
|
||||
|
||||
config LVGL_USE_ASSERT_OBJ
|
||||
bool "Enable object assertion"
|
||||
default y if TEST
|
||||
help
|
||||
Enable object assertion
|
||||
|
||||
Check if an object is not a NULL pointer, has the correct type and
|
||||
does exists. (Quite Slow)
|
||||
|
||||
If this option is disabled and NULL pointer checking is enabled, the
|
||||
NULL pointer check is executed instead.
|
||||
|
||||
config LVGL_USE_ASSERT_STYLE
|
||||
bool "Enable style assertion"
|
||||
default y if TEST
|
||||
help
|
||||
Enable style assertion
|
||||
|
||||
Check if a used style is correctly initialized. (Fast)
|
||||
|
||||
endif
|
||||
|
||||
endmenu
|
|
@ -1,89 +0,0 @@
|
|||
# Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menu "Feature usage"
|
||||
|
||||
config LVGL_USE_ANIMATION
|
||||
bool "Enable animations"
|
||||
help
|
||||
Enable animations
|
||||
|
||||
config LVGL_USE_SHADOW
|
||||
bool "Enable shadows"
|
||||
help
|
||||
Enable shadows
|
||||
|
||||
config LVGL_SHADOW_CACHE_SIZE
|
||||
int "Shadow cache size"
|
||||
depends on LVGL_USE_SHADOW
|
||||
default 0
|
||||
help
|
||||
Allow buffering some shadow calculation. This parameter is the maximum
|
||||
shadow size to buffer.
|
||||
|
||||
config LVGL_USE_OUTLINE
|
||||
bool "Enable outline drawing on rectangles"
|
||||
help
|
||||
Enable outline drawing on rectangles
|
||||
|
||||
config LVGL_USE_PATTERN
|
||||
bool "Enable pattern drawing on rectangles"
|
||||
help
|
||||
Enable pattern drawing on rectangles
|
||||
|
||||
config LVGL_USE_VALUE_STR
|
||||
bool "Enable value string drawing on rectangles"
|
||||
help
|
||||
Enable value string drawing on rectangles
|
||||
|
||||
config LVGL_USE_BLEND_MODES
|
||||
bool "Enable other blend modes"
|
||||
help
|
||||
Use other blend modes than normal
|
||||
|
||||
config LVGL_USE_OPA_SCALE
|
||||
bool "Enable opa_scale style property"
|
||||
help
|
||||
Use the opa_scale style property to set the opacity of an object and
|
||||
its children at once
|
||||
|
||||
config LVGL_USE_IMG_TRANSFORM
|
||||
bool "Enable image transformations"
|
||||
help
|
||||
Use image zoom and rotation
|
||||
|
||||
config LVGL_USE_GROUP
|
||||
bool "Enable group support"
|
||||
help
|
||||
Enable group support.
|
||||
Used by keyboard and button input
|
||||
|
||||
config LVGL_USE_GPU
|
||||
bool "Enable GPU support"
|
||||
help
|
||||
Enable GPU support
|
||||
|
||||
config LVGL_USE_FILESYSTEM
|
||||
bool "Enable file system"
|
||||
depends on FILE_SYSTEM
|
||||
default y if FILE_SYSTEM
|
||||
help
|
||||
Enable LittlevGL file system
|
||||
|
||||
config LVGL_USE_PERF_MONITOR
|
||||
bool "Enable performance monitor"
|
||||
help
|
||||
Show CPU usage and FPS count in the right bottom corner
|
||||
|
||||
config LVGL_USE_API_EXTENSION_V6
|
||||
bool "Enable V6 API extensions"
|
||||
help
|
||||
Use the functions and types from the older API if possible
|
||||
|
||||
config LVGL_USE_API_EXTENSION_V7
|
||||
bool "Enable V7 API extensions"
|
||||
help
|
||||
Use the functions and types from the older API if possible
|
||||
|
||||
endmenu
|
|
@ -1,156 +0,0 @@
|
|||
# Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menu "Fonts"
|
||||
|
||||
config LVGL_USE_FONT_COMPRESSED
|
||||
bool "Enable compressed font support"
|
||||
help
|
||||
Enable support for compressed fonts. If it's disabled, compressed
|
||||
glyphs cannot be processed by the library and won't be rendered.
|
||||
|
||||
config LVGL_USE_FONT_SUBPX
|
||||
bool "Enable sub-pixel rendering"
|
||||
help
|
||||
Enable sub-pixel rendering
|
||||
|
||||
config LVGL_FONT_SUBPX_BGR
|
||||
bool "Use BGR instead RGB for sub-pixel rendering"
|
||||
depends on LVGL_USE_FONT_SUBPX
|
||||
help
|
||||
User BGR pixel format instead of RGB for sub-pixel rendering
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_8
|
||||
bool "Enable Montserrat 8px font"
|
||||
help
|
||||
Enable Montserrat font support, size 8 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_10
|
||||
bool "Enable Montserrat 10px font"
|
||||
help
|
||||
Enable Montserrat font support, size 10 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_12
|
||||
bool "Enable Montserrat 12px font"
|
||||
help
|
||||
Enable Montserrat font support, size 12 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_14
|
||||
bool "Enable Montserrat 14px font"
|
||||
help
|
||||
Enable Montserrat font support, size 14 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_16
|
||||
bool "Enable Montserrat 16px font"
|
||||
help
|
||||
Enable Montserrat font support, size 16 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_18
|
||||
bool "Enable Montserrat 18px font"
|
||||
help
|
||||
Enable Montserrat font support, size 18 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_20
|
||||
bool "Enable Montserrat 20px font"
|
||||
help
|
||||
Enable Montserrat font support, size 20 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_22
|
||||
bool "Enable Montserrat 22px font"
|
||||
help
|
||||
Enable Montserrat font support, size 22 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_24
|
||||
bool "Enable Montserrat 24px font"
|
||||
help
|
||||
Enable Montserrat font support, size 24 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_26
|
||||
bool "Enable Montserrat 26px font"
|
||||
help
|
||||
Enable Montserrat font support, size 26 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_28
|
||||
bool "Enable Montserrat 28px font"
|
||||
help
|
||||
Enable Montserrat font support, size 28 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_30
|
||||
bool "Enable Montserrat 30px font"
|
||||
help
|
||||
Enable Montserrat font support, size 30 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_32
|
||||
bool "Enable Montserrat 32px font"
|
||||
help
|
||||
Enable Montserrat font support, size 32 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_34
|
||||
bool "Enable Montserrat 34px font"
|
||||
help
|
||||
Enable Montserrat font support, size 34 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_36
|
||||
bool "Enable Montserrat 36px font"
|
||||
help
|
||||
Enable Montserrat font support, size 36 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_38
|
||||
bool "Enable Montserrat 38px font"
|
||||
help
|
||||
Enable Montserrat font support, size 38 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_40
|
||||
bool "Enable Montserrat 40px font"
|
||||
help
|
||||
Enable Montserrat font support, size 40 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_42
|
||||
bool "Enable Montserrat 42px font"
|
||||
help
|
||||
Enable Montserrat font support, size 42 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_44
|
||||
bool "Enable Montserrat 44px font"
|
||||
help
|
||||
Enable Montserrat font support, size 44 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_46
|
||||
bool "Enable Montserrat 46px font"
|
||||
help
|
||||
Enable Montserrat font support, size 46 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_48
|
||||
bool "Enable Montserrat 48px font"
|
||||
help
|
||||
Enable Montserrat font support, size 48 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_12_SUBPX
|
||||
bool "Enable Montserrat 12px font with sub-pixel rendering"
|
||||
help
|
||||
Enable Montserrat font support with sub-pixel rendering, size 12 pixels
|
||||
|
||||
config LVGL_FONT_MONTSERRAT_28_COMPRESSED
|
||||
bool "Enable Montserrat 28px compressed font"
|
||||
help
|
||||
Enable Montserrat compressed font support, size 28 pixels
|
||||
|
||||
config LVGL_FONT_DEJAVU_16_PERSIAN_HEBREW
|
||||
bool "Enable Dejavu 16px font with Hebrew, Arabic and Persian letters"
|
||||
help
|
||||
Enable Dejavu font support, size 16 pixels, Hebrew, Arabic, Perisan
|
||||
letters and all their forms
|
||||
|
||||
config LVGL_FONT_SIMSUN_16_CJK
|
||||
bool "Enable Simsun 16px font with CJK radicals"
|
||||
help
|
||||
Enable Simsun font support, size 16 pixels, 1000 most common CJK
|
||||
radicals
|
||||
|
||||
config LVGL_FONT_UNSCII_8
|
||||
bool "Enable Unscii 8px monospace fonts"
|
||||
default y
|
||||
help
|
||||
Enable Unscii monospace font support, size 8 pixels
|
||||
|
||||
endmenu
|
|
@ -1,142 +0,0 @@
|
|||
# Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menu "Graphical settings"
|
||||
|
||||
DT_CHOSEN_ZEPHYR_DISPLAY := zephyr,display
|
||||
DT_CZD_PATH:= $(dt_chosen_path,$(DT_CHOSEN_ZEPHYR_DISPLAY))
|
||||
DT_CZD_HOR_RES_MAX := $(dt_node_int_prop_int,$(DT_CZD_PATH),width)
|
||||
DT_CZD_VER_RES_MAX := $(dt_node_int_prop_int,$(DT_CZD_PATH),height)
|
||||
|
||||
config LVGL_DISPLAY_DEV_NAME
|
||||
string "Display device name"
|
||||
default "$(dt_chosen_label,$(DT_CHOSEN_ZEPHYR_DISPLAY))" if HAS_DTS
|
||||
default "DISPLAY"
|
||||
help
|
||||
Name of the display device to use for rendering.
|
||||
|
||||
config LVGL_HOR_RES_MAX
|
||||
int "Horizontal Screen Resolution"
|
||||
default "$(DT_CZD_HOR_RES_MAX)" if HAS_DTS
|
||||
default 480
|
||||
help
|
||||
Horizontal screen resolution in pixels
|
||||
|
||||
config LVGL_VER_RES_MAX
|
||||
int "Vertical Screen Resolution"
|
||||
default "$(DT_CZD_VER_RES_MAX)" if HAS_DTS
|
||||
default 320
|
||||
help
|
||||
Vertical screen resolution in pixels
|
||||
|
||||
choice LVGL_COLOR_DEPTH
|
||||
prompt "Color Depth"
|
||||
default LVGL_COLOR_DEPTH_32
|
||||
help
|
||||
Color depth to be used by library
|
||||
|
||||
config LVGL_COLOR_DEPTH_32
|
||||
bool "32-bit"
|
||||
|
||||
config LVGL_COLOR_DEPTH_16
|
||||
bool "16-bit"
|
||||
|
||||
config LVGL_COLOR_DEPTH_8
|
||||
bool "8-bit"
|
||||
|
||||
config LVGL_COLOR_DEPTH_1
|
||||
bool "1-bit"
|
||||
|
||||
endchoice
|
||||
|
||||
config LVGL_COLOR_16_SWAP
|
||||
bool "RGB565 byte swap"
|
||||
depends on LVGL_COLOR_DEPTH_16
|
||||
help
|
||||
Swap the 2 bytes of a RGB565 pixel.
|
||||
|
||||
config LVGL_COLOR_SCREEN_TRANSP
|
||||
bool "Transparency support"
|
||||
depends on LVGL_COLOR_DEPTH_32
|
||||
help
|
||||
Enable screen transparency. Useful for OSD or other overlapping GUISs.
|
||||
|
||||
choice
|
||||
prompt "Chroma key color"
|
||||
default LVGL_COLOR_TRANSP_GREEN
|
||||
help
|
||||
Color to to use as chroma key
|
||||
|
||||
config LVGL_COLOR_TRANSP_RED
|
||||
bool "Red"
|
||||
|
||||
config LVGL_COLOR_TRANSP_GREEN
|
||||
bool "Green"
|
||||
|
||||
config LVGL_COLOR_TRANSP_BLUE
|
||||
bool "Blue"
|
||||
|
||||
config LVGL_COLOR_TRANSP_CUSTOM
|
||||
bool "Custom"
|
||||
|
||||
endchoice
|
||||
|
||||
if LVGL_COLOR_TRANSP_CUSTOM
|
||||
|
||||
config LVGL_CUSTOM_COLOR_TRANSP_RED
|
||||
hex "Chroma Key Red"
|
||||
range 0x00 0xFF
|
||||
default 0x00
|
||||
help
|
||||
Value of the color red to be used in the chroma key
|
||||
|
||||
config LVGL_CUSTOM_COLOR_TRANSP_GREEN
|
||||
hex "Chroma Key Green"
|
||||
range 0x00 0xFF
|
||||
default 0xFF
|
||||
help
|
||||
Value of the color green to be used in the chroma key
|
||||
|
||||
config LVGL_CUSTOM_COLOR_TRANSP_BLUE
|
||||
hex "Chroma Key Blue"
|
||||
range 0x00 0xFF
|
||||
default 0x00
|
||||
help
|
||||
Value of the color blue to be used in the chroma key
|
||||
|
||||
endif # LVGL_COLOR_TRANSP_CUSTOM
|
||||
|
||||
config LVGL_ANTIALIAS
|
||||
bool "Enable anti-aliasing"
|
||||
help
|
||||
Enable anti-aliasing
|
||||
|
||||
config LVGL_DPI
|
||||
int "DPI"
|
||||
default 130
|
||||
help
|
||||
Dots per inch (DPI)
|
||||
|
||||
config LVGL_DISP_SMALL_LIMIT
|
||||
int "Small display limit"
|
||||
default 30
|
||||
help
|
||||
According to the width of the display (hor. res. / dpi) the displays fall
|
||||
in 4 categories. This limit is the threshold for small displays.
|
||||
|
||||
config LVGL_DISP_MEDIUM_LIMIT
|
||||
int "Medium display limit"
|
||||
default 50
|
||||
help
|
||||
According to the width of the display (hor. res. / dpi) the displays fall
|
||||
in 4 categories. This limit is the threshold for medium displays.
|
||||
|
||||
config LVGL_DISP_LARGE_LIMIT
|
||||
int "Large display limit"
|
||||
default 70
|
||||
help
|
||||
According to the width of the display (hor. res. / dpi) the displays fall
|
||||
in 4 categories. This limit is the threshold for large displays.
|
||||
|
||||
endmenu
|
|
@ -1,29 +0,0 @@
|
|||
# Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menu "Image decoder and cache"
|
||||
|
||||
config LVGL_IMG_CF_INDEXED
|
||||
bool "Enable indexed image support"
|
||||
default y
|
||||
help
|
||||
Enable support for indexed images
|
||||
|
||||
config LVGL_IMG_CF_ALPHA
|
||||
bool "Enable alpha indexed image support"
|
||||
default y
|
||||
help
|
||||
Enable support for alpha indexed images
|
||||
|
||||
config LVGL_IMG_CACHE_DEF_SIZE
|
||||
int "Default image cache size"
|
||||
default 1
|
||||
help
|
||||
Default image cache size, image caching keeps the images open.
|
||||
If only the built-in image formats are used there is no real
|
||||
advantage of caching. With complex image decoders (e.g. PNG or JPG)
|
||||
caching can save the continuous decoding of images. However the
|
||||
opened images might consume additional RAM.
|
||||
|
||||
endmenu
|
|
@ -1,47 +0,0 @@
|
|||
# Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menu "Input device settings"
|
||||
|
||||
config LVGL_POINTER_KSCAN
|
||||
bool "Keyboard scan pointer input"
|
||||
depends on KSCAN
|
||||
help
|
||||
Enable keyboard scan pointer input
|
||||
|
||||
if LVGL_POINTER_KSCAN
|
||||
|
||||
config LVGL_POINTER_KSCAN_DEV_NAME
|
||||
string "Keyboard scan device name for pointer input"
|
||||
default "KSCAN"
|
||||
help
|
||||
Name of the keyboard scan device to use for pointer input.
|
||||
|
||||
config LVGL_POINTER_KSCAN_MSGQ_COUNT
|
||||
int "Keyboard scan message queue count maximum"
|
||||
default 10
|
||||
help
|
||||
Maximum number of items in the keyboard scan message queue.
|
||||
|
||||
config LVGL_POINTER_KSCAN_SWAP_XY
|
||||
bool "Swap keyboard scan X,Y axes"
|
||||
help
|
||||
Swap keyboard scan X,Y axes. This option can be used to align keyboard
|
||||
scan coordinates with the display.
|
||||
|
||||
config LVGL_POINTER_KSCAN_INVERT_X
|
||||
bool "Invert keyboard scan X axis"
|
||||
help
|
||||
Invert keyboard scan X axis. This option can be used to align keyboard
|
||||
scan coordinates with the display.
|
||||
|
||||
config LVGL_POINTER_KSCAN_INVERT_Y
|
||||
bool "Invert keyboard scan Y axis"
|
||||
help
|
||||
Invert keyboard scan Y axis. This option can be used to align keyboard
|
||||
scan coordinates with the display.
|
||||
|
||||
endif # LVGL_POINTER_KSCAN
|
||||
|
||||
endmenu
|
|
@ -1,93 +0,0 @@
|
|||
# Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menu "Memory manager settings"
|
||||
|
||||
config LVGL_BITS_PER_PIXEL
|
||||
int "Bits per pixel"
|
||||
default 32
|
||||
range 1 32
|
||||
depends on LVGL_BUFFER_ALLOC_STATIC
|
||||
help
|
||||
Number of bits per pixel.
|
||||
|
||||
choice
|
||||
prompt "Memory pool"
|
||||
default LVGL_MEM_POOL_SYS_HEAP
|
||||
help
|
||||
Memory pool to use for lvgl allocated objects
|
||||
|
||||
config LVGL_MEM_POOL_HEAP_LIB_C
|
||||
bool "C library Heap"
|
||||
depends on !MINIMAL_LIBC || (MINIMAL_LIBC_MALLOC_ARENA_SIZE != 0)
|
||||
help
|
||||
Use C library malloc and free to allocate objects on the C library heap
|
||||
|
||||
config LVGL_MEM_POOL_SYS_HEAP
|
||||
bool "User space lvgl pool"
|
||||
help
|
||||
Use a dedicated memory pool from a private sys heap.
|
||||
|
||||
endchoice
|
||||
|
||||
if LVGL_MEM_POOL_SYS_HEAP
|
||||
|
||||
config LVGL_MEM_POOL_MIN_SIZE
|
||||
int "Minimum memory pool block size"
|
||||
default 16
|
||||
help
|
||||
Size of the smallest block in the memory pool in bytes
|
||||
|
||||
config LVGL_MEM_POOL_MAX_SIZE
|
||||
int "Maximum memory pool block size"
|
||||
default 2048
|
||||
help
|
||||
Size of the largest block in the memory pool in bytes
|
||||
|
||||
config LVGL_MEM_POOL_NUMBER_BLOCKS
|
||||
int "Number of max size blocks in memory pool"
|
||||
default 1
|
||||
help
|
||||
Number of maximum sized blocks in the memory pool.
|
||||
|
||||
endif
|
||||
|
||||
config LVGL_VDB_SIZE
|
||||
int "Rendering buffer size"
|
||||
default 10
|
||||
range 1 100
|
||||
help
|
||||
Size of the buffer used for rendering screen content as a percentage
|
||||
of total display size.
|
||||
|
||||
config LVGL_DOUBLE_VDB
|
||||
bool "Use two rendering buffers"
|
||||
help
|
||||
Use two buffers to render and flush data in parallel
|
||||
|
||||
choice
|
||||
prompt "Rendering Buffer Allocation"
|
||||
default LVGL_BUFFER_ALLOC_STATIC
|
||||
help
|
||||
Type of allocation that should be used for allocating rendering buffers
|
||||
|
||||
config LVGL_BUFFER_ALLOC_STATIC
|
||||
bool "Static"
|
||||
help
|
||||
Rendering buffers are statically allocated based on the following
|
||||
configuration parameters:
|
||||
* Horizontal screen resolution
|
||||
* Vertical screen resolution
|
||||
* Rendering buffer size
|
||||
* Bytes per pixel
|
||||
|
||||
config LVGL_BUFFER_ALLOC_DYNAMIC
|
||||
bool "Dynamic"
|
||||
help
|
||||
Rendering buffers are dynamically allocated based on the actual
|
||||
display parameters
|
||||
|
||||
endchoice
|
||||
|
||||
endmenu
|
|
@ -1,385 +0,0 @@
|
|||
# Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menu "Objects"
|
||||
|
||||
config LVGL_USE_OBJ_REALIGN
|
||||
bool "Object realign support"
|
||||
help
|
||||
Enable object realign support
|
||||
|
||||
choice
|
||||
prompt "Extend objects clickable area"
|
||||
default LVGL_EXT_CLICK_AREA_OFF
|
||||
|
||||
config LVGL_EXT_CLICK_AREA_OFF
|
||||
bool "Disabled"
|
||||
|
||||
config LVGL_EXT_CLICK_AREA_TINY
|
||||
bool "Only horizontally and vertical"
|
||||
|
||||
config LVGL_EXT_CLICK_AREA_FULL
|
||||
bool "Full flexibility"
|
||||
endchoice
|
||||
|
||||
config LVGL_USE_ARC
|
||||
bool "Arc Object"
|
||||
help
|
||||
Enable arc object support
|
||||
|
||||
config LVGL_USE_BAR
|
||||
bool "Bar object"
|
||||
help
|
||||
Enable bar object support
|
||||
|
||||
config LVGL_USE_BTN
|
||||
bool "Button object"
|
||||
depends on LVGL_USE_CONT
|
||||
help
|
||||
Enable button object support
|
||||
|
||||
config LVGL_USE_BTNMATRIX
|
||||
bool "Button Matrix object"
|
||||
help
|
||||
Enable button matrix object support
|
||||
|
||||
config LVGL_USE_CALENDAR
|
||||
bool "Calendar object"
|
||||
help
|
||||
Enable calendar object support
|
||||
|
||||
config LVGL_CALENDAR_WEEK_STARTS_MONDAY
|
||||
bool "Calendar week starts on Monday"
|
||||
depends on LVGL_USE_CALENDAR
|
||||
help
|
||||
Start a calendar week on Monday
|
||||
|
||||
config LVGL_USE_CANVAS
|
||||
bool "Canvas object"
|
||||
depends on LVGL_USE_IMG
|
||||
help
|
||||
Enabled canvas object support
|
||||
|
||||
config LVGL_USE_CHART
|
||||
bool "Chart object"
|
||||
help
|
||||
Enable chart object support
|
||||
|
||||
config LVGL_CHART_AXIS_TICK_LABEL_MAX_LEN
|
||||
int "Maximum length of axis label"
|
||||
default 256
|
||||
depends on LVGL_USE_CHART
|
||||
help
|
||||
Maximum length of axis label
|
||||
|
||||
config LVGL_USE_CHECKBOX
|
||||
bool "Check box object"
|
||||
depends on LVGL_USE_BTN && LVGL_USE_LABEL
|
||||
help
|
||||
Enable check box object support
|
||||
|
||||
config LVGL_USE_CONT
|
||||
bool "Container Object"
|
||||
help
|
||||
Enable container object support
|
||||
|
||||
config LVGL_USE_CPICKER
|
||||
bool "Color picker object"
|
||||
help
|
||||
Enable color picker object support
|
||||
|
||||
config LVGL_USE_DROPDOWN
|
||||
bool "Drop Down List object"
|
||||
depends on LVGL_USE_LABEL && LVGL_USE_PAGE
|
||||
help
|
||||
Enable drop down list object support
|
||||
|
||||
config LVGL_DROPDOWN_DEF_ANIM_TIME
|
||||
int "Drop Down list animation time"
|
||||
default 200
|
||||
depends on LVGL_USE_DROPDOWN
|
||||
help
|
||||
Drop down list animation time in milliseconds
|
||||
|
||||
config LVGL_USE_GAUGE
|
||||
bool "Gauge object"
|
||||
depends on LVGL_USE_BAR && LVGL_USE_LINEMETER
|
||||
help
|
||||
Enable gauge object support
|
||||
|
||||
config LVGL_USE_IMG
|
||||
bool "Image Object"
|
||||
depends on LVGL_USE_LABEL
|
||||
help
|
||||
Enable image object support
|
||||
|
||||
config LVGL_USE_IMGBTN
|
||||
bool "Image Button"
|
||||
depends on LVGL_USE_BTN
|
||||
help
|
||||
Enable image button object support
|
||||
|
||||
config LVGL_IMGBTN_TILED
|
||||
bool "Image button tile support"
|
||||
depends on LVGL_USE_IMGBTN
|
||||
help
|
||||
Enable tile support for image button
|
||||
|
||||
config LVGL_USE_KEYBOARD
|
||||
bool "Keyboard object"
|
||||
depends on LVGL_USE_BTNMATRIX
|
||||
help
|
||||
Enable keyboard object support
|
||||
|
||||
config LVGL_USE_LABEL
|
||||
bool "Label Object"
|
||||
help
|
||||
Enable label support
|
||||
|
||||
if LVGL_USE_LABEL
|
||||
|
||||
config LVGL_LABEL_TEXT_SEL
|
||||
bool "Enable label text selection"
|
||||
help
|
||||
Enable label text selection
|
||||
|
||||
config LVGL_LABEL_LONG_TXT_HINT
|
||||
bool "Enable long text hint for labels"
|
||||
help
|
||||
Enable support for long text hints
|
||||
|
||||
endif # LVGL_USE_LABEL
|
||||
|
||||
config LVGL_USE_LED
|
||||
bool "LED object"
|
||||
help
|
||||
Enable LED object support
|
||||
|
||||
if LVGL_USE_LED
|
||||
|
||||
config LVGL_LED_BRIGHT_MIN
|
||||
int "LED minimum brightness"
|
||||
default 120
|
||||
help
|
||||
LED minimum brightness
|
||||
|
||||
config LVGL_LED_BRIGHT_MAX
|
||||
int "LED maximum brightness"
|
||||
default 255
|
||||
help
|
||||
LED maximum brightness
|
||||
|
||||
endif # LVGL_USE_LED
|
||||
|
||||
config LVGL_USE_LINE
|
||||
bool "Line Object"
|
||||
help
|
||||
Enable line object support
|
||||
|
||||
config LVGL_USE_LINEMETER
|
||||
bool "Line meter object"
|
||||
help
|
||||
Enable line meter object support
|
||||
|
||||
if LVGL_USE_LINEMETER
|
||||
|
||||
choice
|
||||
prompt "Line meter drawing precision"
|
||||
default LVGL_LINEMETER_PRECISE_NO_EXTRA
|
||||
|
||||
config LVGL_LINEMETER_PRECISE_NO_EXTRA
|
||||
bool "No extra precision"
|
||||
|
||||
config LVGL_LINEMETER_PRECISE_SOME_EXTRA
|
||||
bool "Some extra precision"
|
||||
|
||||
config LVGL_LINEMETER_PRECISE_BEST
|
||||
bool "Best precision"
|
||||
endchoice
|
||||
|
||||
endif # LVGL_USE_LINEMETER
|
||||
|
||||
config LVGL_USE_LIST
|
||||
bool "List object"
|
||||
depends on LVGL_USE_BTN && LVGL_USE_LABEL && LVGL_USE_PAGE
|
||||
help
|
||||
Enable list object support
|
||||
|
||||
config LVGL_LIST_DEF_ANIM_TIME
|
||||
int "List focus default animation time"
|
||||
default 100
|
||||
depends on LVGL_USE_LIST
|
||||
help
|
||||
List focus default animation time in milliseconds
|
||||
|
||||
config LVGL_USE_MSGBOX
|
||||
bool "Message box object"
|
||||
depends on LVGL_USE_BTNMATRIX && LVGL_USE_LABEL
|
||||
help
|
||||
Enable message box object support
|
||||
|
||||
config LVGL_USE_OBJMASK
|
||||
bool "Mask object"
|
||||
help
|
||||
Enable object mask support
|
||||
|
||||
config LVGL_USE_PAGE
|
||||
bool "Page object"
|
||||
depends on LVGL_USE_CONT
|
||||
help
|
||||
Enable page object support
|
||||
|
||||
config LVGL_PAGE_DEF_ANIM_TIME
|
||||
int "Default page focus animation time"
|
||||
default 400
|
||||
depends on LVGL_USE_PAGE
|
||||
help
|
||||
Default page focus animation time in milliseconds
|
||||
|
||||
config LVGL_USE_ROLLER
|
||||
bool "Roller object"
|
||||
depends on LVGL_USE_DROPDOWN
|
||||
help
|
||||
Enable roller object support
|
||||
|
||||
if LVGL_USE_ROLLER
|
||||
|
||||
config LVGL_ROLLER_DEF_ANIM_TIME
|
||||
int "Roller animation time"
|
||||
default 200
|
||||
help
|
||||
Roller animation time in milliseconds
|
||||
|
||||
config LVGL_ROLLER_INF_PAGES
|
||||
int "Number of pages for infinite roller"
|
||||
default 7
|
||||
help
|
||||
Number of extra pages in case the roller is infinite
|
||||
|
||||
endif # LVGL_USE_ROLLER
|
||||
|
||||
config LVGL_USE_SLIDER
|
||||
bool "Slider object"
|
||||
depends on LVGL_USE_BAR
|
||||
help
|
||||
Enable slider object support
|
||||
|
||||
config LVGL_USE_SPINBOX
|
||||
bool "Spinbox object"
|
||||
depends on LVGL_USE_TEXTAREA
|
||||
help
|
||||
Enable spinbox object support
|
||||
|
||||
config LVGL_USE_SPINNER
|
||||
bool "Spinner object"
|
||||
depends on LVGL_USE_ARC
|
||||
help
|
||||
Enable spinner object support
|
||||
|
||||
if LVGL_USE_SPINNER
|
||||
|
||||
config LVGL_SPINNER_DEF_ARC_LENGTH
|
||||
int "Default arc length"
|
||||
range 1 360
|
||||
default 60
|
||||
help
|
||||
Default arc length for spinner in degrees
|
||||
|
||||
config LVGL_SPINNER_DEF_SPIN_TIME
|
||||
int "Default spin time"
|
||||
default 1000
|
||||
help
|
||||
Default spin time for spinner in ms
|
||||
|
||||
choice
|
||||
prompt "Default spinner animation type"
|
||||
default LVGL_SPINNER_DEF_ANIM_SPINNING_ARC
|
||||
help
|
||||
Default spinner animation type
|
||||
|
||||
config LVGL_SPINNER_DEF_ANIM_SPINNING_ARC
|
||||
bool "Spinning arc"
|
||||
|
||||
config LVGL_SPINNER_DEF_ANIM_FILLSPIN_ARC
|
||||
bool "Fill spin arc"
|
||||
|
||||
config LVGL_SPINNER_DEF_ANIM_CONSTANT_ARC
|
||||
bool "Constant arc"
|
||||
endchoice
|
||||
|
||||
endif # LVGL_USE_SPINNER
|
||||
|
||||
config LVGL_USE_SWITCH
|
||||
bool "Switch object"
|
||||
depends on LVGL_USE_SLIDER
|
||||
help
|
||||
Enable switch object support
|
||||
|
||||
config LVGL_USE_TABLE
|
||||
bool "Table object"
|
||||
depends on LVGL_USE_LABEL
|
||||
help
|
||||
Enable table object support
|
||||
|
||||
config LVGL_TABLE_COL_MAX
|
||||
int "Maximum number of table columns"
|
||||
default 12
|
||||
depends on LVGL_USE_TABLE
|
||||
help
|
||||
Maximum number of columns to support in a table
|
||||
|
||||
config LVGL_USE_TABVIEW
|
||||
bool "Tab view object"
|
||||
depends on LVGL_USE_PAGE && LVGL_USE_BTNMATRIX
|
||||
help
|
||||
Enable tab view object support
|
||||
|
||||
config LVGL_TABVIEW_DEF_ANIM_TIME
|
||||
int "Tab view animation time"
|
||||
default 300
|
||||
depends on LVGL_USE_TABVIEW
|
||||
help
|
||||
Tab view animation time in milliseconds
|
||||
|
||||
config LVGL_USE_TEXTAREA
|
||||
bool "Text area object"
|
||||
depends on LVGL_USE_LABEL && LVGL_USE_PAGE
|
||||
help
|
||||
Enable text area object support
|
||||
|
||||
if LVGL_USE_TEXTAREA
|
||||
|
||||
config LVGL_TA_DEF_CURSOR_BLINK_TIME
|
||||
int "Cursor Blink Time"
|
||||
default 400
|
||||
help
|
||||
Text area cursor blink time in milliseconds
|
||||
|
||||
config LVGL_TA_DEF_PWD_SHOW_TIME
|
||||
int "Label scroll speed"
|
||||
default 1500
|
||||
help
|
||||
Password character show time in milliseconds
|
||||
|
||||
endif # LVGL_USE_TEXTAREA
|
||||
|
||||
config LVGL_USE_TILEVIEW
|
||||
bool "Tile view object"
|
||||
depends on LVGL_USE_PAGE
|
||||
help
|
||||
Enable tile view object support
|
||||
|
||||
config LVGL_TILEVIEW_DEF_ANIM_TIME
|
||||
int "Tile view animation time"
|
||||
default 300
|
||||
depends on LVGL_USE_TILEVIEW
|
||||
help
|
||||
Tile view animation time in milliseconds
|
||||
|
||||
config LVGL_USE_WIN
|
||||
bool "Window object"
|
||||
depends on LVGL_USE_CONT && LVGL_USE_BTN && LVGL_USE_LABEL && LVGL_USE_IMG && LVGL_USE_PAGE
|
||||
help
|
||||
Enable window object support
|
||||
|
||||
endmenu
|
|
@ -1,88 +0,0 @@
|
|||
# Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menu "Text settings"
|
||||
|
||||
choice
|
||||
prompt "String character encoding"
|
||||
default LVGL_TXT_ENC_ASCII
|
||||
|
||||
config LVGL_TXT_ENC_ASCII
|
||||
bool "ASCII string encoding"
|
||||
|
||||
config LVGL_TXT_ENC_UTF8
|
||||
bool "UTF-8 string encoding"
|
||||
|
||||
endchoice
|
||||
|
||||
config LVGL_TXT_BREAK_CHARS
|
||||
string "Text break characters"
|
||||
default " ,.;:-_"
|
||||
help
|
||||
Characters on which a text break can take place
|
||||
|
||||
config LVGL_TXT_LINE_BREAK_LONG_LEN
|
||||
int "Minimal word length for line break"
|
||||
default 0
|
||||
help
|
||||
If a word is at least this long, a line break is allowed in the word.
|
||||
|
||||
If the length is 0, no line break is allowed in the middle of a word.
|
||||
|
||||
config LVGL_TXT_LINE_BREAK_LONG_PRE_MIN_LEN
|
||||
int "Minimal number of characters on line before line break"
|
||||
default 3
|
||||
help
|
||||
Minimal number of characters to place on a line before a line break
|
||||
in the middle of a word can occur.
|
||||
|
||||
config LVGL_TXT_LINE_BREAK_LONG_POST_MIN_LEN
|
||||
int "Minimal number of characters on line after line break"
|
||||
default 3
|
||||
help
|
||||
Minimal number of characters to place on a line after a line break
|
||||
occurred in the middle of a word.
|
||||
|
||||
config LVGL_TXT_COLOR_CMD
|
||||
string "Text recoloring control character"
|
||||
default "#"
|
||||
help
|
||||
Control character to use for signalling text recoloring
|
||||
|
||||
config LVGL_USE_BIDI
|
||||
bool "Enable bidirectional text support"
|
||||
help
|
||||
Enable bidirectional text support
|
||||
|
||||
The direction of the text will be processed according to the
|
||||
Unicode Bidirectional Algorithm:
|
||||
https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
|
||||
|
||||
choice LVGL_BIDI_MODE
|
||||
prompt "Bidirectional text processing direction"
|
||||
default LVGL_BIDI_DIR_AUTO
|
||||
depends on LVGL_USE_BIDI
|
||||
help
|
||||
Direction of bidirectional text processing
|
||||
|
||||
config LVGL_BIDI_DIR_AUTO
|
||||
bool "Automatically detect direction"
|
||||
|
||||
config LVGL_BIDI_DIR_LTR
|
||||
bool "Left-to-right"
|
||||
|
||||
config LVGL_BIDI_DIR_RTL
|
||||
bool "Right-to-left"
|
||||
|
||||
endchoice
|
||||
|
||||
config LVGL_USE_ARABIC_PERSIAN_CHARS
|
||||
bool "Enable Arabic/Persian processing"
|
||||
help
|
||||
Enable Arabic/Persian processing
|
||||
|
||||
In these languages characters should be replaced with an other form based
|
||||
on their position in the text
|
||||
|
||||
endmenu
|
|
@ -1,708 +0,0 @@
|
|||
# Copyright (c) 2018 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
# Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menu "Themes"
|
||||
|
||||
choice
|
||||
prompt "Theme"
|
||||
default LVGL_USE_THEME_EMPTY
|
||||
|
||||
config LVGL_USE_THEME_EMPTY
|
||||
bool "Empty theme"
|
||||
help
|
||||
No theme, you can apply your styles as you need
|
||||
|
||||
config LVGL_USE_THEME_MATERIAL
|
||||
bool "Material theme"
|
||||
help
|
||||
Material theme, flat theme with bold colors and light shadow, support
|
||||
|
||||
config LVGL_USE_THEME_MONO
|
||||
bool "Mono theme"
|
||||
help
|
||||
Mono theme, monochrome, support
|
||||
|
||||
config LVGL_USE_THEME_CUSTOM
|
||||
bool "Custom theme"
|
||||
help
|
||||
Custom theme.
|
||||
endchoice
|
||||
|
||||
if LVGL_USE_THEME_MATERIAL
|
||||
|
||||
choice
|
||||
prompt "Default material theme flags"
|
||||
default LVGL_THEME_MATERIAL_LIGHT
|
||||
|
||||
config LVGL_THEME_MATERIAL_LIGHT
|
||||
bool "Light"
|
||||
|
||||
config LVGL_THEME_MATERIAL_DARK
|
||||
bool "Dark"
|
||||
endchoice
|
||||
|
||||
config LVGL_THEME_MATERIAL_FLAG_NO_TRANSITION
|
||||
bool "Disable transitions"
|
||||
help
|
||||
Disable transitions in material theme
|
||||
|
||||
config LVGL_THEME_MATERIAL_FLAG_NO_FOCUS
|
||||
bool "Disable focus"
|
||||
help
|
||||
Disable indication of focused state in material theme
|
||||
|
||||
endif # LVGL_USE_THEME_MATERIAL
|
||||
|
||||
if LVGL_USE_THEME_CUSTOM
|
||||
|
||||
config LVGL_THEME_CUSTOM_INIT_FUNCTION
|
||||
string "Custom theme initialization function"
|
||||
|
||||
endif # LVGL_USE_THEME_CUSTOM
|
||||
|
||||
choice
|
||||
prompt "Default theme primary color"
|
||||
default LVGL_THEME_DEFAULT_COLOR_PRIMARY_RED
|
||||
default LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLACK if LVGL_USE_THEME_MONO
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_WHITE
|
||||
bool "White"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_SILVER
|
||||
bool "Silver"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_GRAY
|
||||
bool "Gray"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLACK
|
||||
bool "Black"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_RED
|
||||
bool "Red"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_MAROON
|
||||
bool "Maroon"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_YELLOW
|
||||
bool "Yellow"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_OLIVE
|
||||
bool "Olive"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_LIME
|
||||
bool "Lime"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_GREEN
|
||||
bool "Green"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_CYAN
|
||||
bool "Cyan"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_AQUA
|
||||
bool "Aqua"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_TEAL
|
||||
bool "Teal"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLUE
|
||||
bool "Blue"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_NAVY
|
||||
bool "Navy"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_MAGENTA
|
||||
bool "Magenta"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_PURPLE
|
||||
bool "Purple"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_ORANGE
|
||||
bool "Orange"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_CUSTOM
|
||||
bool "Custom"
|
||||
endchoice
|
||||
|
||||
if LVGL_THEME_DEFAULT_COLOR_PRIMARY_CUSTOM
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_CUSTOM_RED
|
||||
hex "Custom primary color (red)"
|
||||
range 0x00 0xFF
|
||||
default 0x00
|
||||
help
|
||||
Custom primary color RGB red channel
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_CUSTOM_GREEN
|
||||
hex "Custom primary color (green)"
|
||||
range 0x00 0xFF
|
||||
default 0x00
|
||||
help
|
||||
Custom primary color RGB green channel
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_PRIMARY_CUSTOM_BLUE
|
||||
hex "Custom primary color (blue)"
|
||||
range 0x00 0xFF
|
||||
default 0x00
|
||||
help
|
||||
Custom primary color RGB blue channel
|
||||
|
||||
endif # LVGL_THEME_DEFAULT_COLOR_PRIMARY_CUSTOM
|
||||
|
||||
choice
|
||||
prompt "Default theme secondary color"
|
||||
default LVGL_THEME_DEFAULT_COLOR_SECONDARY_RED
|
||||
default LVGL_THEME_DEFAULT_COLOR_SECONDARY_BLACK if LVGL_USE_THEME_MONO
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_WHITE
|
||||
bool "White"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_SILVER
|
||||
bool "Silver"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_GRAY
|
||||
bool "Gray"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_BLACK
|
||||
bool "Black"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_RED
|
||||
bool "Red"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_MAROON
|
||||
bool "Maroon"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_YELLOW
|
||||
bool "Yellow"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_OLIVE
|
||||
bool "Olive"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_LIME
|
||||
bool "Lime"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_GREEN
|
||||
bool "Green"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_CYAN
|
||||
bool "Cyan"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_AQUA
|
||||
bool "Aqua"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_TEAL
|
||||
bool "Teal"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_BLUE
|
||||
bool "Blue"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_NAVY
|
||||
bool "Navy"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_MAGENTA
|
||||
bool "Magenta"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_PURPLE
|
||||
bool "Purple"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_ORANGE
|
||||
bool "Orange"
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_CUSTOM
|
||||
bool "Custom"
|
||||
endchoice
|
||||
|
||||
if LVGL_THEME_DEFAULT_COLOR_SECONDARY_CUSTOM
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_CUSTOM_RED
|
||||
hex "Custom secondary color (red)"
|
||||
range 0x00 0xFF
|
||||
default 0x00
|
||||
help
|
||||
Custom secondary color RGB red channel
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_CUSTOM_GREEN
|
||||
hex "Custom secondary color (green)"
|
||||
range 0x00 0xFF
|
||||
default 0x00
|
||||
help
|
||||
Custom secondary color RGB green channel
|
||||
|
||||
config LVGL_THEME_DEFAULT_COLOR_SECONDARY_CUSTOM_BLUE
|
||||
hex "Custom secondary color (blue)"
|
||||
range 0x00 0xFF
|
||||
default 0x00
|
||||
help
|
||||
Custom secondary color RGB blue channel
|
||||
|
||||
endif # LVGL_THEME_DEFAULT_COLOR_SECONDARY_CUSTOM
|
||||
|
||||
choice
|
||||
prompt "Default theme small font"
|
||||
default LVGL_THEME_DEFAULT_FONT_SMALL_UNSCII_8
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_8
|
||||
bool "Build-in font size 8"
|
||||
depends on LVGL_FONT_MONTSERRAT_8
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_10
|
||||
bool "Build-in font size 10"
|
||||
depends on LVGL_FONT_MONTSERRAT_10
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_12
|
||||
bool "Build-in font size 12"
|
||||
depends on LVGL_FONT_MONTSERRAT_12
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_14
|
||||
bool "Build-in font size 14"
|
||||
depends on LVGL_FONT_MONTSERRAT_14
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_16
|
||||
bool "Build-in font size 16"
|
||||
depends on LVGL_FONT_MONTSERRAT_16
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_18
|
||||
bool "Build-in font size 18"
|
||||
depends on LVGL_FONT_MONTSERRAT_18
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_20
|
||||
bool "Build-in font size 20"
|
||||
depends on LVGL_FONT_MONTSERRAT_20
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_22
|
||||
bool "Build-in font size 22"
|
||||
depends on LVGL_FONT_MONTSERRAT_22
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_24
|
||||
bool "Build-in font size 24"
|
||||
depends on LVGL_FONT_MONTSERRAT_24
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_26
|
||||
bool "Build-in font size 26"
|
||||
depends on LVGL_FONT_MONTSERRAT_26
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_28
|
||||
bool "Build-in font size 28"
|
||||
depends on LVGL_FONT_MONTSERRAT_28
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_30
|
||||
bool "Build-in font size 30"
|
||||
depends on LVGL_FONT_MONTSERRAT_30
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_32
|
||||
bool "Build-in font size 32"
|
||||
depends on LVGL_FONT_MONTSERRAT_32
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_34
|
||||
bool "Build-in font size 34"
|
||||
depends on LVGL_FONT_MONTSERRAT_34
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_36
|
||||
bool "Build-in font size 36"
|
||||
depends on LVGL_FONT_MONTSERRAT_36
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_38
|
||||
bool "Build-in font size 38"
|
||||
depends on LVGL_FONT_MONTSERRAT_38
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_40
|
||||
bool "Build-in font size 40"
|
||||
depends on LVGL_FONT_MONTSERRAT_40
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_42
|
||||
bool "Build-in font size 42"
|
||||
depends on LVGL_FONT_MONTSERRAT_42
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_44
|
||||
bool "Build-in font size 44"
|
||||
depends on LVGL_FONT_MONTSERRAT_44
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_46
|
||||
bool "Build-in font size 46"
|
||||
depends on LVGL_FONT_MONTSERRAT_46
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_48
|
||||
bool "Build-in font size 48"
|
||||
depends on LVGL_FONT_MONTSERRAT_48
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_12_SUBPX
|
||||
bool "Build-in font size 12 with sub-pixel rendering"
|
||||
depends on LVGL_FONT_MONTSERRAT_12_SUBPX
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_28_COMPRESSED
|
||||
bool "Build-in compressed font size 28"
|
||||
depends on LVGL_FONT_MONTSERRAT_28_COMPRESSED
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_DEJAVU_16_PERSIAN_HEBREW
|
||||
bool "Build-in font size 16 with Hebrew, Arabic and Persian"
|
||||
depends on LVGL_FONT_DEJAVU_16_PERSIAN_HEBREW
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_SIMSUN_16_CJK
|
||||
bool "Build-in font size 16 with CJK radicals"
|
||||
depends on LVGL_FONT_SIMSUN_16_CJK
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_UNSCII_8
|
||||
bool "Build-in monospace font"
|
||||
depends on LVGL_FONT_UNSCII_8
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SMALL_CUSTOM
|
||||
bool "Custom font"
|
||||
help
|
||||
Use a none build-in font as default small font. A pointer named
|
||||
lv_theme_default_small_font_custom_ptr should exists as a global
|
||||
variable and point to a valid font structure
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Default theme normal font"
|
||||
default LVGL_THEME_DEFAULT_FONT_NORMAL_UNSCII_8
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_8
|
||||
bool "Build-in font size 8"
|
||||
depends on LVGL_FONT_MONTSERRAT_8
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_10
|
||||
bool "Build-in font size 10"
|
||||
depends on LVGL_FONT_MONTSERRAT_10
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_12
|
||||
bool "Build-in font size 12"
|
||||
depends on LVGL_FONT_MONTSERRAT_12
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_14
|
||||
bool "Build-in font size 14"
|
||||
depends on LVGL_FONT_MONTSERRAT_14
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_16
|
||||
bool "Build-in font size 16"
|
||||
depends on LVGL_FONT_MONTSERRAT_16
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_18
|
||||
bool "Build-in font size 18"
|
||||
depends on LVGL_FONT_MONTSERRAT_18
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_20
|
||||
bool "Build-in font size 20"
|
||||
depends on LVGL_FONT_MONTSERRAT_20
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_22
|
||||
bool "Build-in font size 22"
|
||||
depends on LVGL_FONT_MONTSERRAT_22
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_24
|
||||
bool "Build-in font size 24"
|
||||
depends on LVGL_FONT_MONTSERRAT_24
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26
|
||||
bool "Build-in font size 26"
|
||||
depends on LVGL_FONT_MONTSERRAT_26
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_28
|
||||
bool "Build-in font size 28"
|
||||
depends on LVGL_FONT_MONTSERRAT_28
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_30
|
||||
bool "Build-in font size 30"
|
||||
depends on LVGL_FONT_MONTSERRAT_30
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_32
|
||||
bool "Build-in font size 32"
|
||||
depends on LVGL_FONT_MONTSERRAT_32
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_34
|
||||
bool "Build-in font size 34"
|
||||
depends on LVGL_FONT_MONTSERRAT_34
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_36
|
||||
bool "Build-in font size 36"
|
||||
depends on LVGL_FONT_MONTSERRAT_36
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_38
|
||||
bool "Build-in font size 38"
|
||||
depends on LVGL_FONT_MONTSERRAT_38
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_40
|
||||
bool "Build-in font size 40"
|
||||
depends on LVGL_FONT_MONTSERRAT_40
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_42
|
||||
bool "Build-in font size 42"
|
||||
depends on LVGL_FONT_MONTSERRAT_42
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_44
|
||||
bool "Build-in font size 44"
|
||||
depends on LVGL_FONT_MONTSERRAT_44
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_46
|
||||
bool "Build-in font size 46"
|
||||
depends on LVGL_FONT_MONTSERRAT_46
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_48
|
||||
bool "Build-in font size 48"
|
||||
depends on LVGL_FONT_MONTSERRAT_48
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_12_SUBPX
|
||||
bool "Build-in font size 12 with sub-pixel rendering"
|
||||
depends on LVGL_FONT_MONTSERRAT_12_SUBPX
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_28_COMPRESSED
|
||||
bool "Build-in compressed font size 28"
|
||||
depends on LVGL_FONT_MONTSERRAT_28_COMPRESSED
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_DEJAVU_16_PERSIAN_HEBREW
|
||||
bool "Build-in font size 16 with Hebrew, Arabic and Persian"
|
||||
depends on LVGL_FONT_DEJAVU_16_PERSIAN_HEBREW
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_SIMSUN_16_CJK
|
||||
bool "Build-in font size 16 with CJK radicals"
|
||||
depends on LVGL_FONT_SIMSUN_16_CJK
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_UNSCII_8
|
||||
bool "Build-in monospace font"
|
||||
depends on LVGL_FONT_UNSCII_8
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_NORMAL_CUSTOM
|
||||
bool "Custom font"
|
||||
help
|
||||
Use a none build-in font as default normal font. A pointer named
|
||||
lv_theme_default_normal_font_custom_ptr should exists as a global
|
||||
variable and point to a valid font structure
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Default theme subtitle font"
|
||||
default LVGL_THEME_DEFAULT_FONT_SUBTITLE_UNSCII_8
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_8
|
||||
bool "Build-in font size 8"
|
||||
depends on LVGL_FONT_MONTSERRAT_8
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_10
|
||||
bool "Build-in font size 10"
|
||||
depends on LVGL_FONT_MONTSERRAT_10
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_12
|
||||
bool "Build-in font size 12"
|
||||
depends on LVGL_FONT_MONTSERRAT_12
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_14
|
||||
bool "Build-in font size 14"
|
||||
depends on LVGL_FONT_MONTSERRAT_14
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_16
|
||||
bool "Build-in font size 16"
|
||||
depends on LVGL_FONT_MONTSERRAT_16
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_18
|
||||
bool "Build-in font size 18"
|
||||
depends on LVGL_FONT_MONTSERRAT_18
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_20
|
||||
bool "Build-in font size 20"
|
||||
depends on LVGL_FONT_MONTSERRAT_20
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_22
|
||||
bool "Build-in font size 22"
|
||||
depends on LVGL_FONT_MONTSERRAT_22
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_24
|
||||
bool "Build-in font size 24"
|
||||
depends on LVGL_FONT_MONTSERRAT_24
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_26
|
||||
bool "Build-in font size 26"
|
||||
depends on LVGL_FONT_MONTSERRAT_26
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_28
|
||||
bool "Build-in font size 28"
|
||||
depends on LVGL_FONT_MONTSERRAT_28
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_30
|
||||
bool "Build-in font size 30"
|
||||
depends on LVGL_FONT_MONTSERRAT_30
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_32
|
||||
bool "Build-in font size 32"
|
||||
depends on LVGL_FONT_MONTSERRAT_32
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_34
|
||||
bool "Build-in font size 34"
|
||||
depends on LVGL_FONT_MONTSERRAT_34
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_36
|
||||
bool "Build-in font size 36"
|
||||
depends on LVGL_FONT_MONTSERRAT_36
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_38
|
||||
bool "Build-in font size 38"
|
||||
depends on LVGL_FONT_MONTSERRAT_38
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_40
|
||||
bool "Build-in font size 40"
|
||||
depends on LVGL_FONT_MONTSERRAT_40
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_42
|
||||
bool "Build-in font size 42"
|
||||
depends on LVGL_FONT_MONTSERRAT_42
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_44
|
||||
bool "Build-in font size 44"
|
||||
depends on LVGL_FONT_MONTSERRAT_44
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_46
|
||||
bool "Build-in font size 46"
|
||||
depends on LVGL_FONT_MONTSERRAT_46
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_48
|
||||
bool "Build-in font size 48"
|
||||
depends on LVGL_FONT_MONTSERRAT_48
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_12_SUBPX
|
||||
bool "Build-in font size 12 with sub-pixel rendering"
|
||||
depends on LVGL_FONT_MONTSERRAT_12_SUBPX
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_28_COMPRESSED
|
||||
bool "Build-in compressed font size 28"
|
||||
depends on LVGL_FONT_MONTSERRAT_28_COMPRESSED
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_DEJAVU_16_PERSIAN_HEBREW
|
||||
bool "Build-in font size 16 with Hebrew, Arabic and Persian"
|
||||
depends on LVGL_FONT_DEJAVU_16_PERSIAN_HEBREW
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_SIMSUN_16_CJK
|
||||
bool "Build-in font size 16 with CJK radicals"
|
||||
depends on LVGL_FONT_SIMSUN_16_CJK
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_UNSCII_8
|
||||
bool "Build-in monospace font"
|
||||
depends on LVGL_FONT_UNSCII_8
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_SUBTITLE_CUSTOM
|
||||
bool "Custom font"
|
||||
help
|
||||
Use a none build-in font as default subtitle font. A pointer named
|
||||
lv_theme_default_small_font_subtitle_ptr should exists as a global
|
||||
variable and point to a valid font structure
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Default theme title font"
|
||||
default LVGL_THEME_DEFAULT_FONT_TITLE_UNSCII_8
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_8
|
||||
bool "Build-in font size 8"
|
||||
depends on LVGL_FONT_MONTSERRAT_8
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_10
|
||||
bool "Build-in font size 10"
|
||||
depends on LVGL_FONT_MONTSERRAT_10
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_12
|
||||
bool "Build-in font size 12"
|
||||
depends on LVGL_FONT_MONTSERRAT_12
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_14
|
||||
bool "Build-in font size 14"
|
||||
depends on LVGL_FONT_MONTSERRAT_14
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_16
|
||||
bool "Build-in font size 16"
|
||||
depends on LVGL_FONT_MONTSERRAT_16
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_18
|
||||
bool "Build-in font size 18"
|
||||
depends on LVGL_FONT_MONTSERRAT_18
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_20
|
||||
bool "Build-in font size 20"
|
||||
depends on LVGL_FONT_MONTSERRAT_20
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_22
|
||||
bool "Build-in font size 22"
|
||||
depends on LVGL_FONT_MONTSERRAT_22
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_24
|
||||
bool "Build-in font size 24"
|
||||
depends on LVGL_FONT_MONTSERRAT_24
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_26
|
||||
bool "Build-in font size 26"
|
||||
depends on LVGL_FONT_MONTSERRAT_26
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_28
|
||||
bool "Build-in font size 28"
|
||||
depends on LVGL_FONT_MONTSERRAT_28
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_30
|
||||
bool "Build-in font size 30"
|
||||
depends on LVGL_FONT_MONTSERRAT_30
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_32
|
||||
bool "Build-in font size 32"
|
||||
depends on LVGL_FONT_MONTSERRAT_32
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_34
|
||||
bool "Build-in font size 34"
|
||||
depends on LVGL_FONT_MONTSERRAT_34
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_36
|
||||
bool "Build-in font size 36"
|
||||
depends on LVGL_FONT_MONTSERRAT_36
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_38
|
||||
bool "Build-in font size 38"
|
||||
depends on LVGL_FONT_MONTSERRAT_38
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_40
|
||||
bool "Build-in font size 40"
|
||||
depends on LVGL_FONT_MONTSERRAT_40
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_42
|
||||
bool "Build-in font size 42"
|
||||
depends on LVGL_FONT_MONTSERRAT_42
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_44
|
||||
bool "Build-in font size 44"
|
||||
depends on LVGL_FONT_MONTSERRAT_44
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_46
|
||||
bool "Build-in font size 46"
|
||||
depends on LVGL_FONT_MONTSERRAT_46
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_48
|
||||
bool "Build-in font size 48"
|
||||
depends on LVGL_FONT_MONTSERRAT_48
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_12_SUBPX
|
||||
bool "Build-in font size 12 with sub-pixel rendering"
|
||||
depends on LVGL_FONT_MONTSERRAT_12_SUBPX
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_28_COMPRESSED
|
||||
bool "Build-in compressed font size 28"
|
||||
depends on LVGL_FONT_MONTSERRAT_28_COMPRESSED
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_DEJAVU_16_PERSIAN_HEBREW
|
||||
bool "Build-in font size 16 with Hebrew, Arabic and Persian"
|
||||
depends on LVGL_FONT_DEJAVU_16_PERSIAN_HEBREW
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_SIMSUN_16_CJK
|
||||
bool "Build-in font size 16 with CJK radicals"
|
||||
depends on LVGL_FONT_SIMSUN_16_CJK
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_UNSCII_8
|
||||
bool "Build-in monospace font"
|
||||
depends on LVGL_FONT_UNSCII_8
|
||||
|
||||
config LVGL_THEME_DEFAULT_FONT_TITLE_CUSTOM
|
||||
bool "Custom font"
|
||||
help
|
||||
Use a none build-in font as default title font. A pointer named
|
||||
lv_theme_default_small_font_title_ptr should exists as a global
|
||||
variable and point to a valid font structure
|
||||
|
||||
endchoice
|
||||
|
||||
endmenu
|
|
@ -1,849 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
* Copyright (c) 2020 Teslabs Engineering S.L.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_LIB_GUI_LVGL_LV_CONF_H_
|
||||
#define ZEPHYR_LIB_GUI_LVGL_LV_CONF_H_
|
||||
|
||||
#include <sys/util.h>
|
||||
|
||||
#ifdef CONFIG_LVGL_USE_DEBUG
|
||||
#include <sys/__assert.h>
|
||||
#define LV_DEBUG_ASSERT(expr, msg, value) __ASSERT(expr, msg)
|
||||
#endif
|
||||
|
||||
/* Graphical settings */
|
||||
|
||||
#define LV_HOR_RES_MAX CONFIG_LVGL_HOR_RES_MAX
|
||||
#define LV_VER_RES_MAX CONFIG_LVGL_VER_RES_MAX
|
||||
|
||||
#ifdef CONFIG_LVGL_COLOR_DEPTH_32
|
||||
#define LV_COLOR_DEPTH 32
|
||||
#elif defined(CONFIG_LVGL_COLOR_DEPTH_16)
|
||||
#define LV_COLOR_DEPTH 16
|
||||
#elif defined(CONFIG_LVGL_COLOR_DEPTH_8)
|
||||
#define LV_COLOR_DEPTH 8
|
||||
#elif defined(CONFIG_LVGL_COLOR_DEPTH_1)
|
||||
#define LV_COLOR_DEPTH 1
|
||||
#endif
|
||||
|
||||
#define LV_COLOR_16_SWAP IS_ENABLED(CONFIG_LVGL_COLOR_16_SWAP)
|
||||
|
||||
#define LV_COLOR_SCREEN_TRANSP IS_ENABLED(CONFIG_LVGL_COLOR_SCREEN_TRANSP)
|
||||
|
||||
#ifdef CONFIG_LVGL_COLOR_TRANSP_RED
|
||||
#define LV_COLOR_TRANSP LV_COLOR_RED
|
||||
#elif defined(CONFIG_LVGL_COLOR_TRANSP_GREEN)
|
||||
#define LV_COLOR_TRANSP LV_COLOR_LIME
|
||||
#elif defined(CONFIG_LVGL_COLOR_TRANSP_BLUE)
|
||||
#define LV_COLOR_TRANSP LV_COLOR_BLUE
|
||||
#elif defined(CONFIG_LVGL_COLOR_TRANSP_CUSTOM)
|
||||
#define LV_COLOR_TRANSP \
|
||||
LV_COLOR_MAKE(CONFIG_LVGL_CUSTOM_COLOR_TRANSP_RED, \
|
||||
CONFIG_LVGL_CUSTOM_COLOR_TRANSP_GREEN, \
|
||||
CONFIG_LVGL_CUSTOM_COLOR_TRANSP_BLUE)
|
||||
#endif
|
||||
|
||||
#define LV_ANTIALIAS IS_ENABLED(CONFIG_LVGL_ANTIALIAS)
|
||||
|
||||
#define LV_DPI CONFIG_LVGL_DPI
|
||||
|
||||
#define LV_DISP_SMALL_LIMIT CONFIG_LVGL_DISP_SMALL_LIMIT
|
||||
#define LV_DISP_MEDIUM_LIMIT CONFIG_LVGL_DISP_MEDIUM_LIMIT
|
||||
#define LV_DISP_LARGE_LIMIT CONFIG_LVGL_DISP_LARGE_LIMIT
|
||||
|
||||
typedef short lv_coord_t;
|
||||
|
||||
/* Memory manager settings */
|
||||
|
||||
#define LV_MEM_CUSTOM 1
|
||||
|
||||
#define LV_MEMCPY_MEMSET_STD 1
|
||||
|
||||
#if defined(CONFIG_LVGL_MEM_POOL_HEAP_LIB_C)
|
||||
|
||||
#define LV_MEM_CUSTOM_INCLUDE "stdlib.h"
|
||||
#define LV_MEM_CUSTOM_ALLOC malloc
|
||||
#define LV_MEM_CUSTOM_REALLOC realloc
|
||||
#define LV_MEM_CUSTOM_FREE free
|
||||
|
||||
#else
|
||||
|
||||
#define LV_MEM_CUSTOM_INCLUDE "lvgl_mem.h"
|
||||
#define LV_MEM_CUSTOM_ALLOC lvgl_malloc
|
||||
#define LV_MEM_CUSTOM_REALLOC lvgl_realloc
|
||||
#define LV_MEM_CUSTOM_FREE lvgl_free
|
||||
|
||||
#endif
|
||||
|
||||
#define LV_ENABLE_GC 0
|
||||
|
||||
/* Feature usage */
|
||||
|
||||
#define LV_USE_ANIMATION IS_ENABLED(CONFIG_LVGL_USE_ANIMATION)
|
||||
|
||||
#if LV_USE_ANIMATION
|
||||
typedef void *lv_anim_user_data_t;
|
||||
#endif
|
||||
|
||||
#define LV_USE_SHADOW IS_ENABLED(CONFIG_LVGL_USE_SHADOW)
|
||||
|
||||
#if LV_USE_SHADOW
|
||||
#define LV_SHADOW_CACHE_SIZE CONFIG_LVGL_SHADOW_CACHE_SIZE
|
||||
#endif
|
||||
|
||||
#define LV_USE_OUTLINE IS_ENABLED(CONFIG_LVGL_USE_OUTLINE)
|
||||
|
||||
#define LV_USE_PATTERN IS_ENABLED(CONFIG_LVGL_USE_PATTERN)
|
||||
|
||||
#define LV_USE_VALUE_STR IS_ENABLED(CONFIG_LVGL_USE_VALUE_STR)
|
||||
|
||||
#define LV_USE_BLEND_MODES IS_ENABLED(CONFIG_LVGL_USE_BLEND_MODES)
|
||||
|
||||
#define LV_USE_OPA_SCALE IS_ENABLED(CONFIG_LVGL_USE_OPA_SCALE)
|
||||
|
||||
#define LV_USE_IMG_TRANSFORM IS_ENABLED(CONFIG_LVGL_USE_IMG_TRANSFORM)
|
||||
|
||||
#define LV_USE_GROUP IS_ENABLED(CONFIG_LVGL_USE_GROUP)
|
||||
|
||||
#if LV_USE_GROUP
|
||||
typedef void *lv_group_user_data_t;
|
||||
#endif
|
||||
|
||||
#define LV_USE_GPU IS_ENABLED(CONFIG_LVGL_USE_GPU)
|
||||
|
||||
#define LV_USE_FILESYSTEM IS_ENABLED(CONFIG_LVGL_USE_FILESYSTEM)
|
||||
|
||||
#if LV_USE_FILESYSTEM
|
||||
typedef void *lv_fs_drv_user_data_t;
|
||||
#endif
|
||||
|
||||
#define LV_USE_USER_DATA 1
|
||||
|
||||
#define LV_USE_PERF_MONITOR IS_ENABLED(CONFIG_LVGL_USE_PERF_MONITOR)
|
||||
|
||||
#define LV_USE_API_EXTENSION_V6 IS_ENABLED(CONFIG_LVGL_USE_API_EXTENSION_V6)
|
||||
#define LV_USE_API_EXTENSION_V7 IS_ENABLED(CONFIG_LVGL_USE_API_EXTENSION_V7)
|
||||
|
||||
/* Image decoder and cache */
|
||||
|
||||
#define LV_IMG_CF_INDEXED IS_ENABLED(CONFIG_LVGL_IMG_CF_INDEXED)
|
||||
|
||||
#define LV_IMG_CF_ALPHA IS_ENABLED(CONFIG_LVGL_IMG_CF_ALPHA)
|
||||
|
||||
#define LV_IMG_CACHE_DEF_SIZE CONFIG_LVGL_IMG_CACHE_DEF_SIZE
|
||||
|
||||
typedef void *lv_img_decoder_user_data_t;
|
||||
|
||||
/* Compiler settings */
|
||||
|
||||
#define LV_BIG_ENDIAN_SYSTEM IS_ENABLED(CONFIG_BIG_ENDIAN)
|
||||
|
||||
#define LV_ATTRIBUTE_TICK_INC
|
||||
|
||||
#define LV_ATTRIBUTE_TASK_HANDLER
|
||||
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
|
||||
#define LV_ATTRIBUTE_LARGE_CONST
|
||||
|
||||
#define LV_EXPORT_CONST_INT(int_value)
|
||||
|
||||
/* HAL settings */
|
||||
|
||||
#define LV_TICK_CUSTOM 1
|
||||
#define LV_TICK_CUSTOM_INCLUDE "kernel.h"
|
||||
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (k_uptime_get_32())
|
||||
|
||||
typedef void *lv_disp_drv_user_data_t;
|
||||
typedef void *lv_indev_drv_user_data_t;
|
||||
|
||||
/* Log settings */
|
||||
|
||||
#if CONFIG_LVGL_LOG_LEVEL == 0
|
||||
#define LV_USE_LOG 0
|
||||
#else
|
||||
#define LV_USE_LOG 1
|
||||
|
||||
#if CONFIG_LVGL_LOG_LEVEL == 1
|
||||
#define LV_LOG_LEVEL LV_LOG_LEVEL_ERROR
|
||||
#elif CONFIG_LVGL_LOG_LEVEL == 2
|
||||
#define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
|
||||
#elif CONFIG_LVGL_LOG_LEVEL == 3
|
||||
#define LV_LOG_LEVEL LV_LOG_LEVEL_INFO
|
||||
#elif CONFIG_LVGL_LOG_LEVEL == 4
|
||||
#define LV_LOG_LEVEL LV_LOG_LEVEL_TRACE
|
||||
#endif
|
||||
|
||||
#define LV_LOG_PRINTF 0
|
||||
#endif
|
||||
|
||||
/* Debug settings */
|
||||
|
||||
#define LV_USE_DEBUG IS_ENABLED(CONFIG_LVGL_USE_DEBUG)
|
||||
|
||||
#if LV_USE_DEBUG
|
||||
|
||||
#define LV_USE_ASSERT_NULL IS_ENABLED(CONFIG_LVGL_USE_ASSERT_NULL)
|
||||
|
||||
#define LV_USE_ASSERT_MEM IS_ENABLED(CONFIG_LVGL_USE_ASSERT_MEM)
|
||||
|
||||
#define LV_USE_ASSERT_MEM_INTEGRITY IS_ENABLED(CONFIG_LVGL_USE_ASSERT_MEM_INTEGRITY)
|
||||
|
||||
#define LV_USE_ASSERT_STR IS_ENABLED(CONFIG_LVGL_USE_ASSERT_STR)
|
||||
|
||||
#define LV_USE_ASSERT_OBJ IS_ENABLED(CONFIG_LVGL_USE_ASSERT_OBJ)
|
||||
|
||||
#define LV_USE_ASSERT_STYLE IS_ENABLED(CONFIG_LVGL_USE_ASSERT_STYLE)
|
||||
|
||||
#endif /* LV_USE_DEBUG */
|
||||
|
||||
/* THEME USAGE */
|
||||
|
||||
/* Empty theme */
|
||||
#define LV_USE_THEME_EMPTY IS_ENABLED(CONFIG_LVGL_USE_THEME_EMPTY)
|
||||
|
||||
#if LV_USE_THEME_EMPTY
|
||||
#define LV_THEME_DEFAULT_FLAG 0
|
||||
#define LV_THEME_DEFAULT_INIT lv_theme_empty_init
|
||||
#endif
|
||||
|
||||
/* Material theme */
|
||||
#define LV_USE_THEME_MATERIAL IS_ENABLED(CONFIG_LVGL_USE_THEME_MATERIAL)
|
||||
|
||||
#if LV_USE_THEME_MATERIAL
|
||||
#define LV_THEME_DEFAULT_INIT lv_theme_material_init
|
||||
|
||||
#if defined(CONFIG_LVGL_THEME_MATERIAL_LIGHT)
|
||||
#define LVGL_THEME_MATERIAL_LIGHT_DARK_FLAG LV_THEME_MATERIAL_FLAG_LIGHT
|
||||
#elif defined(CONFIG_LVGL_THEME_MATERIAL_DARK)
|
||||
#define LVGL_THEME_MATERIAL_LIGHT_DARK_FLAG LV_THEME_MATERIAL_FLAG_DARK
|
||||
#else
|
||||
#define LVGL_THEME_MATERIAL_LIGHT_DARK_FLAG 0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LVGL_THEME_MATERIAL_FLAG_NO_TRANSITION)
|
||||
#define LVGL_THEME_MATERIAL_FLAG_NO_TRANSITION LV_THEME_MATERIAL_FLAG_NO_TRANSITION
|
||||
#else
|
||||
#define LVGL_THEME_MATERIAL_FLAG_NO_TRANSITION 0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LVGL_THEME_MATERIAL_FLAG_NO_FOCUS)
|
||||
#define LVGL_THEME_MATERIAL_FLAG_NO_FOCUS LV_THEME_MATERIAL_FLAG_NO_FOCUS
|
||||
#else
|
||||
#define LVGL_THEME_MATERIAL_FLAG_NO_FOCUS 0
|
||||
#endif
|
||||
|
||||
#define LV_THEME_DEFAULT_FLAG \
|
||||
(LVGL_THEME_MATERIAL_LIGHT_DARK_FLAG | \
|
||||
LVGL_THEME_MATERIAL_FLAG_NO_TRANSITION | \
|
||||
LVGL_THEME_MATERIAL_FLAG_NO_FOCUS)
|
||||
|
||||
#endif
|
||||
|
||||
/* Mono-color theme */
|
||||
#define LV_USE_THEME_MONO IS_ENABLED(CONFIG_LVGL_USE_THEME_MONO)
|
||||
|
||||
#if LV_USE_THEME_MONO
|
||||
#define LV_THEME_DEFAULT_INIT lv_theme_mono_init
|
||||
#define LV_THEME_DEFAULT_FLAG 0
|
||||
#endif
|
||||
|
||||
/* Custom theme */
|
||||
#if CONFIG_LVGL_USE_THEME_CUSTOM
|
||||
|
||||
lv_theme_t *LVGL_THEME_CUSTOM_INIT_FUNCTION(
|
||||
lv_color_t color_primary, lv_color_t color_secondary, uint32_t flags,
|
||||
const lv_font_t *font_small, const lv_font_t *font_normal,
|
||||
const lv_font_t *font_subtitle, const lv_font_t *font_title);
|
||||
|
||||
#define LV_THEME_DEFAULT_INIT LVGL_THEME_CUSTOM_INIT_FUNCTION
|
||||
|
||||
#endif
|
||||
|
||||
/* Theme primary color */
|
||||
#if defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_WHITE)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_WHITE
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_SILVER)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_SILVER
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_GRAY)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_GRAY
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLACK)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_BLACK
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_RED)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_RED
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_MAROON)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_MAROON
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_YELLOW)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_YELLOW
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_OLIVE)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_OLIVE
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_LIME)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_LIME
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_GREEN)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_GREEN
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_CYAN)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_CYAN
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_AQUA)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_AQUA
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_TEAL)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_TEAL
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLUE)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_BLUE
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_NAVY)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_NAVY
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_MAGENTA)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_MAGENTA
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_PURPLE)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_PURPLE
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_ORANGE)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_ORANGE
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_CUSTOM)
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY \
|
||||
LV_COLOR_MAKE(CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_CUSTOM_RED, \
|
||||
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_CUSTOM_GREEN, \
|
||||
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_CUSTOM_BLUE)
|
||||
#endif
|
||||
|
||||
/* Theme secondary color */
|
||||
#if defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_WHITE)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_WHITE
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_SILVER)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_SILVER
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_GRAY)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_GRAY
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_BLACK)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_BLACK
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_RED)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_RED
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_MAROON)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_MAROON
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_YELLOW)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_YELLOW
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_OLIVE)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_OLIVE
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_LIME)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_LIME
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_GREEN)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_GREEN
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_CYAN)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_CYAN
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_AQUA)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_AQUA
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_TEAL)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_TEAL
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_BLUE)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_BLUE
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_NAVY)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_NAVY
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_MAGENTA)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_MAGENTA
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_PURPLE)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_PURPLE
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_ORANGE)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_ORANGE
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_CUSTOM)
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY \
|
||||
LV_COLOR_MAKE(CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_CUSTOM_RED, \
|
||||
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_CUSTOM_GREEN, \
|
||||
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_CUSTOM_BLUE)
|
||||
#endif
|
||||
|
||||
/* Theme small font */
|
||||
#if defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_8)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_8)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_10)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_10)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_12)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_12)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_14)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_14)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_16)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_16)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_18)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_18)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_20)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_20)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_22)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_22)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_24)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_24)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_26)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_26)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_28)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_28)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_30)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_30)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_32)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_32)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_34)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_34)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_36)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_36)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_38)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_38)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_40)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_40)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_42)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_42)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_44)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_44)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_46)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_46)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_48)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_48)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_12_SUBPX)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_12_subpx)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_28_COMPRESSED)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_montserrat_28_compressed)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_DEJAVU_16_PERSIAN_HEBREW)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_dejavu_16_persian_hebrew)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_SIMSUN_16_CJK)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_simsun_16_cjk)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_UNSCII_8)
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL (&lv_font_unscii_8)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_CUSTOM)
|
||||
extern void *lv_theme_default_font_small_custom_ptr;
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL \
|
||||
((lv_font_t *)lv_theme_default_font_small_custom_ptr)
|
||||
#endif
|
||||
|
||||
/* Theme normal font */
|
||||
#if defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_8)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_8)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_10)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_10)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_12)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_12)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_14)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_14)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_16)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_16)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_18)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_18)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_20)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_20)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_22)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_22)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_24)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_24)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_26)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_28)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_28)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_30)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_30)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_32)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_32)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_34)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_34)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_36)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_36)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_38)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_38)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_40)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_40)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_42)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_42)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_44)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_44)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_46)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_46)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_48)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_48)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_12_SUBPX)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_12_subpx)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_28_COMPRESSED)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_montserrat_28_compressed)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_DEJAVU_16_PERSIAN_HEBREW)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_dejavu_16_persian_hebrew)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_SIMSUN_16_CJK)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_simsun_16_cjk)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_UNSCII_8)
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL (&lv_font_unscii_8)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_CUSTOM)
|
||||
extern void *lv_theme_default_font_normal_custom_ptr;
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL \
|
||||
((lv_font_t *)lv_theme_default_font_normal_custom_ptr)
|
||||
#endif
|
||||
|
||||
/* Theme subtitle font */
|
||||
#if defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_8)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_8)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_10)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_10)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_12)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_12)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_14)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_14)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_16)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_16)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_18)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_18)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_20)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_20)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_22)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_22)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_24)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_24)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_26)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_26)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_28)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_28)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_30)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_30)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_32)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_32)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_34)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_34)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_36)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_36)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_38)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_38)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_40)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_40)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_42)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_42)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_44)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_44)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_46)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_46)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_48)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_48)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_12_SUBPX)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_12_subpx)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_MONTSERRAT_28_COMPRESSED)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_montserrat_28_compressed)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_DEJAVU_16_PERSIAN_HEBREW)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_dejavu_16_persian_hebrew)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_SIMSUN_16_CJK)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_simsun_16_cjk)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_UNSCII_8)
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE (&lv_font_unscii_8)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_SUBTITLE_CUSTOM)
|
||||
extern void *lv_theme_default_font_subtitle_custom_ptr;
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE \
|
||||
((lv_font_t *)lv_theme_default_font_subtitle_custom_ptr)
|
||||
#endif
|
||||
|
||||
/* Theme title font */
|
||||
#if defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_8)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_8)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_10)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_10)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_12)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_12)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_14)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_14)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_16)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_16)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_18)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_18)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_20)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_20)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_22)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_22)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_24)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_24)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_26)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_26)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_28)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_28)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_30)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_30)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_32)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_32)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_34)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_34)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_36)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_36)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_38)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_38)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_40)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_40)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_42)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_42)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_44)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_44)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_46)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_46)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_48)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_48)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_12_SUBPX)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_12_subpx)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_MONTSERRAT_28_COMPRESSED)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_montserrat_28_compressed)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_DEJAVU_16_PERSIAN_HEBREW)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_dejavu_16_persian_hebrew)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_SIMSUN_16_CJK)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_simsun_16_cjk)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_UNSCII_8)
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE (&lv_font_unscii_8)
|
||||
#elif defined(CONFIG_LVGL_THEME_DEFAULT_FONT_TITLE_CUSTOM)
|
||||
extern void *lv_theme_default_font_title_custom_ptr;
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE \
|
||||
((lv_font_t *)lv_theme_default_font_title_custom_ptr)
|
||||
#endif
|
||||
|
||||
/* FONT USAGE */
|
||||
|
||||
#define LV_FONT_MONTSERRAT_8 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_8)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_10 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_10)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_12 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_12)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_14 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_14)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_16 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_16)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_18 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_18)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_20 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_20)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_22 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_22)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_24 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_24)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_26 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_26)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_28 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_28)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_30 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_30)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_32 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_32)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_34 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_34)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_36 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_36)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_38 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_38)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_40 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_40)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_42 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_42)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_44 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_44)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_46 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_46)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_48 IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_48)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_12_SUBPX IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_12_SUBPX)
|
||||
|
||||
#define LV_FONT_MONTSERRAT_28_COMPRESSED IS_ENABLED(CONFIG_LVGL_FONT_MONTSERRAT_28_COMPRESSED)
|
||||
|
||||
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW IS_ENABLED(CONFIG_LVGL_FONT_DEJAVU_16_PERSIAN_HEBREW)
|
||||
|
||||
#define LV_FONT_SIMSUN_16_CJK IS_ENABLED(CONFIG_LVGL_FONT_SIMSUN_16_CJK)
|
||||
|
||||
#define LV_FONT_UNSCII_8 IS_ENABLED(CONFIG_LVGL_FONT_UNSCII_8)
|
||||
|
||||
#define LV_USE_FONT_COMPRESSED IS_ENABLED(CONFIG_LVGL_USE_FONT_COMPRESSED)
|
||||
|
||||
#define LV_USE_FONT_SUBPX IS_ENABLED(CONFIG_LVGL_USE_FONT_SUBPX)
|
||||
|
||||
#if LV_USE_FONT_SUBPX
|
||||
#define LV_FONT_SUBPX_BGR IS_ENABLED(CONFIG_LVGL_FONT_SUBPX_BGR)
|
||||
#endif
|
||||
|
||||
#define LV_FONT_CUSTOM_DECLARE
|
||||
|
||||
typedef void *lv_font_user_data_t;
|
||||
|
||||
/* Text settings */
|
||||
|
||||
#ifdef CONFIG_LVGL_TXT_ENC_ASCII
|
||||
#define LV_TXT_ENC LV_TXT_ENC_ASCII
|
||||
#elif defined(CONFIG_LVGL_TXT_ENC_UTF8)
|
||||
#define LV_TXT_ENC LV_TXT_ENC_UTF8
|
||||
#endif
|
||||
|
||||
#define LV_TXT_BREAK_CHARS CONFIG_LVGL_TXT_BREAK_CHARS
|
||||
|
||||
#define LV_TXT_LINE_BREAK_LONG_LEN CONFIG_LVGL_TXT_LINE_BREAK_LONG_LEN
|
||||
|
||||
#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN \
|
||||
CONFIG_LVGL_TXT_LINE_BREAK_LONG_PRE_MIN_LEN
|
||||
|
||||
#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN \
|
||||
CONFIG_LVGL_TXT_LINE_BREAK_LONG_POST_MIN_LEN
|
||||
|
||||
#define LV_TXT_COLOR_CMD CONFIG_LVGL_TXT_COLOR_CMD
|
||||
|
||||
#define LV_USE_BIDI IS_ENABLED(CONFIG_LVGL_USE_BIDI)
|
||||
|
||||
#if LV_USE_BIDI
|
||||
|
||||
#ifdef CONFIG_LVGL_BIDI_DIR_LTR
|
||||
#define LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_LTR
|
||||
#elif defined(CONFIG_LVGL_BIDI_DIR_RTL)
|
||||
#define LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_RTL
|
||||
#else
|
||||
#define LV_BIDI_BASE_DIR_DEF LV_BASE_DIR_AUTO
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#define LV_USE_ARABIC_PERSIAN_CHARS IS_ENABLED(CONFIG_LVGL_USE_ARABIC_PERSIAN_CHARS)
|
||||
|
||||
#define LV_SPRINTF_CUSTOM 1
|
||||
|
||||
#if LV_SPRINTF_CUSTOM
|
||||
#define LV_SPRINTF_INCLUDE "stdio.h"
|
||||
#define lv_snprintf snprintf
|
||||
#define lv_vsnprintf vsnprintf
|
||||
#endif
|
||||
|
||||
/* LV_OBJ SETTINGS */
|
||||
|
||||
typedef void *lv_obj_user_data_t;
|
||||
|
||||
#define LV_USE_OBJ_REALIGN IS_ENABLED(CONFIG_LVGL_USE_OBJ_REALIGN)
|
||||
|
||||
#if defined(CONFIG_LVGL_EXT_CLICK_AREA_OFF)
|
||||
#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_OFF
|
||||
#elif defined(CONFIG_LVGL_EXT_CLICK_AREA_TINY)
|
||||
#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_TINY
|
||||
#elif defined(CONFIG_LVGL_EXT_CLICK_AREA_FULL)
|
||||
#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_FULL
|
||||
#endif
|
||||
|
||||
/* LV OBJ X USAGE */
|
||||
|
||||
#define LV_USE_ARC IS_ENABLED(CONFIG_LVGL_USE_ARC)
|
||||
|
||||
#define LV_USE_BAR IS_ENABLED(CONFIG_LVGL_USE_BAR)
|
||||
|
||||
#define LV_USE_BTN IS_ENABLED(CONFIG_LVGL_USE_BTN)
|
||||
|
||||
#define LV_USE_BTNMATRIX IS_ENABLED(CONFIG_LVGL_USE_BTNMATRIX)
|
||||
|
||||
#define LV_USE_CALENDAR IS_ENABLED(CONFIG_LVGL_USE_CALENDAR)
|
||||
|
||||
#if LV_USE_CALENDAR
|
||||
#define LV_CALENDAR_WEEK_STARTS_MONDAY IS_ENABLED(CONFIG_LVGL_CALENDAR_WEEK_STARTS_MONDAY)
|
||||
#endif
|
||||
|
||||
#define LV_USE_CANVAS IS_ENABLED(CONFIG_LVGL_USE_CANVAS)
|
||||
|
||||
#define LV_USE_CHECKBOX IS_ENABLED(CONFIG_LVGL_USE_CHECKBOX)
|
||||
|
||||
#define LV_USE_CHART IS_ENABLED(CONFIG_LVGL_USE_CHART)
|
||||
#if LV_USE_CHART
|
||||
#define LV_CHART_AXIS_TICK_LABEL_MAX_LEN \
|
||||
CONFIG_LVGL_CHART_AXIS_TICK_LABEL_MAX_LEN
|
||||
#endif
|
||||
|
||||
#define LV_USE_CONT IS_ENABLED(CONFIG_LVGL_USE_CONT)
|
||||
|
||||
#define LV_USE_CPICKER IS_ENABLED(CONFIG_LVGL_USE_CPICKER)
|
||||
|
||||
#define LV_USE_DROPDOWN IS_ENABLED(CONFIG_LVGL_USE_DROPDOWN)
|
||||
#if LV_USE_DROPDOWN
|
||||
#define LV_DROPDOWN_DEF_ANIM_TIME CONFIG_LVGL_DROPDOWN_DEF_ANIM_TIME
|
||||
#endif
|
||||
|
||||
#define LV_USE_GAUGE IS_ENABLED(CONFIG_LVGL_USE_GAUGE)
|
||||
|
||||
#define LV_USE_IMG IS_ENABLED(CONFIG_LVGL_USE_IMG)
|
||||
|
||||
#define LV_USE_IMGBTN IS_ENABLED(CONFIG_LVGL_USE_IMGBTN)
|
||||
#if LV_USE_IMGBTN
|
||||
#define LV_IMGBTN_TILED IS_ENABLED(CONFIG_LVGL_IMGBTN_TILED)
|
||||
#endif
|
||||
|
||||
#define LV_USE_KEYBOARD IS_ENABLED(CONFIG_LVGL_USE_KEYBOARD)
|
||||
|
||||
#define LV_USE_LABEL IS_ENABLED(CONFIG_LVGL_USE_LABEL)
|
||||
#if LV_USE_LABEL
|
||||
#define LV_LABEL_TEXT_SEL IS_ENABLED(CONFIG_LVGL_LABEL_TEXT_SEL)
|
||||
#define LV_LABEL_LONG_TXT_HINT IS_ENABLED(CONFIG_LVGL_LABEL_LONG_TXT_HINT)
|
||||
#endif
|
||||
|
||||
#define LV_USE_LED IS_ENABLED(CONFIG_LVGL_USE_LED)
|
||||
#if LV_USE_LED
|
||||
#define LV_LED_BRIGHT_MIN CONFIG_LVGL_LED_BRIGHT_MIN
|
||||
#define LV_LED_BRIGHT_MAX CONFIG_LVGL_LED_BRIGHT_MAX
|
||||
#endif
|
||||
|
||||
#define LV_USE_LINE IS_ENABLED(CONFIG_LVGL_USE_LINE)
|
||||
|
||||
#define LV_USE_LIST IS_ENABLED(CONFIG_LVGL_USE_LIST)
|
||||
#if LV_USE_LIST
|
||||
#define LV_LIST_DEF_ANIM_TIME CONFIG_LVGL_LIST_DEF_ANIM_TIME
|
||||
#endif
|
||||
|
||||
#define LV_USE_LINEMETER IS_ENABLED(CONFIG_LVGL_USE_LINEMETER)
|
||||
#if LV_USE_LINEMETER
|
||||
#if defined(CONFIG_LVGL_LINEMETER_PRECISE_NO_EXTRA)
|
||||
#define LV_LINEMETER_PRECISE 0
|
||||
#elif defined(CONFIG_LVGL_LINEMETER_PRECISE_SOME_EXTRA)
|
||||
#define LV_LINEMETER_PRECISE 1
|
||||
#elif defined(CONFIG_LVGL_LINEMETER_PRECISE_BEST)
|
||||
#define LV_LINEMETER_PRECISE 2
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define LV_USE_OBJMASK IS_ENABLED(CONFIG_LVGL_USE_OBJMASK)
|
||||
|
||||
#define LV_USE_MSGBOX IS_ENABLED(CONFIG_LVGL_USE_MSGBOX)
|
||||
|
||||
#define LV_USE_PAGE IS_ENABLED(CONFIG_LVGL_USE_PAGE)
|
||||
#if LV_USE_PAGE
|
||||
#define LV_PAGE_DEF_ANIM_TIME CONFIG_LVGL_PAGE_DEF_ANIM_TIME
|
||||
#endif
|
||||
|
||||
#define LV_USE_SPINNER IS_ENABLED(CONFIG_LVGL_USE_SPINNER)
|
||||
#if LV_USE_SPINNER
|
||||
#define LV_SPINNER_DEF_ARC_LENGTH CONFIG_LVGL_SPINNER_DEF_ARC_LENGTH
|
||||
#define LV_SPINNER_DEF_SPIN_TIME CONFIG_LVGL_SPINNER_DEF_SPIN_TIME
|
||||
|
||||
#if defined(CONFIG_LVGL_SPINNER_DEF_ANIM_SPINNING_ARC)
|
||||
#define LV_SPINNER_DEF_ANIM LV_SPINNER_TYPE_SPINNING_ARC
|
||||
#elif defined(CONFIG_LVGL_SPINNER_DEF_ANIM_FILLSPIN_ARC)
|
||||
#define LV_SPINNER_DEF_ANIM LV_SPINNER_TYPE_FILLSPIN_ARC
|
||||
#elif defined(CONFIG_LVGL_SPINNER_DEF_ANIM_CONSTANT_ARC)
|
||||
#define LV_SPINNER_DEF_ANIM LV_SPINNER_TYPE_CONSTANT_ARC
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define LV_USE_ROLLER IS_ENABLED(CONFIG_LVGL_USE_ROLLER)
|
||||
#if LV_USE_ROLLER
|
||||
#define LV_ROLLER_DEF_ANIM_TIME CONFIG_LVGL_ROLLER_DEF_ANIM_TIME
|
||||
#define LV_ROLLER_INF_PAGES CONFIG_LVGL_ROLLER_INF_PAGES
|
||||
#endif
|
||||
|
||||
#define LV_USE_SLIDER IS_ENABLED(CONFIG_LVGL_USE_SLIDER)
|
||||
|
||||
#define LV_USE_SPINBOX IS_ENABLED(CONFIG_LVGL_USE_SPINBOX)
|
||||
|
||||
#define LV_USE_SWITCH IS_ENABLED(CONFIG_LVGL_USE_SWITCH)
|
||||
|
||||
#define LV_USE_TEXTAREA IS_ENABLED(CONFIG_LVGL_USE_TEXTAREA)
|
||||
#if LV_USE_TEXTAREA
|
||||
#define LV_TA_DEF_CURSOR_BLINK_TIME CONFIG_LVGL_TA_DEF_CURSOR_BLINK_TIME
|
||||
#define LV_TA_DEF_PWD_SHOW_TIME CONFIG_LVGL_TA_DEF_PWD_SHOW_TIME
|
||||
#endif
|
||||
|
||||
#define LV_USE_TABLE IS_ENABLED(CONFIG_LVGL_USE_TABLE)
|
||||
#if LV_USE_TABLE
|
||||
#define LV_TABLE_COL_MAX CONFIG_LVGL_TABLE_COL_MAX
|
||||
#endif
|
||||
|
||||
#define LV_USE_TABVIEW IS_ENABLED(CONFIG_LVGL_USE_TABVIEW)
|
||||
#if LV_USE_TABVIEW
|
||||
#define LV_TABVIEW_DEF_ANIM_TIME CONFIG_LVGL_TABVIEW_DEF_ANIM_TIME
|
||||
#endif
|
||||
|
||||
#define LV_USE_TILEVIEW IS_ENABLED(CONFIG_LVGL_USE_TILEVIEW)
|
||||
#if LV_USE_TILEVIEW
|
||||
#define LV_TILEVIEW_DEF_ANIM_TIME CONFIG_LVGL_TILEVIEW_DEF_ANIM_TIME
|
||||
#endif
|
||||
|
||||
#define LV_USE_WIN IS_ENABLED(CONFIG_LVGL_USE_WIN)
|
||||
|
||||
#endif /* ZEPHYR_LIB_GUI_LVGL_LV_CONF_H_ */
|
|
@ -1,358 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <init.h>
|
||||
#include <zephyr.h>
|
||||
#include <lvgl.h>
|
||||
#include "lvgl_display.h"
|
||||
#ifdef CONFIG_LVGL_USE_FILESYSTEM
|
||||
#include "lvgl_fs.h"
|
||||
#endif
|
||||
#ifdef CONFIG_LVGL_POINTER_KSCAN
|
||||
#include <drivers/kscan.h>
|
||||
#endif
|
||||
#include LV_MEM_CUSTOM_INCLUDE
|
||||
|
||||
#define LOG_LEVEL CONFIG_LVGL_LOG_LEVEL
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_REGISTER(lvgl);
|
||||
|
||||
static lv_disp_drv_t disp_drv;
|
||||
#ifdef CONFIG_LVGL_POINTER_KSCAN
|
||||
static lv_indev_drv_t indev_drv;
|
||||
#endif /* CONFIG_LVGL_POINTER_KSCAN */
|
||||
|
||||
#ifdef CONFIG_LVGL_BUFFER_ALLOC_STATIC
|
||||
|
||||
static lv_disp_draw_buf_t disp_buf;
|
||||
|
||||
#define BUFFER_SIZE (CONFIG_LVGL_BITS_PER_PIXEL * ((CONFIG_LVGL_VDB_SIZE * \
|
||||
CONFIG_LVGL_HOR_RES_MAX * CONFIG_LVGL_VER_RES_MAX) / 100) / 8)
|
||||
|
||||
#define NBR_PIXELS_IN_BUFFER (BUFFER_SIZE * 8 / CONFIG_LVGL_BITS_PER_PIXEL)
|
||||
|
||||
/* NOTE: depending on chosen color depth buffer may be accessed using uint8_t *,
|
||||
* uint16_t * or uint32_t *, therefore buffer needs to be aligned accordingly to
|
||||
* prevent unaligned memory accesses.
|
||||
*/
|
||||
static uint8_t buf0[BUFFER_SIZE] __aligned(4);
|
||||
#ifdef CONFIG_LVGL_DOUBLE_VDB
|
||||
static uint8_t buf1[BUFFER_SIZE] __aligned(4);
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_LVGL_BUFFER_ALLOC_STATIC */
|
||||
|
||||
#if CONFIG_LVGL_LOG_LEVEL != 0
|
||||
/*
|
||||
* In LVGLv8 the signature of the logging callback has changes and it no longer
|
||||
* takes the log level as an integer argument. Instead, the log level is now
|
||||
* already part of the buffer passed to the logging callback. It's not optimal
|
||||
* but we need to live with it and parse the buffer manually to determine the
|
||||
* level and then truncate the string we actually pass to the logging framework.
|
||||
*/
|
||||
static void lvgl_log(const char *buf)
|
||||
{
|
||||
/*
|
||||
* This is ugly and should be done in a loop or something but as it
|
||||
* turned out, Z_LOG()'s first argument (that specifies the log level)
|
||||
* cannot be an l-value...
|
||||
*
|
||||
* We also assume lvgl is sane and always supplies the level string.
|
||||
*/
|
||||
switch (buf[1]) {
|
||||
case 'E':
|
||||
LOG_ERR("%s", log_strdup(buf + strlen("[Error] ")));
|
||||
break;
|
||||
case 'W':
|
||||
LOG_WRN("%s", log_strdup(buf + strlen("Warn] ")));
|
||||
break;
|
||||
case 'I':
|
||||
LOG_INF("%s", log_strdup(buf + strlen("[Info] ")));
|
||||
break;
|
||||
case 'T':
|
||||
LOG_DBG("%s", log_strdup(buf + strlen("[Trace] ")));
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LVGL_BUFFER_ALLOC_STATIC
|
||||
|
||||
static int lvgl_allocate_rendering_buffers(lv_disp_drv_t *disp_drv)
|
||||
{
|
||||
struct display_capabilities cap;
|
||||
const struct device *display_dev = (const struct device *)disp_drv->user_data;
|
||||
int err = 0;
|
||||
|
||||
display_get_capabilities(display_dev, &cap);
|
||||
|
||||
if (cap.x_resolution <= CONFIG_LVGL_HOR_RES_MAX) {
|
||||
disp_drv->hor_res = cap.x_resolution;
|
||||
} else {
|
||||
LOG_ERR("Horizontal resolution is larger than maximum");
|
||||
err = -ENOTSUP;
|
||||
}
|
||||
|
||||
if (cap.y_resolution <= CONFIG_LVGL_VER_RES_MAX) {
|
||||
disp_drv->ver_res = cap.y_resolution;
|
||||
} else {
|
||||
LOG_ERR("Vertical resolution is larger than maximum");
|
||||
err = -ENOTSUP;
|
||||
}
|
||||
|
||||
disp_drv->draw_buf = &disp_buf;
|
||||
#ifdef CONFIG_LVGL_DOUBLE_VDB
|
||||
lv_disp_draw_buf_init(disp_drv->draw_buf, &buf0, &buf1, NBR_PIXELS_IN_BUFFER);
|
||||
#else
|
||||
lv_disp_draw_buf_init(disp_drv->draw_buf, &buf0, NULL, NBR_PIXELS_IN_BUFFER);
|
||||
#endif /* CONFIG_LVGL_DOUBLE_VDB */
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static int lvgl_allocate_rendering_buffers(lv_disp_drv_t *disp_drv)
|
||||
{
|
||||
void *buf0 = NULL;
|
||||
void *buf1 = NULL;
|
||||
uint16_t buf_nbr_pixels;
|
||||
uint32_t buf_size;
|
||||
struct display_capabilities cap;
|
||||
const struct device *display_dev = (const struct device *)disp_drv->user_data;
|
||||
|
||||
display_get_capabilities(display_dev, &cap);
|
||||
|
||||
disp_drv->hor_res = cap.x_resolution;
|
||||
disp_drv->ver_res = cap.y_resolution;
|
||||
|
||||
buf_nbr_pixels = (CONFIG_LVGL_VDB_SIZE * disp_drv->hor_res *
|
||||
disp_drv->ver_res) / 100;
|
||||
/* one horizontal line is the minimum buffer requirement for lvgl */
|
||||
if (buf_nbr_pixels < disp_drv->hor_res) {
|
||||
buf_nbr_pixels = disp_drv->hor_res;
|
||||
}
|
||||
|
||||
switch (cap.current_pixel_format) {
|
||||
case PIXEL_FORMAT_ARGB_8888:
|
||||
buf_size = 4 * buf_nbr_pixels;
|
||||
break;
|
||||
case PIXEL_FORMAT_RGB_888:
|
||||
buf_size = 3 * buf_nbr_pixels;
|
||||
break;
|
||||
case PIXEL_FORMAT_RGB_565:
|
||||
buf_size = 2 * buf_nbr_pixels;
|
||||
break;
|
||||
case PIXEL_FORMAT_MONO01:
|
||||
case PIXEL_FORMAT_MONO10:
|
||||
buf_size = buf_nbr_pixels / 8;
|
||||
buf_size += (buf_nbr_pixels % 8) == 0 ? 0 : 1;
|
||||
break;
|
||||
default:
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
buf0 = LV_MEM_CUSTOM_ALLOC(buf_size);
|
||||
if (buf0 == NULL) {
|
||||
LOG_ERR("Failed to allocate memory for rendering buffer");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LVGL_DOUBLE_VDB
|
||||
buf1 = LV_MEM_CUSTOM_ALLOC(buf_size);
|
||||
if (buf1 == NULL) {
|
||||
LV_MEM_CUSTOM_FREE(buf0);
|
||||
LOG_ERR("Failed to allocate memory for rendering buffer");
|
||||
return -ENOMEM;
|
||||
}
|
||||
#endif
|
||||
|
||||
disp_drv->draw_buf = LV_MEM_CUSTOM_ALLOC(sizeof(lv_disp_draw_buf_t));
|
||||
if (disp_drv->draw_buf == NULL) {
|
||||
LV_MEM_CUSTOM_FREE(buf0);
|
||||
LV_MEM_CUSTOM_FREE(buf1);
|
||||
LOG_ERR("Failed to allocate memory to store rendering buffers");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
lv_disp_draw_buf_init(disp_drv->draw_buf, buf0, buf1, buf_nbr_pixels);
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_LVGL_BUFFER_ALLOC_STATIC */
|
||||
|
||||
#ifdef CONFIG_LVGL_POINTER_KSCAN
|
||||
K_MSGQ_DEFINE(kscan_msgq, sizeof(lv_indev_data_t),
|
||||
CONFIG_LVGL_POINTER_KSCAN_MSGQ_COUNT, 4);
|
||||
|
||||
static void lvgl_pointer_kscan_callback(const struct device *dev,
|
||||
uint32_t row,
|
||||
uint32_t col, bool pressed)
|
||||
{
|
||||
lv_indev_data_t data = {
|
||||
.point.x = col,
|
||||
.point.y = row,
|
||||
.state = pressed ? LV_INDEV_STATE_PR : LV_INDEV_STATE_REL,
|
||||
};
|
||||
|
||||
if (k_msgq_put(&kscan_msgq, &data, K_NO_WAIT) != 0) {
|
||||
LOG_ERR("Could put input data into queue");
|
||||
}
|
||||
}
|
||||
|
||||
static void lvgl_pointer_kscan_read(lv_indev_drv_t *drv, lv_indev_data_t *data)
|
||||
{
|
||||
lv_disp_t *disp;
|
||||
const struct device *disp_dev;
|
||||
struct display_capabilities cap;
|
||||
lv_indev_data_t curr;
|
||||
|
||||
static lv_indev_data_t prev = {
|
||||
.point.x = 0,
|
||||
.point.y = 0,
|
||||
.state = LV_INDEV_STATE_REL,
|
||||
};
|
||||
|
||||
if (k_msgq_get(&kscan_msgq, &curr, K_NO_WAIT) != 0) {
|
||||
goto set_and_release;
|
||||
}
|
||||
|
||||
prev = curr;
|
||||
|
||||
disp = lv_disp_get_default();
|
||||
disp_dev = disp->driver->user_data;
|
||||
|
||||
display_get_capabilities(disp_dev, &cap);
|
||||
|
||||
/* adjust kscan coordinates */
|
||||
if (IS_ENABLED(CONFIG_LVGL_POINTER_KSCAN_SWAP_XY)) {
|
||||
lv_coord_t x;
|
||||
|
||||
x = prev.point.x;
|
||||
prev.point.x = prev.point.y;
|
||||
prev.point.y = x;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_LVGL_POINTER_KSCAN_INVERT_X)) {
|
||||
if (cap.current_orientation == DISPLAY_ORIENTATION_NORMAL ||
|
||||
cap.current_orientation == DISPLAY_ORIENTATION_ROTATED_180) {
|
||||
prev.point.x = cap.x_resolution - prev.point.x;
|
||||
} else {
|
||||
prev.point.x = cap.y_resolution - prev.point.x;
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_LVGL_POINTER_KSCAN_INVERT_Y)) {
|
||||
if (cap.current_orientation == DISPLAY_ORIENTATION_NORMAL ||
|
||||
cap.current_orientation == DISPLAY_ORIENTATION_ROTATED_180) {
|
||||
prev.point.y = cap.y_resolution - prev.point.y;
|
||||
} else {
|
||||
prev.point.y = cap.x_resolution - prev.point.y;
|
||||
}
|
||||
}
|
||||
|
||||
/* rotate touch point to match display rotation */
|
||||
if (cap.current_orientation == DISPLAY_ORIENTATION_ROTATED_90) {
|
||||
lv_coord_t x;
|
||||
|
||||
x = prev.point.x;
|
||||
prev.point.x = prev.point.y;
|
||||
prev.point.y = cap.y_resolution - x;
|
||||
} else if (cap.current_orientation == DISPLAY_ORIENTATION_ROTATED_180) {
|
||||
prev.point.x = cap.x_resolution - prev.point.x;
|
||||
prev.point.y = cap.y_resolution - prev.point.y;
|
||||
} else if (cap.current_orientation == DISPLAY_ORIENTATION_ROTATED_270) {
|
||||
lv_coord_t x;
|
||||
|
||||
x = prev.point.x;
|
||||
prev.point.x = cap.x_resolution - prev.point.y;
|
||||
prev.point.y = x;
|
||||
}
|
||||
|
||||
set_and_release:
|
||||
*data = prev;
|
||||
|
||||
k_msgq_num_used_get(&kscan_msgq);
|
||||
}
|
||||
|
||||
static int lvgl_pointer_kscan_init(void)
|
||||
{
|
||||
const struct device *kscan_dev =
|
||||
device_get_binding(CONFIG_LVGL_POINTER_KSCAN_DEV_NAME);
|
||||
|
||||
if (kscan_dev == NULL) {
|
||||
LOG_ERR("Keyboard scan device not found.");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (kscan_config(kscan_dev, lvgl_pointer_kscan_callback) < 0) {
|
||||
LOG_ERR("Could not configure keyboard scan device.");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
lv_indev_drv_init(&indev_drv);
|
||||
indev_drv.type = LV_INDEV_TYPE_POINTER;
|
||||
indev_drv.read_cb = lvgl_pointer_kscan_read;
|
||||
|
||||
if (lv_indev_drv_register(&indev_drv) == NULL) {
|
||||
LOG_ERR("Failed to register input device.");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
kscan_enable_callback(kscan_dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_LVGL_POINTER_KSCAN */
|
||||
|
||||
static int lvgl_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
const struct device *display_dev =
|
||||
device_get_binding(CONFIG_LVGL_DISPLAY_DEV_NAME);
|
||||
int err = 0;
|
||||
|
||||
if (display_dev == NULL) {
|
||||
LOG_ERR("Display device not found.");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
#if CONFIG_LVGL_LOG_LEVEL != 0
|
||||
lv_log_register_print_cb(lvgl_log);
|
||||
#endif
|
||||
|
||||
lv_init();
|
||||
|
||||
#ifdef CONFIG_LVGL_USE_FILESYSTEM
|
||||
lvgl_fs_init();
|
||||
#endif
|
||||
|
||||
lv_disp_drv_init(&disp_drv);
|
||||
disp_drv.user_data = (void *) display_dev;
|
||||
|
||||
err = lvgl_allocate_rendering_buffers(&disp_drv);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
|
||||
if (set_lvgl_rendering_cb(&disp_drv) != 0) {
|
||||
LOG_ERR("Display not supported.");
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
if (lv_disp_drv_register(&disp_drv) == NULL) {
|
||||
LOG_ERR("Failed to register display device.");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LVGL_POINTER_KSCAN
|
||||
lvgl_pointer_kscan_init();
|
||||
#endif /* CONFIG_LVGL_POINTER_KSCAN */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(lvgl_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY);
|
|
@ -1,58 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "lvgl_display.h"
|
||||
|
||||
int set_lvgl_rendering_cb(lv_disp_drv_t *disp_drv)
|
||||
{
|
||||
int err = 0;
|
||||
const struct device *display_dev = (const struct device *)disp_drv->user_data;
|
||||
struct display_capabilities cap;
|
||||
|
||||
display_get_capabilities(display_dev, &cap);
|
||||
|
||||
switch (cap.current_pixel_format) {
|
||||
case PIXEL_FORMAT_ARGB_8888:
|
||||
disp_drv->flush_cb = lvgl_flush_cb_32bit;
|
||||
disp_drv->rounder_cb = NULL;
|
||||
#ifdef CONFIG_LVGL_COLOR_DEPTH_32
|
||||
disp_drv->set_px_cb = NULL;
|
||||
#else
|
||||
disp_drv->set_px_cb = lvgl_set_px_cb_32bit;
|
||||
#endif
|
||||
break;
|
||||
case PIXEL_FORMAT_RGB_888:
|
||||
disp_drv->flush_cb = lvgl_flush_cb_24bit;
|
||||
disp_drv->rounder_cb = NULL;
|
||||
disp_drv->set_px_cb = lvgl_set_px_cb_24bit;
|
||||
break;
|
||||
case PIXEL_FORMAT_RGB_565:
|
||||
case PIXEL_FORMAT_BGR_565:
|
||||
disp_drv->flush_cb = lvgl_flush_cb_16bit;
|
||||
disp_drv->rounder_cb = NULL;
|
||||
#ifdef CONFIG_LVGL_COLOR_DEPTH_16
|
||||
disp_drv->set_px_cb = NULL;
|
||||
#else
|
||||
disp_drv->set_px_cb = lvgl_set_px_cb_16bit;
|
||||
#endif
|
||||
break;
|
||||
case PIXEL_FORMAT_MONO01:
|
||||
case PIXEL_FORMAT_MONO10:
|
||||
disp_drv->flush_cb = lvgl_flush_cb_mono;
|
||||
disp_drv->rounder_cb = lvgl_rounder_cb_mono;
|
||||
disp_drv->set_px_cb = lvgl_set_px_cb_mono;
|
||||
break;
|
||||
default:
|
||||
disp_drv->flush_cb = NULL;
|
||||
disp_drv->rounder_cb = NULL;
|
||||
disp_drv->set_px_cb = NULL;
|
||||
err = -ENOTSUP;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_LIB_GUI_LVGL_LVGL_DISPLAY_H_
|
||||
#define ZEPHYR_LIB_GUI_LVGL_LVGL_DISPLAY_H_
|
||||
|
||||
#include <drivers/display.h>
|
||||
#include <lvgl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void lvgl_flush_cb_mono(lv_disp_drv_t *disp_drv,
|
||||
const lv_area_t *area, lv_color_t *color_p);
|
||||
void lvgl_flush_cb_16bit(lv_disp_drv_t *disp_drv,
|
||||
const lv_area_t *area, lv_color_t *color_p);
|
||||
void lvgl_flush_cb_24bit(lv_disp_drv_t *disp_drv,
|
||||
const lv_area_t *area, lv_color_t *color_p);
|
||||
void lvgl_flush_cb_32bit(lv_disp_drv_t *disp_drv,
|
||||
const lv_area_t *area, lv_color_t *color_p);
|
||||
|
||||
void lvgl_set_px_cb_mono(lv_disp_drv_t *disp_drv,
|
||||
uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
|
||||
lv_color_t color, lv_opa_t opa);
|
||||
void lvgl_set_px_cb_16bit(lv_disp_drv_t *disp_drv,
|
||||
uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
|
||||
lv_color_t color, lv_opa_t opa);
|
||||
void lvgl_set_px_cb_24bit(lv_disp_drv_t *disp_drv,
|
||||
uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
|
||||
lv_color_t color, lv_opa_t opa);
|
||||
void lvgl_set_px_cb_32bit(lv_disp_drv_t *disp_drv,
|
||||
uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
|
||||
lv_color_t color, lv_opa_t opa);
|
||||
|
||||
void lvgl_rounder_cb_mono(lv_disp_drv_t *disp_drv, lv_area_t *area);
|
||||
|
||||
int set_lvgl_rendering_cb(lv_disp_drv_t *disp_drv);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ZEPHYR_LIB_GUI_LVGL_LVGL_DISPLAY_H */
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <lvgl.h>
|
||||
#include "lvgl_display.h"
|
||||
|
||||
void lvgl_flush_cb_16bit(lv_disp_drv_t *disp_drv,
|
||||
const lv_area_t *area, lv_color_t *color_p)
|
||||
{
|
||||
const struct device *display_dev = (const struct device *)disp_drv->user_data;
|
||||
uint16_t w = area->x2 - area->x1 + 1;
|
||||
uint16_t h = area->y2 - area->y1 + 1;
|
||||
struct display_buffer_descriptor desc;
|
||||
|
||||
desc.buf_size = w * 2U * h;
|
||||
desc.width = w;
|
||||
desc.pitch = w;
|
||||
desc.height = h;
|
||||
display_write(display_dev, area->x1, area->y1, &desc, (void *) color_p);
|
||||
|
||||
lv_disp_flush_ready(disp_drv);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_LVGL_COLOR_DEPTH_16
|
||||
void lvgl_set_px_cb_16bit(lv_disp_drv_t *disp_drv,
|
||||
uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
|
||||
lv_color_t color, lv_opa_t opa)
|
||||
{
|
||||
uint16_t *buf_xy = (uint16_t *)(buf + x * 2U + y * 2U * buf_w);
|
||||
*buf_xy = lv_color_to16(color);
|
||||
}
|
||||
#endif
|
|
@ -1,50 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <lvgl.h>
|
||||
#include "lvgl_display.h"
|
||||
|
||||
void lvgl_flush_cb_24bit(lv_disp_drv_t *disp_drv,
|
||||
const lv_area_t *area, lv_color_t *color_p)
|
||||
{
|
||||
const struct device *display_dev = (const struct device *)disp_drv->user_data;
|
||||
uint16_t w = area->x2 - area->x1 + 1;
|
||||
uint16_t h = area->y2 - area->y1 + 1;
|
||||
struct display_buffer_descriptor desc;
|
||||
|
||||
desc.buf_size = w * 3U * h;
|
||||
desc.width = w;
|
||||
desc.pitch = w;
|
||||
desc.height = h;
|
||||
display_write(display_dev, area->x1, area->y1, &desc, (void *) color_p);
|
||||
|
||||
lv_disp_flush_ready(disp_drv);
|
||||
}
|
||||
|
||||
void lvgl_set_px_cb_24bit(lv_disp_drv_t *disp_drv,
|
||||
uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
|
||||
lv_color_t color, lv_opa_t opa)
|
||||
{
|
||||
uint8_t *buf_xy = buf + x * 3U + y * 3U * buf_w;
|
||||
lv_color32_t converted_color;
|
||||
|
||||
#ifdef CONFIG_LVGL_COLOR_DEPTH_32
|
||||
if (opa != LV_OPA_COVER) {
|
||||
lv_color_t mix_color;
|
||||
|
||||
mix_color.ch.red = *buf_xy;
|
||||
mix_color.ch.green = *(buf_xy+1);
|
||||
mix_color.ch.blue = *(buf_xy+2);
|
||||
color = lv_color_mix(color, mix_color, opa);
|
||||
}
|
||||
#endif
|
||||
|
||||
converted_color.full = lv_color_to32(color);
|
||||
*buf_xy = converted_color.ch.red;
|
||||
*(buf_xy + 1) = converted_color.ch.green;
|
||||
*(buf_xy + 2) = converted_color.ch.blue;
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <lvgl.h>
|
||||
#include "lvgl_display.h"
|
||||
|
||||
void lvgl_flush_cb_32bit(lv_disp_drv_t *disp_drv,
|
||||
const lv_area_t *area, lv_color_t *color_p)
|
||||
{
|
||||
const struct device *display_dev = (const struct device *)disp_drv->user_data;
|
||||
uint16_t w = area->x2 - area->x1 + 1;
|
||||
uint16_t h = area->y2 - area->y1 + 1;
|
||||
struct display_buffer_descriptor desc;
|
||||
|
||||
desc.buf_size = w * 4U * h;
|
||||
desc.width = w;
|
||||
desc.pitch = w;
|
||||
desc.height = h;
|
||||
display_write(display_dev, area->x1, area->y1, &desc, (void *) color_p);
|
||||
|
||||
lv_disp_flush_ready(disp_drv);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_LVGL_COLOR_DEPTH_32
|
||||
void lvgl_set_px_cb_32bit(lv_disp_drv_t *disp_drv,
|
||||
uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
|
||||
lv_color_t color, lv_opa_t opa)
|
||||
{
|
||||
uint32_t *buf_xy = (uint32_t *)(buf + x * 4U + y * 4U * buf_w);
|
||||
|
||||
if (opa == LV_OPA_COVER) {
|
||||
/* Do not mix if not required */
|
||||
*buf_xy = lv_color_to32(color);
|
||||
} else {
|
||||
lv_color_t bg_color = *((lv_color_t *)buf_xy);
|
||||
*buf_xy = lv_color_to32(lv_color_mix(color, bg_color, opa));
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -1,100 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <lvgl.h>
|
||||
#include "lvgl_display.h"
|
||||
|
||||
void lvgl_flush_cb_mono(lv_disp_drv_t *disp_drv,
|
||||
const lv_area_t *area, lv_color_t *color_p)
|
||||
{
|
||||
uint16_t w = area->x2 - area->x1 + 1;
|
||||
uint16_t h = area->y2 - area->y1 + 1;
|
||||
const struct device *display_dev = (const struct device *)disp_drv->user_data;
|
||||
struct display_capabilities cap;
|
||||
struct display_buffer_descriptor desc;
|
||||
|
||||
display_get_capabilities(display_dev, &cap);
|
||||
|
||||
desc.buf_size = (w * h)/8U;
|
||||
desc.width = w;
|
||||
desc.pitch = w;
|
||||
desc.height = h;
|
||||
display_write(display_dev, area->x1, area->y1, &desc, (void *) color_p);
|
||||
if (cap.screen_info & SCREEN_INFO_DOUBLE_BUFFER) {
|
||||
display_write(display_dev, area->x1, area->y1, &desc,
|
||||
(void *) color_p);
|
||||
}
|
||||
|
||||
lv_disp_flush_ready(disp_drv);
|
||||
}
|
||||
|
||||
|
||||
void lvgl_set_px_cb_mono(lv_disp_drv_t *disp_drv,
|
||||
uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
|
||||
lv_color_t color, lv_opa_t opa)
|
||||
{
|
||||
const struct device *display_dev = (const struct device *)disp_drv->user_data;
|
||||
uint8_t *buf_xy;
|
||||
uint8_t bit;
|
||||
struct display_capabilities cap;
|
||||
|
||||
display_get_capabilities(display_dev, &cap);
|
||||
|
||||
if (cap.screen_info & SCREEN_INFO_MONO_VTILED) {
|
||||
buf_xy = buf + x + y/8 * buf_w;
|
||||
|
||||
if (cap.screen_info & SCREEN_INFO_MONO_MSB_FIRST) {
|
||||
bit = 7 - y%8;
|
||||
} else {
|
||||
bit = y%8;
|
||||
}
|
||||
} else {
|
||||
buf_xy = buf + x/8 + y * buf_w/8;
|
||||
|
||||
if (cap.screen_info & SCREEN_INFO_MONO_MSB_FIRST) {
|
||||
bit = 7 - x%8;
|
||||
} else {
|
||||
bit = x%8;
|
||||
}
|
||||
}
|
||||
|
||||
if (cap.current_pixel_format == PIXEL_FORMAT_MONO10) {
|
||||
if (color.full == 0) {
|
||||
*buf_xy &= ~BIT(bit);
|
||||
} else {
|
||||
*buf_xy |= BIT(bit);
|
||||
}
|
||||
} else {
|
||||
if (color.full == 0) {
|
||||
*buf_xy |= BIT(bit);
|
||||
} else {
|
||||
*buf_xy &= ~BIT(bit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void lvgl_rounder_cb_mono(lv_disp_drv_t *disp_drv,
|
||||
lv_area_t *area)
|
||||
{
|
||||
const struct device *display_dev = (const struct device *)disp_drv->user_data;
|
||||
struct display_capabilities cap;
|
||||
|
||||
display_get_capabilities(display_dev, &cap);
|
||||
|
||||
if (cap.screen_info & SCREEN_INFO_X_ALIGNMENT_WIDTH) {
|
||||
area->x1 = 0;
|
||||
area->x2 = cap.x_resolution - 1;
|
||||
} else {
|
||||
if (cap.screen_info & SCREEN_INFO_MONO_VTILED) {
|
||||
area->y1 &= ~0x7;
|
||||
area->y2 |= 0x7;
|
||||
} else {
|
||||
area->x1 &= ~0x7;
|
||||
area->x2 |= 0x7;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,210 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2019 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <lvgl.h>
|
||||
#include <zephyr.h>
|
||||
#include <fs/fs.h>
|
||||
#include <stdlib.h>
|
||||
#include "lvgl_fs.h"
|
||||
|
||||
static bool lvgl_fs_ready(struct _lv_fs_drv_t *drv)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static lv_fs_res_t errno_to_lv_fs_res(int err)
|
||||
{
|
||||
switch (err) {
|
||||
case 0:
|
||||
return LV_FS_RES_OK;
|
||||
case -EIO:
|
||||
/*Low level hardware error*/
|
||||
return LV_FS_RES_HW_ERR;
|
||||
case -EBADF:
|
||||
/*Error in the file system structure */
|
||||
return LV_FS_RES_FS_ERR;
|
||||
case -ENOENT:
|
||||
/*Driver, file or directory is not exists*/
|
||||
return LV_FS_RES_NOT_EX;
|
||||
case -EFBIG:
|
||||
/*Disk full*/
|
||||
return LV_FS_RES_FULL;
|
||||
case -EACCES:
|
||||
/*Access denied. Check 'fs_open' modes and write protect*/
|
||||
return LV_FS_RES_DENIED;
|
||||
case -EBUSY:
|
||||
/*The file system now can't handle it, try later*/
|
||||
return LV_FS_RES_BUSY;
|
||||
case -ENOMEM:
|
||||
/*Not enough memory for an internal operation*/
|
||||
return LV_FS_RES_OUT_OF_MEM;
|
||||
case -EINVAL:
|
||||
/*Invalid parameter among arguments*/
|
||||
return LV_FS_RES_INV_PARAM;
|
||||
default:
|
||||
return LV_FS_RES_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
static void *lvgl_fs_open(struct _lv_fs_drv_t *drv, const char *path,
|
||||
lv_fs_mode_t mode)
|
||||
{
|
||||
int err;
|
||||
int zmode = FS_O_CREATE;
|
||||
void *file;
|
||||
|
||||
/* LVGL is passing absolute paths without the root slash add it back
|
||||
* by decrementing the path pointer.
|
||||
*/
|
||||
path--;
|
||||
|
||||
zmode |= (mode & LV_FS_MODE_WR) ? FS_O_WRITE : 0;
|
||||
zmode |= (mode & LV_FS_MODE_RD) ? FS_O_READ : 0;
|
||||
|
||||
file = malloc(sizeof(struct fs_file_t));
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
err = fs_open((struct fs_file_t *)file, path, zmode);
|
||||
if (err)
|
||||
return NULL;
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
static lv_fs_res_t lvgl_fs_close(struct _lv_fs_drv_t *drv, void *file)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = fs_close((struct fs_file_t *)file);
|
||||
return errno_to_lv_fs_res(err);
|
||||
}
|
||||
|
||||
static lv_fs_res_t lvgl_fs_read(struct _lv_fs_drv_t *drv, void *file,
|
||||
void *buf, uint32_t btr, uint32_t *br)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = fs_read((struct fs_file_t *)file, buf, btr);
|
||||
if (err > 0) {
|
||||
if (br != NULL) {
|
||||
*br = err;
|
||||
}
|
||||
err = 0;
|
||||
} else if (br != NULL) {
|
||||
*br = 0U;
|
||||
}
|
||||
return errno_to_lv_fs_res(err);
|
||||
}
|
||||
|
||||
static lv_fs_res_t lvgl_fs_write(struct _lv_fs_drv_t *drv, void *file,
|
||||
const void *buf, uint32_t btw, uint32_t *bw)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = fs_write((struct fs_file_t *)file, buf, btw);
|
||||
if (err == btw) {
|
||||
if (bw != NULL) {
|
||||
*bw = btw;
|
||||
}
|
||||
err = 0;
|
||||
} else if (err < 0) {
|
||||
if (bw != NULL) {
|
||||
*bw = 0U;
|
||||
}
|
||||
} else {
|
||||
if (bw != NULL) {
|
||||
*bw = err;
|
||||
}
|
||||
err = -EFBIG;
|
||||
}
|
||||
return errno_to_lv_fs_res(err);
|
||||
}
|
||||
|
||||
static lv_fs_res_t lvgl_fs_seek(struct _lv_fs_drv_t *drv, void *file,
|
||||
uint32_t pos, lv_fs_whence_t whence)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = fs_seek((struct fs_file_t *)file, pos, FS_SEEK_SET);
|
||||
return errno_to_lv_fs_res(err);
|
||||
}
|
||||
|
||||
static lv_fs_res_t lvgl_fs_tell(struct _lv_fs_drv_t *drv, void *file,
|
||||
uint32_t *pos_p)
|
||||
{
|
||||
*pos_p = fs_tell((struct fs_file_t *)file);
|
||||
return LV_FS_RES_OK;
|
||||
}
|
||||
|
||||
static void *lvgl_fs_dir_open(struct _lv_fs_drv_t *drv, const char *path)
|
||||
{
|
||||
void *dir;
|
||||
int err;
|
||||
|
||||
/* LVGL is passing absolute paths without the root slash add it back
|
||||
* by decrementing the path pointer.
|
||||
*/
|
||||
path--;
|
||||
|
||||
dir = malloc(sizeof(struct fs_dir_t));
|
||||
if (!dir)
|
||||
return NULL;
|
||||
|
||||
fs_dir_t_init((struct fs_dir_t *)dir);
|
||||
err = fs_opendir((struct fs_dir_t *)dir, path);
|
||||
if (err)
|
||||
return NULL;
|
||||
|
||||
return dir;
|
||||
}
|
||||
|
||||
static lv_fs_res_t lvgl_fs_dir_read(struct _lv_fs_drv_t *drv, void *dir,
|
||||
char *fn)
|
||||
{
|
||||
/* LVGL expects a string as return parameter but the format of the
|
||||
* string is not documented.
|
||||
*/
|
||||
return LV_FS_RES_NOT_IMP;
|
||||
}
|
||||
|
||||
static lv_fs_res_t lvgl_fs_dir_close(struct _lv_fs_drv_t *drv, void *dir)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = fs_closedir((struct fs_dir_t *)dir);
|
||||
free(dir);
|
||||
return errno_to_lv_fs_res(err);
|
||||
}
|
||||
|
||||
static lv_fs_drv_t fs_drv;
|
||||
|
||||
void lvgl_fs_init(void)
|
||||
{
|
||||
lv_fs_drv_init(&fs_drv);
|
||||
|
||||
/* LVGL uses letter based mount points, just pass the root slash as a
|
||||
* letter. Note that LVGL will remove the drive letter, or in this case
|
||||
* the root slash, from the path passed via the FS callbacks.
|
||||
* Zephyr FS API assumes this slash is present so we will need to add
|
||||
* it back.
|
||||
*/
|
||||
fs_drv.letter = '/';
|
||||
fs_drv.ready_cb = lvgl_fs_ready;
|
||||
|
||||
fs_drv.open_cb = lvgl_fs_open;
|
||||
fs_drv.close_cb = lvgl_fs_close;
|
||||
fs_drv.read_cb = lvgl_fs_read;
|
||||
fs_drv.write_cb = lvgl_fs_write;
|
||||
fs_drv.seek_cb = lvgl_fs_seek;
|
||||
fs_drv.tell_cb = lvgl_fs_tell;
|
||||
|
||||
fs_drv.dir_open_cb = lvgl_fs_dir_open;
|
||||
fs_drv.dir_read_cb = lvgl_fs_dir_read;
|
||||
fs_drv.dir_close_cb = lvgl_fs_dir_close;
|
||||
|
||||
lv_fs_drv_register(&fs_drv);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_LIB_GUI_LVGL_LVGL_FS_H_
|
||||
#define ZEPHYR_LIB_GUI_LVGL_LVGL_FS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void lvgl_fs_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ZEPHYR_LIB_GUI_LVGL_LVGL_FS_H */
|
|
@ -1,60 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
* Copyright (c) 2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "lvgl_mem.h"
|
||||
#include <zephyr.h>
|
||||
#include <init.h>
|
||||
#include <sys/sys_heap.h>
|
||||
|
||||
|
||||
#define HEAP_BYTES (CONFIG_LVGL_MEM_POOL_MAX_SIZE * \
|
||||
CONFIG_LVGL_MEM_POOL_NUMBER_BLOCKS)
|
||||
|
||||
static char lvgl_heap_mem[HEAP_BYTES] __aligned(8);
|
||||
static struct sys_heap lvgl_heap;
|
||||
static struct k_spinlock lvgl_heap_lock;
|
||||
|
||||
void *lvgl_malloc(size_t size)
|
||||
{
|
||||
k_spinlock_key_t key;
|
||||
void *ret;
|
||||
|
||||
key = k_spin_lock(&lvgl_heap_lock);
|
||||
ret = sys_heap_alloc(&lvgl_heap, size);
|
||||
k_spin_unlock(&lvgl_heap_lock, key);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void *lvgl_realloc(void *ptr, size_t size)
|
||||
{
|
||||
k_spinlock_key_t key;
|
||||
void *ret;
|
||||
|
||||
key = k_spin_lock(&lvgl_heap_lock);
|
||||
ret = sys_heap_realloc(&lvgl_heap, ptr, size);
|
||||
k_spin_unlock(&lvgl_heap_lock, key);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void lvgl_free(void *ptr)
|
||||
{
|
||||
k_spinlock_key_t key;
|
||||
|
||||
key = k_spin_lock(&lvgl_heap_lock);
|
||||
sys_heap_free(&lvgl_heap, ptr);
|
||||
k_spin_unlock(&lvgl_heap_lock, key);
|
||||
}
|
||||
|
||||
static int lvgl_heap_init(const struct device *unused)
|
||||
{
|
||||
sys_heap_init(&lvgl_heap, &lvgl_heap_mem[0], HEAP_BYTES);
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(lvgl_heap_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef ZEPHYR_LIB_GUI_LVGL_MEM_H_
|
||||
#define ZEPHYR_LIB_GUI_LVGL_MEM_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void *lvgl_malloc(size_t size);
|
||||
|
||||
void *lvgl_realloc(void *ptr, size_t size);
|
||||
|
||||
void lvgl_free(void *ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ZEPHYR_LIB_GUI_LVGL_MEM_H_i */
|
|
@ -1,22 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Jan Van Winkel <jan.van_winkel@dxplore.eu>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "lvgl_mem.h"
|
||||
#include <zephyr.h>
|
||||
#include <init.h>
|
||||
|
||||
K_HEAP_DEFINE(lvgl_mem_pool, CONFIG_LVGL_MEM_POOL_MAX_SIZE *
|
||||
CONFIG_LVGL_MEM_POOL_NUMBER_BLOCKS);
|
||||
|
||||
void *lvgl_malloc(size_t size)
|
||||
{
|
||||
return k_heap_alloc(&lvgl_mem_pool, size, K_NO_WAIT);
|
||||
}
|
||||
|
||||
void lvgl_free(void *ptr)
|
||||
{
|
||||
k_heap_free(&lvgl_mem_pool, ptr);
|
||||
}
|
|
@ -16,6 +16,7 @@ source "modules/Kconfig.eos_s3"
|
|||
source "modules/Kconfig.imx"
|
||||
source "modules/Kconfig.infineon"
|
||||
source "modules/Kconfig.libmetal"
|
||||
source "modules/Kconfig.lvgl"
|
||||
source "modules/Kconfig.mcux"
|
||||
source "modules/Kconfig.microchip"
|
||||
source "modules/Kconfig.nuvoton"
|
||||
|
|
7
modules/Kconfig.lvgl
Normal file
7
modules/Kconfig.lvgl
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Copyright (c) 2022 Huawei Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config LVGL
|
||||
bool "LittlevGL GUI library"
|
||||
help
|
||||
This option enables the LittlevGL GUI library.
|
1
samples/subsys/display/lvgl/boards/native_posix.conf
Normal file
1
samples/subsys/display/lvgl/boards/native_posix.conf
Normal file
|
@ -0,0 +1 @@
|
|||
CONFIG_LV_COLOR_DEPTH_32=y
|
1
samples/subsys/display/lvgl/boards/native_posix_64.conf
Normal file
1
samples/subsys/display/lvgl/boards/native_posix_64.conf
Normal file
|
@ -0,0 +1 @@
|
|||
CONFIG_LV_COLOR_DEPTH_32=y
|
|
@ -7,9 +7,9 @@ CONFIG_DISPLAY_LOG_LEVEL_ERR=y
|
|||
CONFIG_LOG=y
|
||||
|
||||
CONFIG_LVGL=y
|
||||
CONFIG_LVGL_USE_LABEL=y
|
||||
CONFIG_LVGL_USE_CONT=y
|
||||
CONFIG_LVGL_USE_BTN=y
|
||||
CONFIG_LVGL_USE_IMG=y
|
||||
CONFIG_LVGL_USE_THEME_MATERIAL=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_14=y
|
||||
CONFIG_LV_MEM_CUSTOM=y
|
||||
CONFIG_LV_USE_LOG=y
|
||||
CONFIG_LV_USE_LABEL=y
|
||||
CONFIG_LV_USE_BTN=y
|
||||
CONFIG_LV_USE_IMG=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_14=y
|
||||
|
|
|
@ -12,91 +12,70 @@ CONFIG_FILE_SYSTEM=y
|
|||
CONFIG_FILE_SYSTEM_LITTLEFS=y
|
||||
|
||||
CONFIG_LVGL=y
|
||||
# Make sure that the rendering task is always executed if we call
|
||||
# lv_task_handler by setting the refresh period to zero
|
||||
CONFIG_LVGL_MEM_POOL_NUMBER_BLOCKS=8
|
||||
CONFIG_LVGL_COLOR_SCREEN_TRANSP=y
|
||||
CONFIG_LVGL_ANTIALIAS=y
|
||||
CONFIG_LVGL_USE_ANIMATION=y
|
||||
CONFIG_LVGL_USE_SHADOW=y
|
||||
CONFIG_LVGL_USE_OUTLINE=y
|
||||
CONFIG_LVGL_USE_PATTERN=y
|
||||
CONFIG_LVGL_USE_VALUE_STR=y
|
||||
CONFIG_LVGL_USE_BLEND_MODES=y
|
||||
CONFIG_LVGL_USE_OPA_SCALE=y
|
||||
CONFIG_LVGL_USE_IMG_TRANSFORM=y
|
||||
CONFIG_LVGL_USE_GROUP=y
|
||||
CONFIG_LVGL_USE_GPU=y
|
||||
CONFIG_LVGL_IMG_CF_INDEXED=y
|
||||
CONFIG_LVGL_IMG_CF_ALPHA=y
|
||||
CONFIG_LVGL_USE_FILESYSTEM=y
|
||||
CONFIG_LVGL_DOUBLE_VDB=y
|
||||
CONFIG_LVGL_USE_BIDI=y
|
||||
CONFIG_LVGL_USE_ARABIC_PERSIAN_CHARS=y
|
||||
CONFIG_LVGL_USE_OBJ_REALIGN=y
|
||||
CONFIG_LVGL_USE_LABEL=y
|
||||
CONFIG_LVGL_LABEL_TEXT_SEL=y
|
||||
CONFIG_LVGL_LABEL_LONG_TXT_HINT=y
|
||||
CONFIG_LVGL_USE_IMG=y
|
||||
CONFIG_LVGL_USE_LINE=y
|
||||
CONFIG_LVGL_USE_ARC=y
|
||||
CONFIG_LVGL_USE_CONT=y
|
||||
CONFIG_LVGL_USE_PAGE=y
|
||||
CONFIG_LVGL_USE_WIN=y
|
||||
CONFIG_LVGL_USE_TABVIEW=y
|
||||
CONFIG_LVGL_USE_TILEVIEW=y
|
||||
CONFIG_LVGL_USE_CALENDAR=y
|
||||
CONFIG_LVGL_CALENDAR_WEEK_STARTS_MONDAY=y
|
||||
CONFIG_LVGL_USE_SPINNER=y
|
||||
CONFIG_LVGL_USE_CANVAS=y
|
||||
CONFIG_LVGL_USE_BAR=y
|
||||
CONFIG_LVGL_USE_LINEMETER=y
|
||||
CONFIG_LVGL_USE_GAUGE=y
|
||||
CONFIG_LVGL_USE_CHART=y
|
||||
CONFIG_LVGL_USE_TABLE=y
|
||||
CONFIG_LVGL_USE_LED=y
|
||||
CONFIG_LVGL_USE_MSGBOX=y
|
||||
CONFIG_LVGL_USE_TEXTAREA=y
|
||||
CONFIG_LVGL_USE_SPINBOX=y
|
||||
CONFIG_LVGL_USE_BTN=y
|
||||
CONFIG_LVGL_USE_IMGBTN=y
|
||||
CONFIG_LVGL_IMGBTN_TILED=y
|
||||
CONFIG_LVGL_USE_BTNMATRIX=y
|
||||
CONFIG_LVGL_USE_KEYBOARD=y
|
||||
CONFIG_LVGL_USE_CHECKBOX=y
|
||||
CONFIG_LVGL_USE_LIST=y
|
||||
CONFIG_LVGL_USE_DROPDOWN=y
|
||||
CONFIG_LVGL_USE_ROLLER=y
|
||||
CONFIG_LVGL_USE_SLIDER=y
|
||||
CONFIG_LVGL_USE_SWITCH=y
|
||||
CONFIG_LVGL_USE_LED=y
|
||||
CONFIG_LVGL_USE_OBJMASK=y
|
||||
CONFIG_LVGL_USE_THEME_MATERIAL=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_8=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_10=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_12=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_14=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_16=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_18=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_20=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_22=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_24=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_26=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_28=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_30=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_32=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_34=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_36=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_38=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_40=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_42=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_44=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_46=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_48=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_12_SUBPX=y
|
||||
CONFIG_LVGL_FONT_MONTSERRAT_28_COMPRESSED=y
|
||||
CONFIG_LVGL_FONT_DEJAVU_16_PERSIAN_HEBREW=y
|
||||
CONFIG_LVGL_FONT_SIMSUN_16_CJK=y
|
||||
CONFIG_LVGL_FONT_UNSCII_8=y
|
||||
CONFIG_LVGL_USE_FONT_COMPRESSED=y
|
||||
CONFIG_LVGL_USE_FONT_SUBPX=y
|
||||
CONFIG_LV_MEM_CUSTOM=y
|
||||
CONFIG_LV_USE_LOG=y
|
||||
CONFIG_LV_COLOR_DEPTH_32=y
|
||||
CONFIG_LV_COLOR_SCREEN_TRANSP=y
|
||||
CONFIG_LV_USE_BIDI=y
|
||||
CONFIG_LV_USE_ARABIC_PERSIAN_CHARS=y
|
||||
CONFIG_LV_USE_LABEL=y
|
||||
CONFIG_LV_LABEL_TEXT_SELECTION=y
|
||||
CONFIG_LV_LABEL_LONG_TXT_HINT=y
|
||||
CONFIG_LV_USE_IMG=y
|
||||
CONFIG_LV_USE_LINE=y
|
||||
CONFIG_LV_USE_ARC=y
|
||||
CONFIG_LV_USE_WIN=y
|
||||
CONFIG_LV_USE_TABVIEW=y
|
||||
CONFIG_LV_USE_TILEVIEW=y
|
||||
CONFIG_LV_USE_CALENDAR=y
|
||||
CONFIG_LV_CALENDAR_WEEK_STARTS_MONDAY=y
|
||||
CONFIG_LV_USE_SPINNER=y
|
||||
CONFIG_LV_USE_CANVAS=y
|
||||
CONFIG_LV_USE_BAR=y
|
||||
CONFIG_LV_USE_CHART=y
|
||||
CONFIG_LV_USE_TABLE=y
|
||||
CONFIG_LV_USE_LED=y
|
||||
CONFIG_LV_USE_MSGBOX=y
|
||||
CONFIG_LV_USE_TEXTAREA=y
|
||||
CONFIG_LV_USE_SPINBOX=y
|
||||
CONFIG_LV_USE_BTN=y
|
||||
CONFIG_LV_USE_IMGBTN=y
|
||||
CONFIG_LV_USE_BTNMATRIX=y
|
||||
CONFIG_LV_USE_KEYBOARD=y
|
||||
CONFIG_LV_USE_CHECKBOX=y
|
||||
CONFIG_LV_USE_LIST=y
|
||||
CONFIG_LV_USE_DROPDOWN=y
|
||||
CONFIG_LV_USE_ROLLER=y
|
||||
CONFIG_LV_USE_SLIDER=y
|
||||
CONFIG_LV_USE_SWITCH=y
|
||||
CONFIG_LV_USE_LED=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_8=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_10=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_12=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_14=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_16=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_18=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_20=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_22=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_24=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_26=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_28=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_30=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_32=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_34=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_36=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_38=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_40=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_42=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_44=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_46=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_48=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_12_SUBPX=y
|
||||
CONFIG_LV_FONT_MONTSERRAT_28_COMPRESSED=y
|
||||
CONFIG_LV_FONT_DEJAVU_16_PERSIAN_HEBREW=y
|
||||
CONFIG_LV_FONT_SIMSUN_16_CJK=y
|
||||
CONFIG_LV_FONT_UNSCII_8=y
|
||||
CONFIG_LV_USE_FONT_COMPRESSED=y
|
||||
CONFIG_LV_USE_FONT_SUBPX=y
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
tests:
|
||||
libraries.gui.lvgl:
|
||||
tags: display gui
|
||||
platform_allow: native_posix
|
||||
platform_allow: native_posix_64
|
||||
libraries.gui.lvgl.dynamic.heap.libc:
|
||||
filter: TOOLCHAIN_HAS_NEWLIB == 1
|
||||
tags: display gui
|
||||
platform_allow: native_posix
|
||||
platform_allow: native_posix_64
|
||||
extra_configs:
|
||||
- CONFIG_NEWLIB_LIBC=y
|
||||
- CONFIG_LVGL_BUFFER_ALLOC_DYNAMIC=y
|
||||
- CONFIG_LVGL_MEM_POOL_HEAP_LIB_C=y
|
||||
libraries.gui.lvgl.dynamic.pool.sys_heap:
|
||||
tags: display gui
|
||||
platform_allow: native_posix
|
||||
platform_allow: native_posix_64
|
||||
extra_configs:
|
||||
- CONFIG_LVGL_BUFFER_ALLOC_DYNAMIC=y
|
||||
- CONFIG_LVGL_MEM_POOL_SYS_HEAP=y
|
||||
|
@ -20,22 +20,22 @@ tests:
|
|||
- CONFIG_LVGL_MEM_POOL_MAX_SIZE=32768
|
||||
libraries.gui.lvgl.16bit:
|
||||
tags: display gui
|
||||
platform_allow: native_posix
|
||||
platform_allow: native_posix_64
|
||||
extra_configs:
|
||||
- CONFIG_LVGL_COLOR_DEPTH_16=y
|
||||
- CONFIG_LV_COLOR_DEPTH_16=y
|
||||
libraries.gui.lvgl.8bit:
|
||||
tags: display gui
|
||||
platform_allow: native_posix
|
||||
platform_allow: native_posix_64
|
||||
extra_configs:
|
||||
- CONFIG_LVGL_COLOR_DEPTH_8=y
|
||||
- CONFIG_LV_COLOR_DEPTH_8=y
|
||||
libraries.gui.lvgl.mono:
|
||||
tags: display gui
|
||||
platform_allow: native_posix
|
||||
platform_allow: native_posix_64
|
||||
extra_configs:
|
||||
- CONFIG_LVGL_COLOR_DEPTH_1=y
|
||||
- CONFIG_LV_COLOR_DEPTH_1=y
|
||||
libraries.gui.lvgl.16bit.swap:
|
||||
tags: display gui
|
||||
platform_allow: native_posix
|
||||
platform_allow: native_posix_64
|
||||
extra_configs:
|
||||
- CONFIG_LVGL_COLOR_DEPTH_16=y
|
||||
- CONFIG_LVGL_COLOR_16_SWAP=y
|
||||
- CONFIG_LV_COLOR_DEPTH_16=y
|
||||
- CONFIG_LV_COLOR_16_SWAP=y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue