1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/esp32-wrover-kit: add ILI9341 driver params

Signed-off-by: Jean Pierre Dudey <me@jeandudey.tech>
This commit is contained in:
Jean Pierre Dudey 2020-11-03 15:04:27 +01:00
parent e8cadc02d8
commit 771584e4e3

View File

@ -97,6 +97,32 @@
#endif
/** @} */
/**
* @name LCD configuration
*
* This configuration cannot be changed.
* @{
*/
#if MODULE_ILI9341 || DOXYGEN
#define LCD_CS GPIO22
#define LCD_RST GPIO18
#define LCD_DC GPIO21
#define LCD_BACKLIGHT GPIO5
#define BACKLIGHT_ON gpio_clear(LCD_BACKLIGHT)
#define BACKLIGHT_OFF gpio_set(LCD_BACKLIGHT)
#define ILI9341_PARAM_SPI SPI_DEV(1)
#define ILI9341_PARAM_SPI_CLK SPI_CLK_10MHZ
#define ILI9341_PARAM_CS LCD_CS
#define ILI9341_PARAM_DCX LCD_DC
#define ILI9341_PARAM_RST LCD_RST
#define ILi9341_PARAM_RGB 1
#define ILI9341_PARAM_INVERTED 1
#endif
/** @} */
/* include common board definitions as last step */
#include "board_common.h"
@ -108,6 +134,10 @@ extern "C" {
* @brief Initialize the board specific hardware
*/
static inline void board_init(void) {
#if MODULE_ILI9341
gpio_init(LCD_BACKLIGHT, GPIO_OUT);
#endif
/* there is nothing special to initialize on this board */
board_init_common();
}