From d99f1ca574170a9f2757ca63e6a17bbede8b0a54 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 14 Nov 2017 10:18:03 -0600 Subject: [PATCH] configs/stm32f429-disco/fb: Enable support for the STMPE811 touchscreen controller and also for the apps/exmaples/touchscreen test. --- configs/stm32f429i-disco/README.txt | 35 +++++++++++++++++++++++---- configs/stm32f429i-disco/fb/defconfig | 10 +++++++- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/configs/stm32f429i-disco/README.txt b/configs/stm32f429i-disco/README.txt index 32fbd97edb6..20b859da7b5 100644 --- a/configs/stm32f429i-disco/README.txt +++ b/configs/stm32f429i-disco/README.txt @@ -667,10 +667,10 @@ Where is one of the following: 1. This configuration assumes an SST25VF064C 8Mbyte SPI FLASH is connected to SPI4 on the following Discovery board Pins: - SCK: Port PE2 Board Connector P1, Pin 15 - MOSI: Port PE6 Board Connector P1, Pin 11 - MISO: Port PE5 Board Connector P1, Pin 14 - CS: Port PE4 Board Connector P1, Pin 13 + SCK: Port PE2 Board Connector P1, Pin 15 + MOSI: Port PE6 Board Connector P1, Pin 11 + MISO: Port PE5 Board Connector P1, Pin 14 + CS: Port PE4 Board Connector P1, Pin 13 2. This configuration does have UART1 output enabled and set up as the system logging device. To use this UART, you must add an @@ -682,7 +682,32 @@ Where is one of the following: STM32F429I-DISCO LTDC Framebuffer demo example. This is a simple configuration used for some basic (non-graphic) debug of the framebuffer - character drivers using apps/examples/fb. + character drivers using apps/examples/fb. It simply opens the framebuffer + device and draws concentric rectangles of different colors in the + framebuffer: + + nsh> fb + + Also included is the touchscreen test of apps/examples/touchscreen. This + example will simply open the touchscrren driver then collect and display + touch inputs: + + nsh> tc 1 + tc_main: nsamples: 1 + tc_main: Initializing external touchscreen device + tc_main: Opening /dev/input0 + Sample : + npoints : 1 + Point 1 : + id : 0 + flags : 3c + x : 2296 + y : 2311 + h : 0 + w : 0 + pressure : 1 + Terminating! + nsh> nsh: --- diff --git a/configs/stm32f429i-disco/fb/defconfig b/configs/stm32f429i-disco/fb/defconfig index 8b35f1cf60d..5e091e61ae0 100644 --- a/configs/stm32f429i-disco/fb/defconfig +++ b/configs/stm32f429i-disco/fb/defconfig @@ -18,11 +18,14 @@ CONFIG_DRIVERS_VIDEO=y CONFIG_EXAMPLES_FB=y CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y CONFIG_EXAMPLES_NSH=y +CONFIG_EXAMPLES_TOUCHSCREEN=y CONFIG_FS_PROCFS=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_HEAP2_BASE=0xD0000000 CONFIG_HEAP2_SIZE=8081408 +CONFIG_INPUT_STMPE811=y +CONFIG_INPUT=y CONFIG_INTELHEX_BINARY=y CONFIG_MAX_TASKS=16 CONFIG_MAX_WDOGPARMS=2 @@ -42,19 +45,20 @@ CONFIG_RAM_SIZE=114688 CONFIG_RAM_START=0x20000000 CONFIG_RAW_BINARY=y CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_HPWORK=y CONFIG_SCHED_WAITPID=y CONFIG_SDCLONE_DISABLE=y CONFIG_SPI_CMDDATA=y CONFIG_START_DAY=6 CONFIG_START_MONTH=12 CONFIG_START_YEAR=2011 -CONFIG_STM32_CCM_PROCFS=y CONFIG_STM32_CCMEXCLUDE=y CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y CONFIG_STM32_DMA2D_NLAYERS=4 CONFIG_STM32_DMA2D=y CONFIG_STM32_FSMC_SRAM=y CONFIG_STM32_FSMC=y +CONFIG_STM32_I2C3=y CONFIG_STM32_JTAG_SW_ENABLE=y CONFIG_STM32_LTDC_FB_BASE=0xD07B5000 CONFIG_STM32_LTDC_FB_SIZE=307200 @@ -64,6 +68,10 @@ CONFIG_STM32_PWR=y CONFIG_STM32_SPI5=y CONFIG_STM32_USART1=y CONFIG_STM32F429I_DISCO_ILI9341=y +CONFIG_STMPE811_ACTIVELOW=y +CONFIG_STMPE811_EDGE=y +CONFIG_STMPE811_THRESHX=39 +CONFIG_STMPE811_THRESHY=51 CONFIG_TASK_NAME_SIZE=0 CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USER_ENTRYPOINT="nsh_main"