From a280d993608d0c40ad0b4efc8adcbf72f67d53a4 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 11 May 2012 00:05:25 +0000 Subject: NxWM: Finishes touchscreen implementation; NuttX: Standardize touchscreen initialization interfaces for all boards git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4721 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/sam3u-ek/src/up_touchscreen.c | 30 ++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'nuttx/configs/sam3u-ek/src/up_touchscreen.c') diff --git a/nuttx/configs/sam3u-ek/src/up_touchscreen.c b/nuttx/configs/sam3u-ek/src/up_touchscreen.c index 0de367ec9..35ab43859 100644 --- a/nuttx/configs/sam3u-ek/src/up_touchscreen.c +++ b/nuttx/configs/sam3u-ek/src/up_touchscreen.c @@ -2,7 +2,7 @@ * configs/sam3u-ek/src/up_touchscreen.c * arch/arm/src/board/up_touchscreen.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -213,16 +214,27 @@ static bool tsc_pendown(FAR struct ads7843e_config_s *state) * Name: arch_tcinitialize * * Description: - * Initialize the touchscreen device + * 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. + * + * 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. * ****************************************************************************/ -int arch_tcinitialize(void) +int arch_tcinitialize(int minor) { FAR struct spi_dev_s *dev; int ret; - ivdbg("Initializing\n"); + idbg("minor %d\n", minor); + DEBUGASSERT(minor == 0); /* Configure and enable the ADS7843E interrupt pin as an input */ @@ -259,7 +271,15 @@ int arch_tcinitialize(void) * Name: arch_tcuninitialize * * Description: - * Un-initialize the touchscreen device + * Each board that supports a touchscreen device must provide this function. + * This function is called by application-specific, setup logic to + * uninitialize the touchscreen device. + * + * Input Parameters: + * None + * + * Returned Value: + * None. * ****************************************************************************/ -- cgit v1.2.3