lvgldemo: allow to customize input dev path

Default to /dev/input0, now it's configurable.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This commit is contained in:
Neo Xu 2024-10-27 01:49:00 +08:00 committed by Xiang Xiao
parent b4c2e6bf46
commit c4b6fd77be
2 changed files with 11 additions and 0 deletions

View file

@ -20,4 +20,11 @@ config EXAMPLES_LVGLDEMO_STACKSIZE
int "lvgldemo stack size"
default 16384
config EXAMPLES_LVGLDEMO_INPUT_DEVPATH
string "Touchscreen device path"
default "/dev/input0"
depends on INPUT_TOUCHSCREEN
---help---
The path to the touchscreen device. Default: "/dev/input0"
endif # EXAMPLES_LVGLDEMO

View file

@ -129,6 +129,10 @@ int main(int argc, FAR char *argv[])
info.fb_path = "/dev/lcd0";
#endif
#ifdef CONFIG_INPUT_TOUCHSCREEN
info.input_path = CONFIG_EXAMPLES_LVGLDEMO_INPUT_DEVPATH;
#endif
lv_nuttx_init(&info, &result);
if (result.disp == NULL)