From 0b2fd06ab073810c34e2db0397dbd90f765abe14 Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Nihei Date: Mon, 12 Apr 2021 16:06:40 -0300 Subject: [PATCH] examples/lvgldemo: Check for more specific input subclass on ifdefs --- examples/lvgldemo/Makefile | 2 +- examples/lvgldemo/lvgldemo.c | 6 +++--- examples/lvgldemo/tp.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/lvgldemo/Makefile b/examples/lvgldemo/Makefile index 65a8d0020..9655b3857 100644 --- a/examples/lvgldemo/Makefile +++ b/examples/lvgldemo/Makefile @@ -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 diff --git a/examples/lvgldemo/lvgldemo.c b/examples/lvgldemo/lvgldemo.c index d0ad1f574..5a8c313d8 100644 --- a/examples/lvgldemo/lvgldemo.c +++ b/examples/lvgldemo/lvgldemo.c @@ -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 diff --git a/examples/lvgldemo/tp.h b/examples/lvgldemo/tp.h index 28b06fa7e..fa0d7de71 100644 --- a/examples/lvgldemo/tp.h +++ b/examples/lvgldemo/tp.h @@ -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 @@ -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