From 4bdba8bdc60834b676daecca41f7add889162d15 Mon Sep 17 00:00:00 2001 From: Liu Zhongwei Date: Mon, 14 Nov 2022 17:29:24 +0800 Subject: [PATCH] esp_lcd: modify flag name --- components/esp_lcd/include/esp_lcd_panel_io.h | 2 +- components/esp_lcd/src/esp_lcd_panel_io_spi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_lcd/include/esp_lcd_panel_io.h b/components/esp_lcd/include/esp_lcd_panel_io.h index 1a161c40fa..c01fe3e441 100644 --- a/components/esp_lcd/include/esp_lcd_panel_io.h +++ b/components/esp_lcd/include/esp_lcd_panel_io.h @@ -136,7 +136,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 interface_I_mode: 1; /*!< Read and write through a single data line (MOSI) */ + 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 */ diff --git a/components/esp_lcd/src/esp_lcd_panel_io_spi.c b/components/esp_lcd/src/esp_lcd_panel_io_spi.c index 51d3387243..58194aa9bd 100644 --- a/components/esp_lcd/src/esp_lcd_panel_io_spi.c +++ b/components/esp_lcd/src/esp_lcd_panel_io_spi.c @@ -73,7 +73,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.interface_I_mode ? SPI_DEVICE_3WIRE : 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,