examples/lvgldemo: bugfix typos and enable GRAPHICS_LVGL

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2022-01-28 13:46:55 +02:00 committed by Xiang Xiao
parent 480400c523
commit 41c8342927
4 changed files with 28 additions and 27 deletions

View File

@ -6,6 +6,7 @@
menuconfig EXAMPLES_LVGLDEMO
tristate "LVGL Demo"
default n
depends on GRAPHICS_LVGL
---help---
Enable build the Light and Versatile Graphics Library Demo programs
@ -86,24 +87,24 @@ config EXAMPLES_LVGLDEMO_CALIBRATE
if INPUT_TOUCHSCREEN
config EXAMPLES_LGVLDEMO_MINOR
config EXAMPLES_LVGLDEMO_MINOR
int "Touchscreen minor device number"
default 0
---help---
The minor device number. Minor=N corresponds to touchscreen device
/dev/inputN. Note this value must with EXAMPLES_LGVLDEMO_DEVPATH.
/dev/inputN. Note this value must with EXAMPLES_LVGLDEMO_DEVPATH.
Default 0.
config EXAMPLES_LGVLDEMO_DEVPATH
config EXAMPLES_LVGLDEMO_DEVPATH
string "Touchscreen device path"
default "/dev/input0"
---help---
The path to the touchscreen device. This must be consistent with
EXAMPLES_LGVLDEMO_MINOR. Default: "/dev/input0"
EXAMPLES_LVGLDEMO_MINOR. Default: "/dev/input0"
endif # INPUT_TOUCHSCREEN
config EXAMPLES_LGVLDEMO_MOUSE
config EXAMPLES_LVGLDEMO_MOUSE
bool "Mouse interface"
default n
depends on INPUT_MOUSE

View File

@ -1,5 +1,5 @@
############################################################################
# apps/examples/lgvldemo/Makefile
# apps/examples/lvgldemo/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with

View File

@ -48,7 +48,7 @@
#include <errno.h>
#include <debug.h>
#ifdef CONFIG_EXAMPLES_LGVLDEMO_MOUSE
#ifdef CONFIG_EXAMPLES_LVGLDEMO_MOUSE
# include <nuttx/input/mouse.h>
#endif
@ -94,12 +94,12 @@ int tp_init(void)
/* Open the touchscreen device for reading */
printf("tp_init: Opening %s\n", CONFIG_EXAMPLES_LGVLDEMO_DEVPATH);
fd = open(CONFIG_EXAMPLES_LGVLDEMO_DEVPATH, O_RDONLY | O_NONBLOCK);
printf("tp_init: Opening %s\n", CONFIG_EXAMPLES_LVGLDEMO_DEVPATH);
fd = open(CONFIG_EXAMPLES_LVGLDEMO_DEVPATH, O_RDONLY | O_NONBLOCK);
if (fd < 0)
{
printf("tp_init: open %s failed: %d\n",
CONFIG_EXAMPLES_LGVLDEMO_DEVPATH, errno);
CONFIG_EXAMPLES_LVGLDEMO_DEVPATH, errno);
errval = 2;
goto errout;
}

View File

@ -49,13 +49,13 @@
/* Configuration ************************************************************/
/* CONFIG_EXAMPLES_LGVLDEMO_MINOR - The minor device number. Minor=N
/* CONFIG_EXAMPLES_LVGLDEMO_MINOR - The minor device number. Minor=N
* corresponds to touchscreen device /dev/input0. Note this value must
* with CONFIG_EXAMPLES_LGVLDEMO_DEVPATH. Default 0.
* CONFIG_EXAMPLES_LGVLDEMO_DEVPATH - The path to the touchscreen
* device. This must be consistent with CONFIG_EXAMPLES_LGVLDEMO_MINOR.
* with CONFIG_EXAMPLES_LVGLDEMO_DEVPATH. Default 0.
* CONFIG_EXAMPLES_LVGLDEMO_DEVPATH - The path to the touchscreen
* device. This must be consistent with CONFIG_EXAMPLES_LVGLDEMO_MINOR.
* Default: "/dev/input0"
* CONFIG_EXAMPLES_LGVLDEMO_MOUSE - The touchscreen test can also be
* CONFIG_EXAMPLES_LVGLDEMO_MOUSE - The touchscreen test can also be
* configured to work with a mouse driver by setting this option.
*/
@ -63,23 +63,23 @@
# error "Input device support is not enabled (CONFIG_INPUT_TOUCHSCREEN || CONFIG_INPUT_MOUSE)"
#endif
#ifndef CONFIG_EXAMPLES_LGVLDEMO_MINOR
# undef CONFIG_EXAMPLES_LGVLDEMO_DEVPATH
# define CONFIG_EXAMPLES_LGVLDEMO_MINOR 0
# ifdef CONFIG_EXAMPLES_LGVLDEMO_MOUSE
# define CONFIG_EXAMPLES_LGVLDEMO_DEVPATH "/dev/mouse0"
#ifndef CONFIG_EXAMPLES_LVGLDEMO_MINOR
# undef CONFIG_EXAMPLES_LVGLDEMO_DEVPATH
# define CONFIG_EXAMPLES_LVGLDEMO_MINOR 0
# ifdef CONFIG_EXAMPLES_LVGLDEMO_MOUSE
# define CONFIG_EXAMPLES_LVGLDEMO_DEVPATH "/dev/mouse0"
# else
# define CONFIG_EXAMPLES_LGVLDEMO_DEVPATH "/dev/input0"
# define CONFIG_EXAMPLES_LVGLDEMO_DEVPATH "/dev/input0"
# endif
#endif
#ifndef CONFIG_EXAMPLES_LGVLDEMO_DEVPATH
# undef CONFIG_EXAMPLES_LGVLDEMO_MINOR
# define CONFIG_EXAMPLES_LGVLDEMO_MINOR 0
# ifdef CONFIG_EXAMPLES_LGVLDEMO_MOUSE
# define CONFIG_EXAMPLES_LGVLDEMO_DEVPATH "/dev/mouse0"
#ifndef CONFIG_EXAMPLES_LVGLDEMO_DEVPATH
# undef CONFIG_EXAMPLES_LVGLDEMO_MINOR
# define CONFIG_EXAMPLES_LVGLDEMO_MINOR 0
# ifdef CONFIG_EXAMPLES_LVGLDEMO_MOUSE
# define CONFIG_EXAMPLES_LVGLDEMO_DEVPATH "/dev/mouse0"
# else
# define CONFIG_EXAMPLES_LGVLDEMO_DEVPATH "/dev/input0"
# define CONFIG_EXAMPLES_LVGLDEMO_DEVPATH "/dev/input0"
# endif
#endif