forked from kofal.net/zmk
fix(display): Do LVGL task processing in main on POSIX. An SDL/Zephyr bug prevents proper display when SDL calls are made from anything but the main thread, so add task handling in our simple main function when on POSIX. fix(usb): Compilation fix for 64-bit targets Properly handle differences in the size of `size_t` on 64-bit architectures. fix(display): Imply, but don't force, LVGL mono theme Some targets may be using color displays, so instead of forcing on the mono theme, merely imply it to default it
178 lines
5.1 KiB
Plaintext
178 lines
5.1 KiB
Plaintext
# Copyright (c) 2020 The ZMK Contributors
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
menuconfig ZMK_DISPLAY
|
|
bool "Enable ZMK Display"
|
|
select DISPLAY
|
|
select LVGL
|
|
imply LV_CONF_MINIMAL
|
|
|
|
if ZMK_DISPLAY
|
|
|
|
config ZMK_DISPLAY_BLANK_ON_IDLE
|
|
bool "Blank display on idle"
|
|
default y if SSD1306
|
|
|
|
if LV_USE_THEME_MONO
|
|
|
|
config ZMK_DISPLAY_INVERT
|
|
bool "Invert display colors"
|
|
|
|
endif
|
|
|
|
choice LV_TXT_ENC
|
|
default LV_TXT_ENC_UTF8
|
|
|
|
endchoice
|
|
|
|
config LV_MEM_CUSTOM
|
|
default y
|
|
|
|
config LV_Z_MEM_POOL_SIZE
|
|
default 4096 if ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN
|
|
|
|
choice ZMK_DISPLAY_STATUS_SCREEN
|
|
prompt "Default status screen for displays"
|
|
|
|
config ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN
|
|
bool "Built in status screen"
|
|
select LV_OBJ_LABEL
|
|
imply LV_USE_THEME_MONO if LV_Z_BITS_PER_PIXEL=1
|
|
imply ZMK_WIDGET_LAYER_STATUS
|
|
imply ZMK_WIDGET_BATTERY_STATUS
|
|
imply ZMK_WIDGET_OUTPUT_STATUS
|
|
imply ZMK_WIDGET_PERIPHERAL_STATUS
|
|
|
|
config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
|
|
bool "Custom status screen"
|
|
|
|
endchoice
|
|
|
|
choice ZMK_DISPLAY_WORK_QUEUE
|
|
prompt "Work queue selection for UI updates"
|
|
|
|
config ZMK_DISPLAY_WORK_QUEUE_SYSTEM
|
|
bool "Use default system work queue for UI updates"
|
|
|
|
config ZMK_DISPLAY_WORK_QUEUE_DEDICATED
|
|
bool "Use dedicated work queue for UI updates"
|
|
|
|
endchoice
|
|
|
|
if ZMK_DISPLAY_WORK_QUEUE_DEDICATED
|
|
|
|
config ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE
|
|
int "Stack size for dedicated UI thread/queue"
|
|
default 2048
|
|
|
|
config ZMK_DISPLAY_DEDICATED_THREAD_PRIORITY
|
|
int "Thread priority for dedicated UI thread/queue"
|
|
default 5
|
|
|
|
endif # ZMK_DISPLAY_WORK_QUEUE_DEDICATED
|
|
|
|
if ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN
|
|
|
|
config LV_FONT_MONTSERRAT_16
|
|
default y
|
|
|
|
choice LV_FONT_DEFAULT
|
|
default LV_FONT_DEFAULT_MONTSERRAT_16
|
|
|
|
endchoice
|
|
|
|
config LV_FONT_MONTSERRAT_12
|
|
default y
|
|
|
|
endif # ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN
|
|
|
|
choice ZMK_LV_FONT_DEFAULT_SMALL
|
|
prompt "Select theme default small font"
|
|
default ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12
|
|
help
|
|
Select theme default small font
|
|
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_8
|
|
bool "Montserrat 8"
|
|
select LV_FONT_MONTSERRAT_8
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12
|
|
bool "Montserrat 12"
|
|
select LV_FONT_MONTSERRAT_12
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_14
|
|
bool "Montserrat 14"
|
|
select LV_FONT_MONTSERRAT_14
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16
|
|
bool "Montserrat 16"
|
|
select LV_FONT_MONTSERRAT_16
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_18
|
|
bool "Montserrat 18"
|
|
select LV_FONT_MONTSERRAT_18
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_20
|
|
bool "Montserrat 20"
|
|
select LV_FONT_MONTSERRAT_20
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_22
|
|
bool "Montserrat 22"
|
|
select LV_FONT_MONTSERRAT_22
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_24
|
|
bool "Montserrat 24"
|
|
select LV_FONT_MONTSERRAT_24
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26
|
|
bool "Montserrat 26"
|
|
select LV_FONT_MONTSERRAT_26
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_28
|
|
bool "Montserrat 28"
|
|
select LV_FONT_MONTSERRAT_28
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_30
|
|
bool "Montserrat 30"
|
|
select LV_FONT_MONTSERRAT_30
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_32
|
|
bool "Montserrat 32"
|
|
select LV_FONT_MONTSERRAT_32
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_34
|
|
bool "Montserrat 34"
|
|
select LV_FONT_MONTSERRAT_34
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_36
|
|
bool "Montserrat 36"
|
|
select LV_FONT_MONTSERRAT_36
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_38
|
|
bool "Montserrat 38"
|
|
select LV_FONT_MONTSERRAT_38
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_40
|
|
bool "Montserrat 40"
|
|
select LV_FONT_MONTSERRAT_40
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_42
|
|
bool "Montserrat 42"
|
|
select LV_FONT_MONTSERRAT_42
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_44
|
|
bool "Montserrat 44"
|
|
select LV_FONT_MONTSERRAT_44
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_46
|
|
bool "Montserrat 46"
|
|
select LV_FONT_MONTSERRAT_46
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_48
|
|
bool "Montserrat 48"
|
|
select LV_FONT_MONTSERRAT_48
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12_SUBPX
|
|
bool "Montserrat 12 sub-pixel"
|
|
select LV_FONT_MONTSERRAT_12_SUBPX
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_28_COMPRESSED
|
|
bool "Montserrat 28 compressed"
|
|
select LV_FONT_MONTSERRAT_28_COMPRESSED
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_DEJAVU_16_PERSIAN_HEBREW
|
|
bool "Dejavu 16 Persian, Hebrew, Arabic letters"
|
|
select LV_FONT_DEJAVU_16_PERSIAN_HEBREW
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_SIMSUN_16_CJK
|
|
bool "Simsun 16 CJK"
|
|
select LV_FONT_SIMSUN_16_CJK
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_UNSCII_8
|
|
bool "UNSCII 8 (Perfect monospace font)"
|
|
select LV_FONT_UNSCII_8
|
|
config ZMK_LV_FONT_DEFAULT_SMALL_UNSCII_16
|
|
bool "UNSCII 16 (Perfect monospace font)"
|
|
select LV_FONT_UNSCII_16
|
|
endchoice
|
|
|
|
rsource "widgets/Kconfig"
|
|
|
|
endif
|