boards/esp32-wrover-kit: add ILI9341 driver params
Signed-off-by: Jean Pierre Dudey <me@jeandudey.tech>
This commit is contained in:
parent
e8cadc02d8
commit
771584e4e3
@ -97,6 +97,32 @@
|
|||||||
#endif
|
#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 common board definitions as last step */
|
||||||
#include "board_common.h"
|
#include "board_common.h"
|
||||||
|
|
||||||
@ -108,6 +134,10 @@ extern "C" {
|
|||||||
* @brief Initialize the board specific hardware
|
* @brief Initialize the board specific hardware
|
||||||
*/
|
*/
|
||||||
static inline void board_init(void) {
|
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 */
|
/* there is nothing special to initialize on this board */
|
||||||
board_init_common();
|
board_init_common();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user