mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-09-13 14:10:23 +00:00
Refactor the LVGL terminal into a shared core (lvglterm.c) plus two selectable input variants: the existing on-screen touch keyboard (lvglterm_touch.c) and a new physical keyboard variant (lvglterm_kbd.c) that reads key events from a /dev/kbdN device and streams them to the shell. The input source is chosen with a Kconfig choice (touch by default, keeping the previous behaviour). The keyboard variant reads its device from CONFIG_EXAMPLES_LVGLTERM_KBD_DEV (default /dev/kbd0), overridable by the first command-line argument, and scrolls the output with the Fn cursor keys. A font choice (UNSCII 8 or 16) is added for low-resolution displays. Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
73 lines
1.9 KiB
Text
73 lines
1.9 KiB
Text
#
|
|
# For a description of the syntax of this configuration file,
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
#
|
|
|
|
menuconfig EXAMPLES_LVGLTERM
|
|
tristate "LVGL Terminal"
|
|
default n
|
|
depends on GRAPHICS_LVGL
|
|
---help---
|
|
Enable LVGL Terminal
|
|
|
|
if EXAMPLES_LVGLTERM
|
|
|
|
choice
|
|
prompt "LVGL Terminal input source"
|
|
default EXAMPLES_LVGLTERM_INPUT_TOUCH
|
|
---help---
|
|
Select how the terminal receives keystrokes. Only one input source
|
|
is built at a time.
|
|
|
|
config EXAMPLES_LVGLTERM_INPUT_TOUCH
|
|
bool "On-screen keyboard (touch)"
|
|
---help---
|
|
Input comes from an on-screen LVGL keyboard operated by touch; a
|
|
command line is typed and submitted with Enter. This is the default
|
|
and matches the original behaviour.
|
|
|
|
config EXAMPLES_LVGLTERM_INPUT_KBD
|
|
bool "Physical keyboard (/dev/kbdN)"
|
|
depends on INPUT_KEYBOARD
|
|
---help---
|
|
Input comes from a physical keyboard registered as a /dev/kbdN
|
|
device; keystrokes are streamed to the shell and the output fills
|
|
the whole screen.
|
|
|
|
endchoice
|
|
|
|
config EXAMPLES_LVGLTERM_KBD_DEV
|
|
string "Keyboard device path"
|
|
default "/dev/kbd0"
|
|
depends on EXAMPLES_LVGLTERM_INPUT_KBD
|
|
---help---
|
|
Keyboard device the terminal reads key events from. Can also be
|
|
overridden at run time by passing the path as the first command-line
|
|
argument (useful when more than one keyboard is present).
|
|
|
|
choice
|
|
prompt "LVGL Terminal font"
|
|
default EXAMPLES_LVGLTERM_FONT_UNSCII_16
|
|
---help---
|
|
Monospaced font used to render the terminal. Use the smaller UNSCII 8
|
|
on low-resolution displays where UNSCII 16 shows too few columns.
|
|
|
|
config EXAMPLES_LVGLTERM_FONT_UNSCII_8
|
|
bool "UNSCII 8 (small)"
|
|
select LV_FONT_UNSCII_8
|
|
|
|
config EXAMPLES_LVGLTERM_FONT_UNSCII_16
|
|
bool "UNSCII 16"
|
|
select LV_FONT_UNSCII_16
|
|
|
|
endchoice
|
|
|
|
config EXAMPLES_LVGLTERM_PRIORITY
|
|
int "lvglterm task priority"
|
|
default 100
|
|
|
|
config EXAMPLES_LVGLTERM_STACKSIZE
|
|
int "lvglterm stack size"
|
|
default 16384
|
|
|
|
endif # EXAMPLES_LVGLTERM
|