This commit eliminates the BOARDIOC_TSCTEST_SETUP command.

Squashed commit of the following:

    configs:  Each board now initializes the touchscreen controller as a normal part of its board bring-up.  board_tsc_setup() is gone; the touchscreen controller is now treated like any other on-board device.
    Remove all support for BOARDIOC_TSCTEST_SETUP
    Move prototype for board_tsc_setup() from include/nuttx/board.h to individual board header files.
This commit is contained in:
Gregory Nutt
2018-01-17 09:22:19 -06:00
parent 21eff99d72
commit 301bf1ee77
74 changed files with 753 additions and 367 deletions
-8
View File
@@ -2351,14 +2351,6 @@ config BOARDCTL_USBDEVCTRL
---help---
Enables support for the BOARDIOC_USBDEV_CONTROL boardctl() command.
config BOARDCTL_TSCTEST
bool "Enable touchscreen test interfaces"
default n
---help---
Enables support for the BOARDIOC_TSCTEST_SETUP and
BOARDIOC_TSCTEST_TEARDOWN boardctl() commands. Architecture
specific logic must provide the board_tsc_setup() interface.
config BOARDCTL_IOCTL
bool "Board-specific boardctl() commands"
default n
+26 -5
View File
@@ -166,7 +166,7 @@
* and the SD card.
* 2. UART0 cannot be used. USARTs on the COMM connector should be available.
* 3. Parallel data is not contiguous in the PIO register
* 4. Touchcontroller /CS pin is connected to ground (always selected).
* 4. Touch controller /CS pin is connected to ground (always selected).
* 5. Either PA28 or PC29 may drive PWM10
*/
@@ -308,7 +308,7 @@
* Public Functions
************************************************************************************/
/****************************************************************************
/************************************************************************************
* Name: sam_bringup
*
* Description:
@@ -320,23 +320,44 @@
* CONFIG_BOARD_INITIALIZE=y && CONFIG_LIB_BOARDCTL=y :
* Called from the NSH library
*
****************************************************************************/
************************************************************************************/
int sam_bringup(void);
/****************************************************************************
/************************************************************************************
* Name: sam_sdinitialize
*
* Description:
* Initialize the SPI-based SD card.
*
****************************************************************************/
************************************************************************************/
#if defined(CONFIG_ARDUINO_ITHEAD_TFT) && defined(CONFIG_SPI_BITBANG) && \
defined(CONFIG_MMCSD_SPI)
int sam_sdinitialize(int minor);
#endif
/************************************************************************************
* Name: sam_tsc_setup
*
* Description:
* This function is called by board-bringup logic to configure the touchscreen
* device. This function will register the driver as /dev/inputN where N is the
* minor device number.
*
* Input Parameters:
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to
* indicate the nature of the failure.
*
************************************************************************************/
#if defined(CONFIG_ARDUINO_ITHEAD_TFT) && defined(CONFIG_SPI_BITBANG) && \
defined(CONFIG_INPUT_ADS7843E)
int sam_tsc_setup(int minor);
#endif
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_ARDUINO_DUE_SRC_ARDUNO_DUE_H */
+11
View File
@@ -118,6 +118,17 @@ int sam_bringup(void)
}
#endif
#if defined(CONFIG_ARDUINO_ITHEAD_TFT) && defined(CONFIG_SPI_BITBANG) && \
defined(CONFIG_INPUT_ADS7843E)
/* Initialize the touchscreen */
ret = sam_tsc_setup(0);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: sam_tsc_setup failed: %d\n", ret);
}
#endif
UNUSED(ret);
return OK;
}
+5 -6
View File
@@ -336,13 +336,12 @@ static FAR struct spi_dev_s *sam_tsc_spiinitialize(void)
****************************************************************************/
/****************************************************************************
* Name: board_tsc_setup
* Name: sam_tsc_setup
*
* Description:
* Each board that supports a touchscreen device must provide this function.
* This function is called by application-specific, setup logic to
* configure the touchscreen device. This function will register the driver
* as /dev/inputN where N is the minor device number.
* This function is called by board-bringup logic to configure the
* touchscreen device. This function will register the driver as
* /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
@@ -353,7 +352,7 @@ static FAR struct spi_dev_s *sam_tsc_spiinitialize(void)
*
****************************************************************************/
int board_tsc_setup(int minor)
int sam_tsc_setup(int minor)
{
FAR struct spi_dev_s *dev;
static bool initialized = false;
-15
View File
@@ -401,21 +401,6 @@ int boardctl(unsigned int cmd, uintptr_t arg)
break;
#endif
#ifdef CONFIG_BOARDCTL_TSCTEST
/* CMD: BOARDIOC_TSCTEST_SETUP
* DESCRIPTION: Touchscreen controller test configuration
* ARG: Touch controller device minor number
* CONFIGURATION: CONFIG_LIB_BOARDCTL && CONFIG_BOARDCTL_TSCTEST
* DEPENDENCIES: Board logic must provide board_tsc_setup()
*/
case BOARDIOC_TSCTEST_SETUP:
{
ret = board_tsc_setup((int)arg);
}
break;
#endif
default:
{
#ifdef CONFIG_BOARDCTL_IOCTL
+24 -3
View File
@@ -1,7 +1,7 @@
/************************************************************************************
* configs/hymini-stm32v/src/hymini-stm32v.h
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2011, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Laurent Latil <laurent@latil.nom.fr>
*
@@ -122,7 +122,7 @@
*
************************************************************************************/
extern void weak_function stm32_spidev_initialize(void);
void weak_function stm32_spidev_initialize(void);
/************************************************************************************
* Name: stm32_usbinitialize
@@ -132,7 +132,28 @@ extern void weak_function stm32_spidev_initialize(void);
*
************************************************************************************/
extern void weak_function stm32_usbinitialize(void);
void weak_function stm32_usbinitialize(void);
/************************************************************************************
* Name: stm32_tsc_setup
*
* Description:
* This function is called by board-bringup logic to configure the touchscreen
* device. This function will register the driver as /dev/inputN where N is the
* minor device number.
*
* Input Parameters:
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to
* indicate the nature of the failure.
*
************************************************************************************/
#ifdef CONFIG_INPUT
int stm32_tsc_setup(int minor);
#endif
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_HYMINI_STM32V_H */
+15 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* config/hymini-stm32v/src/stm32_appinit.c
*
* Copyright (C) 2009, 2011, 2016-2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2009, 2011, 2016-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -170,10 +170,11 @@ static int nsh_cdinterrupt(int irq, FAR void *context, FAR void *arg)
int board_app_initialize(uintptr_t arg)
{
#ifdef NSH_HAVEMMCSD
int ret;
#ifdef NSH_HAVEMMCSD
/* Card detect */
bool cd_status;
/* Configure the card detect GPIO */
@@ -220,5 +221,17 @@ int board_app_initialize(uintptr_t arg)
sdio_mediachange(g_sdiodev, cd_status);
#endif
#ifdef CONFIG_INPUT
/* Initialize the touchscreen */
ret = stm32_tsc_setup(0);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: stm32_tsc_setup failed: %d\n", ret);
}
#endif
UNUSED(ret);
return OK;
}
+6 -7
View File
@@ -53,7 +53,7 @@
#include "hymini-stm32v.h"
/************************************************************************************
* Pre-processor Defintiions
* Pre-processor Definitions
************************************************************************************/
#if !defined(CONFIG_STM32_SPI1)
@@ -136,13 +136,12 @@ static bool hymini_ts_pendown(FAR struct ads7843e_config_s *state)
}
/****************************************************************************
* Name: board_tsc_setup
* Name: stm32_tsc_setup
*
* Description:
* Each board that supports a touchscreen device must provide this function.
* This function is called by application-specific, setup logic to
* configure the touchscreen device. This function will register the driver
* as /dev/inputN where N is the minor device number.
* This function is called by board-bringup logic to configure the
* touchscreen device. This function will register the driver as
* /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
@@ -153,7 +152,7 @@ static bool hymini_ts_pendown(FAR struct ads7843e_config_s *state)
*
****************************************************************************/
int board_tsc_setup(int minor)
int stm32_tsc_setup(int minor)
{
FAR struct spi_dev_s *dev;
-1
View File
@@ -1,5 +1,4 @@
# CONFIG_ARCH_FPU is not set
# CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT is not set
CONFIG_ARCH_BOARD_LPCXPRESSO_LPC54628=y
CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
CONFIG_ARCH_CHIP_LPC54628=y
@@ -2,7 +2,6 @@
# CONFIG_NX_DISABLE_16BPP is not set
# CONFIG_NXFONTS_DISABLE_16BPP is not set
# CONFIG_NXTK_DEFAULT_BORDERCOLORS is not set
# CONFIG_NXWM_TOUCHSCREEN_DEVINIT is not set
CONFIG_ARCH_BOARD_LPCXPRESSO_LPC54628=y
CONFIG_ARCH_BOARD="lpcxpresso-lpc54628"
CONFIG_ARCH_CHIP_LPC54628=y
@@ -245,20 +245,4 @@ int lpc54_ft5x06_register(void)
return OK;
}
/****************************************************************************
* Name: board_tsc_setup
*
* Description:
* Stubs for expected interfaces. This implementation does not permit the
* application to mange the touch screen controller.
*
****************************************************************************/
#ifdef CONFIG_BOARDCTL_TSCTEST
int board_tsc_setup(int minor)
{
DEBUGASSERT(minor == 0);
return OK;
}
#endif /* HAVE_FT5x06*/
+26 -6
View File
@@ -1,7 +1,7 @@
/****************************************************************************************************
* configs/mikroe-stm32f4/src/mikroe-stm32f4.h
*
* Copyright (C) 2011-2013, 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2011-2013, 2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -218,7 +218,7 @@ void weak_function stm32_spidev_initialize(void);
* Name: stm32_usbinitialize
*
* Description:
* Called from stm32_usbinitialize very early in inialization to setup USB-related
* Called from stm32_usbinitialize very early in initialization to setup USB-related
* GPIO pins for the Mikroe-stm32f4 board.
*
****************************************************************************************************/
@@ -227,13 +227,13 @@ void weak_function stm32_spidev_initialize(void);
void weak_function stm32_usbinitialize(void);
#endif
/************************************************************************************
/****************************************************************************************************
* Name: stm32_pwm_setup
*
* Description:
* Initialize PWM and register the PWM device.
*
************************************************************************************/
****************************************************************************************************/
#ifdef CONFIG_PWM
int stm32_pwm_setup(void);
@@ -252,13 +252,13 @@ int stm32_pwm_setup(void);
# error "The Mikroe-STM32F4 board does not support HOST OTG, only device!"
#endif
/****************************************************************************
/****************************************************************************************************
* Name: stm32_qencoder_initialize
*
* Description:
* Initialize and register a qencoder
*
****************************************************************************/
****************************************************************************************************/
#ifdef CONFIG_SENSORS_QENCODER
int stm32_qencoder_initialize(FAR const char *devpath, int timer);
@@ -277,6 +277,26 @@ int stm32_qencoder_initialize(FAR const char *devpath, int timer);
void stm32_lcdinitialize(void);
#endif
/****************************************************************************************************
* Name: stm32_tsc_setup
*
* Description:
* This function is called by board-bringup logic to configure the touchscreen device. This
* function will register the driver as /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to indicate the
* nature of the failure.
*
****************************************************************************************************/
#ifdef CONFIG_INPUT
int stm32_tsc_setup(int minor);
#endif
/****************************************************************************************************
* Name: up_vs1053initialize
*
+11 -1
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* config/mikroe_stm32f4/src/stm32_appinit.c
*
* Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -350,6 +350,16 @@ int board_app_initialize(uintptr_t arg)
}
#endif
#ifdef CONFIG_INPUT
/* Initialize the touchscreen */
ret = stm32_tsc_setup(0);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: stm32_tsc_setup failed: %d\n", ret);
}
#endif
#ifdef CONFIG_PWM
/* Initialize PWM and register the PWM device. */
@@ -1474,13 +1474,12 @@ errout:
************************************************************************************/
/****************************************************************************
* Name: board_tsc_setup
* Name: stm32_tsc_setup
*
* Description:
* Each board that supports a touchscreen device must provide this function.
* This function is called by application-specific, setup logic to
* configure the touchscreen device. This function will register the driver
* as /dev/inputN where N is the minor device number.
* This function is called by board-bringup logic to configure the
* touchscreen device. This function will register the driver as
* /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
@@ -1491,7 +1490,7 @@ errout:
*
****************************************************************************/
int board_tsc_setup(int minor)
int stm32_tsc_setup(int minor)
{
FAR struct tc_dev_s *priv;
char devname[DEV_NAMELEN];
+22 -1
View File
@@ -1,7 +1,7 @@
/************************************************************************************
* configs/olimex-lpc1766stk/src/lpc1766stk.h
*
* Copyright (C) 2010-2011, 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2010-2011, 2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -272,6 +272,27 @@ void weak_function lpc1766stk_sspdev_initialize(void);
int lpc1766stk_can_setup(void);
#endif
/************************************************************************************
* Name: lpc1766stk_hidmouse_setup
*
* Description:
* This function is called by board-bringup logic to configure the HID mouse
* device. This function will register the driver as /dev/inputN where N is the
* minor device number.
*
* Input Parameters:
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to
* indicate the nature of the failure.
*
************************************************************************************/
#ifdef CONFIG_USBHOST_HIDMOUSE
int lpc1766stk_hidmouse_setup(int minor);
#endif
#endif /* __ASSEMBLY__ */
#endif /* _CONFIGS_OLIMEX_LPC1766STK_SRC_LPC1766STK_H */
+11 -1
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* config/olimex-lpc1766stk/src/lpc17_appinit.c
*
* Copyright (C) 2010, 2013-2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2010, 2013-2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -362,6 +362,16 @@ int board_app_initialize(uintptr_t arg)
syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret);
}
#ifdef CONFIG_USBHOST_HIDMOUSE
/* Initialize the HID Mouse class */
ret = lpc1766stk_hidmouse_setup(0);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: lpc1766stk_hidmouse_setup failed: %d\n", ret);
}
#endif
#ifdef CONFIG_CAN
/* Initialize CAN and register the CAN driver. */
@@ -71,17 +71,15 @@
****************************************************************************/
/****************************************************************************
* Name: board_tsc_setup
* Name: lpc1766stk_hidmouse_setup
*
* Description:
* Each board that supports a touchscreen device must provide this
* function. This function is called by application-specific, setup logic
* to configure the USB HID mouse driver that emulates a touchscreen
* device. This function will register the driver as /dev/mouseN where N
* is the minor device number.
* This function is called by board-bringup logic to configure the HID
* mouse device. This function will register the driver as /dev/inputN
* where N is the minor device number.
*
* Input Parameters:
* minor - The mouse device minor number
* minor - The mouse device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is
@@ -89,7 +87,7 @@
*
****************************************************************************/
int board_tsc_setup(int minor)
int lpc1766stk_hidmouse_setup(int minor)
{
static bool initialized = false;
int ret;
+1 -1
View File
@@ -89,6 +89,6 @@ int board_app_initialize(uintptr_t arg)
#else
/* Perform board-specific initialization */
return lpc17_bringup();
return open1788_bringup();
#endif
}
+1 -1
View File
@@ -137,6 +137,6 @@ void board_initialize(void)
{
/* Perform board-specific initialization */
(void)lpc17_bringup();
(void)open1788_bringup();
}
#endif
+13 -4
View File
@@ -245,12 +245,11 @@ static int nsh_sdinitialize(void)
lpc17_configgpio(GPIO_SD_CD);
#ifdef NSH_HAVE_MMCSD_CDINT
/* Attach an interrupt handler to get notifications when a card is
* inserted or deleted.
*/
#ifdef NSH_HAVE_MMCSD_CDINT
(void)irq_attach(LPC17_IRQ_P0p13, nsh_cdinterrupt, NULL);
up_enable_irq(LPC17_IRQ_P0p13);
@@ -361,7 +360,7 @@ static int nsh_usbhostinitialize(void)
****************************************************************************/
/****************************************************************************
* Name: lpc17_bringup
* Name: open1788_bringup
*
* Description:
* Perform architecture-specific initialization
@@ -374,7 +373,7 @@ static int nsh_usbhostinitialize(void)
*
****************************************************************************/
int lpc17_bringup(void)
int open1788_bringup(void)
{
int ret;
@@ -398,6 +397,16 @@ int lpc17_bringup(void)
}
#endif
#ifdef CONFIG_INPUT_ADS7843E
/* Initialize the touchscreen */
ret = open1788_tsc_setup(0);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: open1788_tsc_setup failed: %d\n", ret);
}
#endif
#ifdef CONFIG_OPEN1788_DJOYSTICK
/* Initialize and register the joystick driver */
+5 -7
View File
@@ -1,6 +1,5 @@
/************************************************************************************
* configs/open1788/src/lpc17_touchscreen.c
* arch/arm/src/board/lpc17_touchscreen.c
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -255,13 +254,12 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state)
****************************************************************************/
/****************************************************************************
* Name: board_tsc_setup
* Name: open1788_tsc_setup
*
* Description:
* Each board that supports a touchscreen device must provide this
* function. This function is called by application-specific, setup logic
* to configure the touchscreen device. This function will register the
* driver as /dev/inputN where N is the minor device number.
* This function is called by board-bringup logic to configure the
* touchscreen device. This function will register the driver as
* /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
@@ -272,7 +270,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state)
*
****************************************************************************/
int board_tsc_setup(int minor)
int open1788_tsc_setup(int minor)
{
static bool initialized = false;
FAR struct spi_dev_s *dev;
+26 -5
View File
@@ -2,7 +2,7 @@
* configs/open1788/src/open1788.h
* arch/arm/src/board/open1788.n
*
* Copyright (C) 2013, 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2013, 2017-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -162,7 +162,7 @@
************************************************************************************/
/************************************************************************************
* Name: lpc17_bringup
* Name: open1788_bringup
*
* Description:
* Perform architecture-specific initialization
@@ -175,7 +175,7 @@
*
************************************************************************************/
int lpc17_bringup(void);
int open1788_bringup(void);
/************************************************************************************
* Name: open1788_sspdev_initialize
@@ -237,13 +237,34 @@ void open1788_nand_initialize(void);
void open1788_lcd_initialize(void);
#endif
/****************************************************************************
/************************************************************************************
* Name: open1788_tsc_setup
*
* Description:
* This function is called by board-bringup logic to configure the touchscreen
* device. This function will register the driver as /dev/inputN where N is the
* minor device number.
*
* Input Parameters:
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to
* indicate the nature of the failure.
*
************************************************************************************/
#ifdef CONFIG_INPUT_ADS7843E
int open1788_tsc_setup(int minor);
#endif
/************************************************************************************
* Name: lpc17_djoy_initialization
*
* Description:
* Initialize and register the discrete joystick driver
*
****************************************************************************/
************************************************************************************/
#ifdef CONFIG_OPEN1788_DJOYSTICK
int lpc17_djoy_initialization(void);
+11 -1
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* config/pic32mx7mmb/src/pic32_bringup.c
*
* Copyright (C) 2012, 2016-2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2016-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -407,5 +407,15 @@ int pic32mx_bringup(void)
ret = nsh_usbdevinitialize();
}
#ifdef CONFIG_INPUT
/* Initialize the touchscreen */
ret = pic32mx_tsc_setup(0);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: pic32mx_tsc_setup failed: %d\n", ret);
}
#endif
return ret;
}
+5 -6
View File
@@ -1343,13 +1343,12 @@ errout:
************************************************************************************/
/****************************************************************************
* Name: board_tsc_setup
* Name: pic32mx_tsc_setup
*
* Description:
* Each board that supports a touchscreen device must provide this function.
* This function is called by application-specific, setup logic to
* configure the touchscreen device. This function will register the driver
* as /dev/inputN where N is the minor device number.
* This function is called by board-bringup logic to configure the
* touchscreen device. This function will register the driver as
* /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
@@ -1360,7 +1359,7 @@ errout:
*
****************************************************************************/
int board_tsc_setup(int minor)
int pic32mx_tsc_setup(int minor)
{
FAR struct tc_dev_s *priv;
char devname[DEV_NAMELEN];
+30 -9
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* configs/pic32mx7mmb/src/pic32mx7mmb.h
*
* Copyright (C) 2012, 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2017-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -119,33 +119,33 @@ extern "C" {
#define EXTERN extern
#endif
/************************************************************************************
/****************************************************************************
* Name: pic32mx_spidev_initialize
*
* Description:
* Called to configure SPI chip select GPIO pins for the Mikroelektronika PIC32MX7
* MMB board.
* Called to configure SPI chip select GPIO pins for the Mikroelektronika
* PIC32MX7 MMB board.
*
************************************************************************************/
****************************************************************************/
#if defined(CONFIG_PIC32MX_SPI1) || defined(CONFIG_PIC32MX_SPI2) || \
defined(CONFIG_PIC32MX_SPI3) || defined(CONFIG_PIC32MX_SPI4)
void weak_function pic32mx_spidev_initialize(void);
#endif
/************************************************************************************
/****************************************************************************
* Name: pic32mx_led_initialize
*
* Description:
* Configure on-board LEDs if LED support has been selected.
*
************************************************************************************/
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
void pic32mx_led_initialize(void);
#endif
/************************************************************************************
/****************************************************************************
* Name: pic32mx_bringup
*
* Description:
@@ -157,7 +157,7 @@ void pic32mx_led_initialize(void);
* CONFIG_BOARD_INITIALIZE=y && CONFIG_LIB_BOARDCTL=y :
* Called from the NSH library
*
************************************************************************************/
****************************************************************************/
int pic32mx_bringup(void);
@@ -173,6 +173,27 @@ int pic32mx_bringup(void);
void pic32mx_lcdinitialize(void);
/****************************************************************************
* Name: pic32mx_tsc_setup
*
* Description:
* This function is called by board-bringup logic to configure the
* touchscreen device. This function will register the driver as
* /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
*
****************************************************************************/
#ifdef CONFIG_INPUT
int pic32mx_tsc_setup(int minor);
#endif
#undef EXTERN
#ifdef __cplusplus
}
-1
View File
@@ -19,7 +19,6 @@ CONFIG_ARCH="arm"
CONFIG_ARMV7M_OABI_TOOLCHAIN=y
CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y
CONFIG_BOARD_LOOPSPERMSEC=8720
CONFIG_BOARDCTL_TSCTEST=y
CONFIG_CXX_NEWLONG=y
CONFIG_DISABLE_POLL=y
CONFIG_HAVE_CXX=y
+22 -1
View File
@@ -1,7 +1,7 @@
/************************************************************************************
* configs/sam3u-ek/src/sam3u-ek.h
*
* Copyright (C) 2009-2011, 2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2011, 2013, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -263,5 +263,26 @@ bool sam_writeprotected(unsigned char slot);
# define sam_writeprotected(slot) (false)
#endif
/************************************************************************************
* Name: sam_tsc_setup
*
* Description:
* This function is called by board-bringup logic to configure the touchscreen
* device. This function will register the driver as /dev/inputN where N is the
* minor device number.
*
* Input Parameters:
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to
* indicate the nature of the failure.
*
***********************************************************************************/
#ifdef CONFIG_INPUT_ADS7843E
int sam_tsc_setup(int minor);
#endif
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_SAM3U_EK_SRC_SAM3U_EK_H */
+15 -2
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* config/sam3u-ek/src/sam_appinit.c
*
* Copyright (C) 2010, 2013, 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2010, 2013, 2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -128,9 +128,10 @@
int board_app_initialize(uintptr_t arg)
{
int ret;
#ifdef NSH_HAVE_MMCSD
FAR struct sdio_dev_s *sdio;
int ret;
/* Mount the SDIO-based MMC/SD block driver */
/* First, get an instance of the SDIO interface */
@@ -164,5 +165,17 @@ int board_app_initialize(uintptr_t arg)
sdio_mediachange(sdio, sam_cardinserted(0));
#endif
#ifdef CONFIG_INPUT
/* Initialize the touchscreen */
ret = sam_tsc_setup(0);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: sam_tsc_setup failed: %d\n", ret);
}
#endif
UNUSED(ret);
return OK;
}
+5 -7
View File
@@ -216,13 +216,12 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state)
****************************************************************************/
/****************************************************************************
* Name: board_tsc_setup
* Name: sam_tsc_setup
*
* Description:
* Each board that supports a touchscreen device must provide this function.
* This function is called by application-specific, setup logic to
* configure the touchscreen device. This function will register the driver
* as /dev/inputN where N is the minor device number.
* This function is called by board-bringup logic to configure the
* touchscreen device. This function will register the driver as
* /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
@@ -233,7 +232,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state)
*
****************************************************************************/
int board_tsc_setup(int minor)
int sam_tsc_setup(int minor)
{
FAR struct spi_dev_s *dev;
int ret;
@@ -273,4 +272,3 @@ int board_tsc_setup(int minor)
}
#endif /* CONFIG_INPUT_ADS7843E */
+24 -3
View File
@@ -1,7 +1,7 @@
/************************************************************************************
* configs/sam4e-ek/src/sam4e-ek.h
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Copyright (C) 2014, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -440,14 +440,14 @@ bool sam_writeprotected(int slotno);
# define sam_writeprotected(slotno) (false)
#endif
/****************************************************************************
/************************************************************************************
* Name: sam_at25_automount
*
* Description:
* Initialize, configure, and mount the AT25 serial FLASH. The FLASH will
* be mounted at /dev/at25.
*
****************************************************************************/
************************************************************************************/
#ifdef HAVE_AT25
int sam_at25_automount(int minor);
@@ -455,5 +455,26 @@ int sam_at25_automount(int minor);
# define sam_at25_automount(minor) (-ENOSYS)
#endif
/************************************************************************************
* Name: sam_tsc_setup
*
* Description:
* This function is called by board-bringup logic to configure the touchscreen
* device. This function will register the driver as /dev/inputN where N is the
* minor device number.
*
* Input Parameters:
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to
* indicate the nature of the failure.
*
***********************************************************************************/
#ifdef CONFIG_INPUT_ADS7843E
int sam_tsc_setup(int minor);
#endif
#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_SAM4E_EK_SRC_SAM4E_EK_H */
+5 -6
View File
@@ -213,13 +213,12 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state)
****************************************************************************/
/****************************************************************************
* Name: board_tsc_setup
* Name: sam_tsc_setup
*
* Description:
* Each board that supports a touchscreen device must provide this function.
* This function is called by application-specific, setup logic to
* configure the touchscreen device. This function will register the driver
* as /dev/inputN where N is the minor device number.
* This function is called by board-bringup logic to configure the
* touchscreen device. This function will register the driver as
* /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
@@ -230,7 +229,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state)
*
****************************************************************************/
int board_tsc_setup(int minor)
int sam_tsc_setup(int minor)
{
FAR struct spi_dev_s *dev;
int ret;
+12 -3
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* config/sam4e-ek/src/sam_appinit.c
*
* Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2014, 2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -89,9 +89,7 @@
int board_app_initialize(uintptr_t arg)
{
#if defined(HAVE_AT25) || defined(HAVE_HSMCI) || defined(HAVE_USBMONITOR)
int ret;
#endif
#ifdef HAVE_AT25
/* Initialize the AT25 driver */
@@ -115,6 +113,16 @@ int board_app_initialize(uintptr_t arg)
}
#endif
#ifdef CONFIG_INPUT_ADS7843E
/* Initialize the touchscreen */
ret = sam_tsc_setup(0);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: sam_tsc_setup failed: %d\n", ret);
}
#endif
#ifdef HAVE_USBMONITOR
/* Start the USB Monitor */
@@ -126,5 +134,6 @@ int board_app_initialize(uintptr_t arg)
}
#endif
UNUSED(ret);
return OK;
}
-1
View File
@@ -12,7 +12,6 @@ CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH="arm"
CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW=y
CONFIG_BOARD_LOOPSPERMSEC=49341
CONFIG_BOARDCTL_TSCTEST=y
CONFIG_BUILTIN=y
CONFIG_DISABLE_POLL=y
CONFIG_FLASH_SIZE=134217728
+11 -1
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* config/sama5d3x-ek/src/sam_appinit.c
*
* Copyright (C) 2013-2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2013-2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -173,6 +173,16 @@ int board_app_initialize(uintptr_t arg)
}
#endif
#ifdef CONFIG_SAMA5_TSD
/* Initialize the touchscreen */
ret = sam_tsc_setup(0);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: sam_tsc_setup failed: %d\n", ret);
}
#endif
#ifdef HAVE_WM8904
/* Configure WM8904 audio */
+5 -22
View File
@@ -64,34 +64,17 @@
# define CONFIG_SAMA5D3xEK_TSD_DEVMINOR 0
#endif
/****************************************************************************
* Private Types
****************************************************************************/
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_tsc_setup
* Name: sam_tsc_setup
*
* Description:
* Each board that supports a touchscreen device must provide this
* function. This function is called by application-specific, setup logic
* to configure the touchscreen device. This function will register the
* driver as /dev/inputN where N is the minor device number.
* This function is called by board-bringup logic to configure the
* touchscreen device. This function will register the driver as
* /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
@@ -102,7 +85,7 @@
*
****************************************************************************/
int board_tsc_setup(int minor)
int sam_tsc_setup(int minor)
{
struct sam_adc_s *adc;
static bool initialized = false;
+22 -1
View File
@@ -1,7 +1,7 @@
/************************************************************************************
* configs/sama5d3x-ek/src/sama5d3x-ek.h
*
* Copyright (C) 2013-2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2013-2015, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -833,6 +833,27 @@ int sam_usbhost_initialize(void);
void weak_function sam_netinitialize(void);
#endif
/************************************************************************************
* Name: sam_tsc_setup
*
* Description:
* This function is called by board-bringup logic to configure the touchscreen
* device. This function will register the driver as /dev/inputN where N is the
* minor device number.
*
* Input Parameters:
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to
* indicate the nature of the failure.
*
***********************************************************************************/
#ifdef CONFIG_SAMA5_TSD
int sam_tsc_setup(int minor);
#endif
/************************************************************************************
* Name: sam_pwm_setup
*
-1
View File
@@ -3268,7 +3268,6 @@ TM7000 LCD/Touchscreen
build in a touchscreen test:
CONFIG_EXAMPLES_TOUCHSCREEN=y
CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
+11 -1
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* config/sama5d4-ek/src/sam_bringup.c
*
* Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2014, 2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -288,6 +288,16 @@ int sam_bringup(void)
}
#endif
#ifdef HAVE_MAXTOUCH
/* Initialize the touchscreen */
ret = sam_tsc_setup(0);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: sam_tsc_setup failed: %d\n", ret);
}
#endif
#ifdef CONFIG_PWM
/* Initialize PWM and register the PWM device. */
+5 -6
View File
@@ -219,13 +219,12 @@ static int mxt_interrupt(int irq, FAR void *context, FAR void *arg)
****************************************************************************/
/****************************************************************************
* Name: board_tsc_setup
* Name: sam_tsc_setup
*
* Description:
* Each board that supports a touchscreen device must provide this function.
* This function is called by application-specific, setup logic to
* configure the touchscreen device. This function will register the driver
* as /dev/inputN where N is the minor device number.
* This function is called by board-bringup logic to configure the
* touchscreen device. This function will register the driver as
* /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
@@ -236,7 +235,7 @@ static int mxt_interrupt(int irq, FAR void *context, FAR void *arg)
*
****************************************************************************/
int board_tsc_setup(int minor)
int sam_tsc_setup(int minor)
{
FAR struct i2c_master_s *i2c;
static bool initialized = false;
+27 -5
View File
@@ -1,7 +1,7 @@
/************************************************************************************
* configs/sama5d4-ek/src/sama5d4-ek.h
*
* Copyright (C) 2014-2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2014-2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -1060,19 +1060,41 @@ bool sam_writeprotected(int slotno);
void weak_function sam_usbinitialize(void);
#endif
/****************************************************************************************************
/************************************************************************************
* Name: stm32_usbhost_initialize
*
* Description:
* Called at application startup time to initialize the USB host functionality. This function will
* start a thread that will monitor for device connection/disconnection events.
* Called at application startup time to initialize the USB host functionality.
* This function will start a thread that will monitor for device connection/
* disconnection events.
*
****************************************************************************************************/
************************************************************************************/
#ifdef HAVE_USBHOST
int sam_usbhost_initialize(void);
#endif
/************************************************************************************
* Name: sam_tsc_setup
*
* Description:
* This function is called by board-bringup logic to configure the touchscreen
* device. This function will register the driver as /dev/inputN where N is the
* minor device number.
*
* Input Parameters:
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to
* indicate the nature of the failure.
*
***********************************************************************************/
#ifdef HAVE_MAXTOUCH
int sam_tsc_setup(int minor);
#endif
/************************************************************************************
* Name: sam_pwm_setup
*
-1
View File
@@ -1231,7 +1231,6 @@ MXT Configuration Options
Application Configuration -> Examples -> Touchscreen example
CONFIG_EXAMPLES_TOUCHSCREEN=y : Enables the example
CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y : Have board-specific intialization
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
-1
View File
@@ -27,7 +27,6 @@ CONFIG_AT24XX_EXTENDED=y
CONFIG_AT24XX_EXTSIZE=160
CONFIG_AT24XX_SIZE=2
CONFIG_BOARD_LOOPSPERMSEC=51262
CONFIG_BOARDCTL_TSCTEST=y
CONFIG_BUILTIN=y
CONFIG_DISABLE_POLL=y
CONFIG_FAT_LCNAMES=y
+10
View File
@@ -507,6 +507,16 @@ int sam_bringup(void)
}
#endif
#ifdef HAVE_MAXTOUCH
/* Initialize the touchscreen */
ret = sam_tsc_setup(0);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: sam_tsc_setup failed: %d\n", ret);
}
#endif
#ifdef HAVE_WM8904
/* Configure WM8904 audio */
+5 -6
View File
@@ -218,13 +218,12 @@ static int mxt_interrupt(int irq, FAR void *context, FAR void *arg)
****************************************************************************/
/****************************************************************************
* Name: board_tsc_setup
* Name: sam_tsc_setup
*
* Description:
* Each board that supports a touchscreen device must provide this function.
* This function is called by application-specific, setup logic to
* configure the touchscreen device. This function will register the driver
* as /dev/inputN where N is the minor device number.
* This function is called by board-bringup logic to configure the
* touchscreen device. This function will register the driver as
* /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
@@ -235,7 +234,7 @@ static int mxt_interrupt(int irq, FAR void *context, FAR void *arg)
*
****************************************************************************/
int board_tsc_setup(int minor)
int sam_tsc_setup(int minor)
{
FAR struct i2c_master_s *i2c;
static bool initialized = false;
+37 -16
View File
@@ -1,7 +1,7 @@
/************************************************************************************
* configs/samv71-xult/src/samv71-xult.h
*
* Copyright (C) 2015-2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2015-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -846,28 +846,49 @@ bool sam_writeprotected(int slotno);
int sam_at24config(void);
#endif
/****************************************************************************
/************************************************************************************
* Name: sam_tsc_setup
*
* Description:
* This function is called by board-bringup logic to configure the touchscreen
* device. This function will register the driver as /dev/inputN where N is the
* minor device number.
*
* Input Parameters:
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to
* indicate the nature of the failure.
*
************************************************************************************/
#ifdef HAVE_MAXTOUCH
int sam_tsc_setup(int minor);
#endif
/************************************************************************************
* Name: sam_wm8904_initialize
*
* Description:
* This function is called by platform-specific, setup logic to configure
* and register the WM8904 device. This function will register the driver
* as /dev/wm8904[x] where x is determined by the minor device number.
* This function is called by platform-specific, setup logic to configure and
* register the WM8904 device. This function will register the driver as
* /dev/wm8904[x] where x is determined by the minor device number.
*
* Input Parameters:
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
* Zero is returned on success. Otherwise, a negated errno value is returned
* to indicate the nature of the failure.
*
****************************************************************************/
************************************************************************************/
#ifdef HAVE_WM8904
int sam_wm8904_initialize(int minor);
#endif /* HAVE_WM8904 */
/****************************************************************************
/************************************************************************************
* Name: sam_audio_null_initialize
*
* Description:
@@ -877,26 +898,26 @@ int sam_wm8904_initialize(int minor);
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
* Zero is returned on success. Otherwise, a negated errno value is returned
* to indicate the nature of the failure.
*
****************************************************************************/
************************************************************************************/
#ifdef HAVE_AUDIO_NULL
int sam_audio_null_initialize(int minor);
#endif /* HAVE_AUDIO_NULL */
/****************************************************************************
/************************************************************************************
* Name: stm32_mrf24j40_initialize
*
* Description:
* Initialize the MRF24J40 device.
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
* Zero is returned on success. Otherwise, a negated errno value is returned
* to indicate the nature of the failure.
*
****************************************************************************/
************************************************************************************/
#ifdef HAVE_MRF24J40
int sam_mrf24j40_initialize(void);
-1
View File
@@ -17,7 +17,6 @@ CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH="arm"
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y
CONFIG_BOARD_LOOPSPERMSEC=5483
CONFIG_BOARDCTL_TSCTEST=y
CONFIG_ETH0_PHY_DM9161=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
+25 -4
View File
@@ -1,7 +1,7 @@
/****************************************************************************************************
* configs/shenzhou/src/shenzhou.h
*
* Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -426,7 +426,7 @@ void weak_function stm32_spidev_initialize(void);
* Name: stm32_usbinitialize
*
* Description:
* Called from stm32_usbinitialize very early in inialization to setup USB-related GPIO pins for
* Called from stm32_usbinitialize very early in initialization to setup USB-related GPIO pins for
* the STM3240G-EVAL board.
*
****************************************************************************************************/
@@ -448,13 +448,34 @@ void weak_function stm32_usbinitialize(void);
int stm32_usbhost_initialize(void);
#endif
/************************************************************************************
/****************************************************************************
* Name: stm32_tsc_setup
*
* Description:
* This function is called by board-bringup logic to configure the
* touchscreen device. This function will register the driver as
* /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
*
****************************************************************************/
#ifdef CONFIG_INPUT_ADS7843E
int stm32_tsc_setup(int minor);
#endif
/****************************************************************************
* Name: stm32_adc_setup
*
* Description:
* Initialize ADC and register the ADC driver.
*
************************************************************************************/
****************************************************************************/
#ifdef CONFIG_ADC
int stm32_adc_setup(void);
+11 -1
View File
@@ -1,7 +1,7 @@
/****************************************************************************
* config/shenzhou/src/stm32_appinit.c
*
* Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2016, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -204,6 +204,16 @@ int board_app_initialize(uintptr_t arg)
}
#endif
#ifdef CONFIG_INPUT_ADS7843E
/* Initialize the touchscreen */
ret = stm32_tsc_setup(0);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: stm32_tsc_setup failed: %d\n", ret);
}
#endif
#ifdef CONFIG_ADC
/* Initialize ADC and register the ADC driver. */
+5 -6
View File
@@ -230,13 +230,12 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state)
****************************************************************************/
/****************************************************************************
* Name: board_tsc_setup
* Name: stm32_tsc_setup
*
* Description:
* Each board that supports a touchscreen device must provide this function.
* This function is called by application-specific, setup logic to
* configure the touchscreen device. This function will register the driver
* as /dev/inputN where N is the minor device number.
* This function is called by board-bringup logic to configure the
* touchscreen device. This function will register the driver as
* /dev/inputN where N is the minor device number.
*
* Input Parameters:
* minor - The input device minor number
@@ -247,7 +246,7 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state)
*
****************************************************************************/
int board_tsc_setup(int minor)
int stm32_tsc_setup(int minor)
{
FAR struct spi_dev_s *dev;
int ret;
-4
View File
@@ -729,10 +729,6 @@ nx11
CONFIG_INPUT=y
CONFIG_SIM_TOUCHSCREEN=y
Then you must also have some application logic that will call
board_tsc_setup(0) to register the touchscreen driver. See
also configuration "touchscreen"
NOTES:
a. If you do not have the call to sim_tcinitialize(0), the build

Some files were not shown because too many files have changed in this diff Show More