From f664e163e5b861f80a013423fbe1018a2de38ed0 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 27 Sep 2012 20:15:24 +0000 Subject: Fix STM32 SPI3 remap logic git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5200 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/ChangeLog | 3 +++ nuttx/arch/arm/src/stm32/stm32_gpio.c | 1 + nuttx/configs/shenzhou/nxwm/defconfig | 6 +++--- nuttx/configs/shenzhou/src/up_touchscreen.c | 3 --- nuttx/drivers/input/ads7843e.c | 3 +-- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'nuttx') diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 1e667ddcf..48ebddfca 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3435,3 +3435,6 @@ DM9161 PHY. If the DM9161 failed to initialize, then use the up_sysemreset() logic to reset the MCU. Contributed by Darcy Gong. + * arch/arm/src/stm32/stm32_gpio.c: Add missing logic to set bit + for SPI3 remap. This fixes the XPT2046 touchscreen driver using + drivers/input/ads7843.c diff --git a/nuttx/arch/arm/src/stm32/stm32_gpio.c b/nuttx/arch/arm/src/stm32/stm32_gpio.c index 4703e8208..1dedd7ce7 100644 --- a/nuttx/arch/arm/src/stm32/stm32_gpio.c +++ b/nuttx/arch/arm/src/stm32/stm32_gpio.c @@ -128,6 +128,7 @@ static inline void stm32_gpioremap(void) val |= AFIO_MAPR_SPI1_REMAP; #endif #ifdef CONFIG_STM32_SPI3_REMAP + val |= AFIO_MAPR_SPI3_REMAP; #endif #ifdef CONFIG_STM32_I2C1_REMAP diff --git a/nuttx/configs/shenzhou/nxwm/defconfig b/nuttx/configs/shenzhou/nxwm/defconfig index b529907c1..811ba0266 100644 --- a/nuttx/configs/shenzhou/nxwm/defconfig +++ b/nuttx/configs/shenzhou/nxwm/defconfig @@ -362,9 +362,9 @@ CONFIG_INPUT_ADS7843E=y # CONFIG_ADS7843E_MULTIPLE is not set CONFIG_ADS7843E_SPIMODE=0 CONFIG_ADS7843E_FREQUENCY=100000 -# CONFIG_ADS7843E_SWAPXY is not set -CONFIG_ADS7843E_THRESHX=12 -CONFIG_ADS7843E_THRESHY=12 +CONFIG_ADS7843E_SWAPXY=y +CONFIG_ADS7843E_THRESHX=39 +CONFIG_ADS7843E_THRESHY=51 # CONFIG_INPUT_STMPE811 is not set CONFIG_LCD=y # CONFIG_LCD_NOGETRUN is not set diff --git a/nuttx/configs/shenzhou/src/up_touchscreen.c b/nuttx/configs/shenzhou/src/up_touchscreen.c index 969b23be4..4740f60a5 100644 --- a/nuttx/configs/shenzhou/src/up_touchscreen.c +++ b/nuttx/configs/shenzhou/src/up_touchscreen.c @@ -209,9 +209,6 @@ static bool tsc_busy(FAR struct ads7843e_config_s *state) * between sending the command, then reading the returned data. */ -#if 0 - up_udelay(1600); /* 1.6MS */ -#endif return false; } diff --git a/nuttx/drivers/input/ads7843e.c b/nuttx/drivers/input/ads7843e.c index ce45e4537..27060bd07 100644 --- a/nuttx/drivers/input/ads7843e.c +++ b/nuttx/drivers/input/ads7843e.c @@ -951,8 +951,7 @@ static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer, size_t le if (sample.valid) { - report->point[0].flags = TOUCH_UP | TOUCH_ID_VALID | - TOUCH_POS_VALID | TOUCH_PRESSURE_VALID; + report->point[0].flags = TOUCH_UP | TOUCH_ID_VALID | TOUCH_POS_VALID; } else { -- cgit v1.2.3