mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:32:45 +01:00
drivers/ili9341: add spi mode configuration option
This commit is contained in:
parent
9c520fd793
commit
35737a24e4
@ -30,7 +30,7 @@
|
||||
|
||||
static void _ili9341_spi_acquire(ili9341_t *dev)
|
||||
{
|
||||
spi_acquire(dev->params->spi, dev->params->cs_pin, SPI_MODE_0,
|
||||
spi_acquire(dev->params->spi, dev->params->cs_pin, dev->params->spi_mode,
|
||||
dev->params->spi_clk);
|
||||
}
|
||||
|
||||
|
@ -45,13 +45,18 @@ extern "C" {
|
||||
#ifndef ILI9341_PARAM_RST
|
||||
#define ILI9341_PARAM_RST GPIO_UNDEF
|
||||
#endif
|
||||
#ifndef ILI9341_PARAM_SPI_MODE
|
||||
#define ILI9341_PARAM_SPI_MODE SPI_MODE_0
|
||||
#endif
|
||||
|
||||
#ifndef ILI9341_PARAMS
|
||||
#define ILI9341_PARAMS { .spi = ILI9341_PARAM_SPI, \
|
||||
.spi_clk = ILI9341_PARAM_SPI_CLK, \
|
||||
.spi_mode = ILI9341_PARAM_SPI_MODE, \
|
||||
.cs_pin = ILI9341_PARAM_CS, \
|
||||
.dcx_pin = ILI9341_PARAM_DCX, \
|
||||
.rst_pin = ILI9341_PARAM_RST }
|
||||
.rst_pin = ILI9341_PARAM_RST, \
|
||||
}
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
|
@ -84,6 +84,7 @@ extern "C" {
|
||||
typedef struct {
|
||||
spi_t spi; /**< SPI device that the display is connected to */
|
||||
spi_clk_t spi_clk; /**< SPI clock speed to use */
|
||||
spi_mode_t spi_mode;/**< SPI mode */
|
||||
gpio_t cs_pin; /**< pin connected to the CHIP SELECT line */
|
||||
gpio_t dcx_pin; /**< pin connected to the DC line */
|
||||
gpio_t rst_pin; /**< pin connected to the reset line */
|
||||
|
Loading…
Reference in New Issue
Block a user