diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-10-12 17:37:15 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-10-12 17:37:15 +0000 |
commit | 13b1e4d5c583c69e93f52ada836aabad691e9fd3 (patch) | |
tree | af69144a82d6b45d539f715d78468afd69d2dddc | |
parent | 707848e89c9ae1163fb94932d67ebdf1161776e3 (diff) | |
download | px4-nuttx-13b1e4d5c583c69e93f52ada836aabad691e9fd3.tar.gz px4-nuttx-13b1e4d5c583c69e93f52ada836aabad691e9fd3.tar.bz2 px4-nuttx-13b1e4d5c583c69e93f52ada836aabad691e9fd3.zip |
ADS7843 updates
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4042 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | nuttx/arch/mips/src/pic32mx/pic32mx-head.S | 2 | ||||
-rw-r--r-- | nuttx/configs/sam3u-ek/src/up_spi.c | 2 | ||||
-rwxr-xr-x | nuttx/configs/sam3u-ek/src/up_touchscreen.c | 12 | ||||
-rw-r--r-- | nuttx/drivers/input/ads7843e.h | 4 |
4 files changed, 14 insertions, 6 deletions
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-head.S b/nuttx/arch/mips/src/pic32mx/pic32mx-head.S index ec7b8a991..dedc84558 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-head.S +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-head.S @@ -538,7 +538,7 @@ devconfig3: devconfig2: .long CONFIG_PIC32MX_PLLIDIV | CONFIG_PIC32MX_PLLMULT | \ - CONFIG_PIC32MX_UPLLIDIV | DEVCFG2_FPLLODIV_DIV1 | \ + CONFIG_PIC32MX_UPLLIDIV | CONFIG_PIC32MX_PLLODIV | \ DEVCFG2_UNUSED devconfig1: diff --git a/nuttx/configs/sam3u-ek/src/up_spi.c b/nuttx/configs/sam3u-ek/src/up_spi.c index 8fed3c48f..8dafc293e 100644 --- a/nuttx/configs/sam3u-ek/src/up_spi.c +++ b/nuttx/configs/sam3u-ek/src/up_spi.c @@ -161,7 +161,6 @@ void weak_function sam3u_spiinitialize(void) * ****************************************************************************/ -#ifdef CONFIG_SAM3U_SPI int sam3u_spicsnumber(enum spi_dev_e devid) { int cs = -EINVAL; @@ -240,6 +239,5 @@ uint8_t sam3u_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid) { return 0; } -#endif #endif /* CONFIG_SAM3U_SPI */ diff --git a/nuttx/configs/sam3u-ek/src/up_touchscreen.c b/nuttx/configs/sam3u-ek/src/up_touchscreen.c index 9b58f151c..0de367ec9 100755 --- a/nuttx/configs/sam3u-ek/src/up_touchscreen.c +++ b/nuttx/configs/sam3u-ek/src/up_touchscreen.c @@ -179,10 +179,20 @@ static void tsc_clear(FAR struct ads7843e_config_s *state) static bool tsc_busy(FAR struct ads7843e_config_s *state) { +#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_VERBOSE) + static bool last = (bool)-1; +#endif + /* REVISIT: This might need to be inverted */ bool busy = sam3u_gpioread(GPIO_TCS_BUSY); - ivdbg("busy:%d\n", busy); +#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_VERBOSE) + if (busy != last) + { + ivdbg("busy:%d\n", busy); + last = busy; + } +#endif return busy; } diff --git a/nuttx/drivers/input/ads7843e.h b/nuttx/drivers/input/ads7843e.h index edf205c61..7a534099e 100644 --- a/nuttx/drivers/input/ads7843e.h +++ b/nuttx/drivers/input/ads7843e.h @@ -72,11 +72,11 @@ #define ADS7843E_CMD_DFR (1 << 2) /* SER/DFR */ #define ADS7843E_CMD_EIGHT_BITS_MOD (1 << 3) /* Mode */ #define ADS7843E_CMD_START (1 << 7) /* Start Bit */ -#define ADS7843E_CMD_SWITCH_SHIFT 4 /* Address setting */ +#define ADS7843E_CMD_SWITCH_SHIFT 4 /* Address setting */ /* ADS7843E Commands */ -#define ADS7843_CMD_YPOSITION \ +#define ADS7843_CMD_YPOSITION \ ((1 << ADS7843E_CMD_SWITCH_SHIFT)|ADS7843E_CMD_START|ADS7843E_CMD_PD0|ADS7843E_CMD_PD1) #define ADS7843_CMD_XPOSITION \ ((5 << ADS7843E_CMD_SWITCH_SHIFT)|ADS7843E_CMD_START|ADS7843E_CMD_PD0|ADS7843E_CMD_PD1) |