diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-20 15:24:24 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-20 15:24:24 -0600 |
commit | a049aba3dd939808136c019000122dd0bf019a33 (patch) | |
tree | d542db0f2e20783a4465ba9c61ceb3ad168a1d4c /nuttx/configs | |
parent | daff28675dff3be28b2203c9db29360b0f3f7031 (diff) | |
download | px4-nuttx-a049aba3dd939808136c019000122dd0bf019a33.tar.gz px4-nuttx-a049aba3dd939808136c019000122dd0bf019a33.tar.bz2 px4-nuttx-a049aba3dd939808136c019000122dd0bf019a33.zip |
stm32f429i-disco: enable usage of ili93414ws
This enables build and configuration of the ili94314ws sub driver.
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
Diffstat (limited to 'nuttx/configs')
-rw-r--r-- | nuttx/configs/stm32f429i-disco/Kconfig | 41 | ||||
-rw-r--r-- | nuttx/configs/stm32f429i-disco/src/Makefile | 8 | ||||
-rw-r--r-- | nuttx/configs/stm32f429i-disco/src/stm32_spi.c | 12 |
3 files changed, 55 insertions, 6 deletions
diff --git a/nuttx/configs/stm32f429i-disco/Kconfig b/nuttx/configs/stm32f429i-disco/Kconfig index dddb2a5d1..f79ec5ac9 100644 --- a/nuttx/configs/stm32f429i-disco/Kconfig +++ b/nuttx/configs/stm32f429i-disco/Kconfig @@ -133,4 +133,45 @@ config PM_SLEEP_WAKEUP_NSEC ---help--- Number of additional nanoseconds to wait in PM_SLEEP before going to PM_STANDBY mode. +config STM32F429I_DISCO_ILI9341 + bool "LCD driver for ILI9341 Liquid Crystal Display Controller" + default n + ---help--- + Enables support for a connected display based on ili9341 LCD Single Chip + Driver. This sub driver supports only communication with the display driver + connected via 4-wire serial (spi) mcu interface. + +config STM32F429I_DISCO_ILI9341_SPIFREQUENCY + int "SPI frequency" + default 12000000 + depends on STM32F429I_DISCO_ILI9341 + ---help--- + Define the bus freqency of the spi device. + +config STM32F429I_DISCO_ILI9341_SPIBITS16 + bool "Enable 16 bit pixel read/write" + default n + depends on STM32F429I_DISCO_ILI9341 + ---help--- + This enables faster 16-bit spi mode for transmitting or receiving pixel data + to or from the display gram. But uses default 8-bit spi mode for all other + display operations. + +config STM32F429I_DISCO_ILI9341_LCDIFACE + bool "Enable support for nuttx lcd interface" + default n + depends on STM32F429I_DISCO_ILI9341 && LCD_ILI9341 + ---help--- + Enable lcd driver support for the nuttx lcd interface. + +config STM32F429I_DISCO_ILI9341_LCDDEVICE + int "LCD interface" + default 0 + range 0 1 + depends on STM32F429I_DISCO_ILI9341_LCDIFACE + ---help--- + Define the lcd interface which should be used. This must be + corresponding to the configured ili9341 lcd device in the driver + section. + endif diff --git a/nuttx/configs/stm32f429i-disco/src/Makefile b/nuttx/configs/stm32f429i-disco/src/Makefile index 126dee35e..aa69b1d33 100644 --- a/nuttx/configs/stm32f429i-disco/src/Makefile +++ b/nuttx/configs/stm32f429i-disco/src/Makefile @@ -72,6 +72,14 @@ ifeq ($(CONFIG_STM32_OTGFHS),y) CSRCS += stm32_usb.c endif +ifeq ($(CONFIG_STM32F429I_DISCO_ILI9341),y) +CSRCS += stm32_ili93414ws.c +endif + +ifeq ($(CONFIG_STM32F429I_DISCO_ILI9341_LCDIFACE),y) +CSRCS += stm32_lcd.c +endif + ifeq ($(CONFIG_ARCH_FPU),y) CSRCS += stm32_ostest.c endif diff --git a/nuttx/configs/stm32f429i-disco/src/stm32_spi.c b/nuttx/configs/stm32f429i-disco/src/stm32_spi.c index 67e6ee02c..2cda28178 100644 --- a/nuttx/configs/stm32f429i-disco/src/stm32_spi.c +++ b/nuttx/configs/stm32f429i-disco/src/stm32_spi.c @@ -2,7 +2,8 @@ * configs/stm32f429i-disco/src/stm32_spi.c * * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <gnutt@nuttx.org> + * Authors: Gregory Nutt <gnutt@nuttx.org> + * Marco Krahl <ocram.lhark@gmail.com> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -189,7 +190,7 @@ void stm32_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele { spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); -#if defined(CONFIG_STM32_LTDC) +#if defined(CONFIG_STM32F429I_DISCO_ILI9341) if (devid == SPIDEV_DISPLAY) { stm32_gpiowrite(GPIO_CS_LCD, !selected); @@ -263,16 +264,15 @@ int stm32_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) #ifdef CONFIG_STM32_SPI5 int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd) { -#if defined(CONFIG_STM32_LTDC) +#if defined(CONFIG_STM32F429I_DISCO_ILI9341) if (devid == SPIDEV_DISPLAY) { - /* "This is the Data/Command control pad which determines whether the + /* This is the Data/Command control pad which determines whether the * data bits are data or a command. */ -# if defined(CONFIG_STM32_LTDC) (void)stm32_gpiowrite(GPIO_LCD_DC, !cmd); -# endif + return OK; } #endif |