examples/lvgldemo: Check for more specific input subclass on ifdefs

This commit is contained in:
Gustavo Henrique Nihei 2021-04-12 16:06:40 -03:00 committed by Xiang Xiao
parent 39c5fa812d
commit 0b2fd06ab0
3 changed files with 7 additions and 7 deletions

View File

@ -54,7 +54,7 @@ MODULE = $(CONFIG_EXAMPLES_LVGLDEMO)
CSRCS += fbdev.c lcddev.c
ifneq ($(CONFIG_INPUT),)
ifneq ($(CONFIG_INPUT_TOUCHSCREEN)$(CONFIG_INPUT_MOUSE),)
CSRCS += tp.c tp_cal.c
endif

View File

@ -51,7 +51,7 @@
#include "fbdev.h"
#include "lcddev.h"
#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT_TOUCHSCREEN) || defined(CONFIG_INPUT_MOUSE)
#include "tp.h"
#include "tp_cal.h"
#endif
@ -203,7 +203,7 @@ int main(int argc, FAR char *argv[])
lv_disp_drv_register(&disp_drv);
#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT_TOUCHSCREEN) || defined(CONFIG_INPUT_MOUSE)
/* Touchpad Initialization */
tp_init();
@ -229,7 +229,7 @@ int main(int argc, FAR char *argv[])
lv_demo_widgets();
#endif
#ifdef CONFIG_INPUT
#if defined(CONFIG_INPUT_TOUCHSCREEN) || defined(CONFIG_INPUT_MOUSE)
/* Start TP calibration */
#ifdef CONFIG_EXAMPLES_LVGLDEMO_CALIBRATE

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/touchscreen/tc.h
* apps/examples/lvgldemo/tp.h
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gábor Kiss-Vámosi <kisvegabor@gmail.com>
@ -59,8 +59,8 @@
* configured to work with a mouse driver by setting this option.
*/
#ifndef CONFIG_INPUT
# error "Input device support is not enabled (CONFIG_INPUT)"
#if !defined(CONFIG_INPUT_TOUCHSCREEN) && !defined(CONFIG_INPUT_MOUSE)
# error "Input device support is not enabled (CONFIG_INPUT_TOUCHSCREEN || CONFIG_INPUT_MOUSE)"
#endif
#ifndef CONFIG_EXAMPLES_LGVLDEMO_MINOR