Completes first cut of TSC2007 driver

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3831 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-07-30 17:41:22 +00:00
parent 8501188ee2
commit 488a8fa9d5
5 changed files with 190 additions and 37 deletions
+2 -2
View File
@@ -114,7 +114,7 @@
*
****************************************************************************/
#define I2C_SETADDRESS(d,f,b) ((d)->ops->setaddress(d,f,b))
#define I2C_SETADDRESS(d,a,n) ((d)->ops->setaddress(d,a,n))
/****************************************************************************
* Name: I2C_SETOWNADDRESS
@@ -140,7 +140,7 @@
*
****************************************************************************/
#define I2C_SETOWNADDRESS(d,f,b) ((d)->ops->setownaddress(d,f,b))
#define I2C_SETOWNADDRESS(d,a,n) ((d)->ops->setownaddress(d,a,n))
/****************************************************************************
* Name: I2C_WRITE
+1 -1
View File
@@ -121,7 +121,7 @@ struct tsc2007_config_s
* pendown - Return the state of the pen down GPIO input
*/
int (*attach)(FAR struct tsc2007_config_s *state, xcpt_t isr);
int (*attach)(FAR struct tsc2007_config_s *state, xcpt_t isr);
void (*enable)(FAR struct tsc2007_config_s *state, bool enable);
void (*clear)(FAR struct tsc2007_config_s *state);
bool (*pendown)(FAR struct tsc2007_config_s *state);
+6
View File
@@ -59,6 +59,7 @@
#define _MTDIOCBASE (0x8a00) /* MTD ioctl commands */
#define _SIOCBASE (0x8b00) /* Socket ioctl commands */
#define _ARPBASE (0x8c00) /* ARP ioctl commands */
#define _TSBASE (0x8d00) /* Touchscreen ioctl commands */
/* Macros used to manage ioctl commands */
@@ -160,6 +161,11 @@
#define _ARPIOCVALID(c) (_IOC_TYPE(c)==_ARPBASE)
#define _ARPIOC(nr) _IOC(_ARPBASE,nr)
/* NuttX ARP touchscrren ioctl definitions (see nuttx/input/touchscreen.h) **/
#define _TSIOCVALID(c) (_IOC_TYPE(c)==_TSBASE)
#define _TSIOC(nr) _IOC(_TSBASE,nr)
/****************************************************************************
* Public Type Definitions
****************************************************************************/