mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
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>
This commit is contained in:
@@ -133,4 +133,45 @@ config PM_SLEEP_WAKEUP_NSEC
|
|||||||
---help---
|
---help---
|
||||||
Number of additional nanoseconds to wait in PM_SLEEP before going to PM_STANDBY mode.
|
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
|
endif
|
||||||
|
|||||||
@@ -72,6 +72,14 @@ ifeq ($(CONFIG_STM32_OTGFHS),y)
|
|||||||
CSRCS += stm32_usb.c
|
CSRCS += stm32_usb.c
|
||||||
endif
|
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)
|
ifeq ($(CONFIG_ARCH_FPU),y)
|
||||||
CSRCS += stm32_ostest.c
|
CSRCS += stm32_ostest.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
* configs/stm32f429i-disco/src/stm32_spi.c
|
* configs/stm32f429i-disco/src/stm32_spi.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
|
* 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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* 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");
|
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)
|
if (devid == SPIDEV_DISPLAY)
|
||||||
{
|
{
|
||||||
stm32_gpiowrite(GPIO_CS_LCD, !selected);
|
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
|
#ifdef CONFIG_STM32_SPI5
|
||||||
int stm32_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
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)
|
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.
|
* data bits are data or a command.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# if defined(CONFIG_STM32_LTDC)
|
|
||||||
(void)stm32_gpiowrite(GPIO_LCD_DC, !cmd);
|
(void)stm32_gpiowrite(GPIO_LCD_DC, !cmd);
|
||||||
# endif
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user