summaryrefslogtreecommitdiff
path: root/nuttx/configs/sam3u-ek/src
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-11 00:05:25 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-11 00:05:25 +0000
commita280d993608d0c40ad0b4efc8adcbf72f67d53a4 (patch)
tree0c718467856492451acfb8af51db3d59abad08fb /nuttx/configs/sam3u-ek/src
parent68f3044b5099572850a9e81a1c63161c20809547 (diff)
downloadpx4-nuttx-a280d993608d0c40ad0b4efc8adcbf72f67d53a4.tar.gz
px4-nuttx-a280d993608d0c40ad0b4efc8adcbf72f67d53a4.tar.bz2
px4-nuttx-a280d993608d0c40ad0b4efc8adcbf72f67d53a4.zip
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
Diffstat (limited to 'nuttx/configs/sam3u-ek/src')
-rw-r--r--nuttx/configs/sam3u-ek/src/up_touchscreen.c30
1 files changed, 25 insertions, 5 deletions
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 <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -43,6 +43,7 @@
#include <stdbool.h>
#include <stdio.h>
#include <debug.h>
+#include <assert.h>
#include <errno.h>
#include <nuttx/spi.h>
@@ -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.
*
****************************************************************************/