mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp_lcd: support sio mode for spi LCD
This commit is contained in:
parent
4c3c23562c
commit
313700e285
@ -116,6 +116,7 @@ typedef struct {
|
||||
struct {
|
||||
unsigned int dc_low_on_data: 1; /*!< If this flag is enabled, DC line = 0 means transfer data, DC line = 1 means transfer command; vice versa */
|
||||
unsigned int octal_mode: 1; /*!< transmit with octal mode (8 data lines), this mode is used to simulate Intel 8080 timing */
|
||||
unsigned int sio_mode: 1; /*!< Read and write through a single data line (MOSI) */
|
||||
unsigned int lsb_first: 1; /*!< transmit LSB bit first */
|
||||
unsigned int cs_high_active: 1; /*!< CS line is high active */
|
||||
} flags; /*!< Extra flags to fine-tune the SPI device */
|
||||
|
@ -72,6 +72,7 @@ esp_err_t esp_lcd_new_panel_io_spi(esp_lcd_spi_bus_handle_t bus, const esp_lcd_p
|
||||
spi_device_interface_config_t devcfg = {
|
||||
.flags = SPI_DEVICE_HALFDUPLEX |
|
||||
(io_config->flags.lsb_first ? SPI_DEVICE_TXBIT_LSBFIRST : 0) |
|
||||
(io_config->flags.sio_mode ? SPI_DEVICE_3WIRE : 0) |
|
||||
(io_config->flags.cs_high_active ? SPI_DEVICE_POSITIVE_CS : 0),
|
||||
.clock_speed_hz = io_config->pclk_hz,
|
||||
.mode = io_config->spi_mode,
|
||||
|
Loading…
Reference in New Issue
Block a user