mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
docs(spi_lcd): update supported spi mode description
Closes https://github.com/espressif/esp-idf/issues/14605
This commit is contained in:
parent
7e2a7bd5b2
commit
5bef0f5664
@ -5,14 +5,16 @@ SPI Interfaced LCD
|
|||||||
|
|
||||||
#. Create an SPI bus. Please refer to :doc:`SPI Master API doc </api-reference/peripherals/spi_master>` for more details.
|
#. Create an SPI bus. Please refer to :doc:`SPI Master API doc </api-reference/peripherals/spi_master>` for more details.
|
||||||
|
|
||||||
|
Currently the driver supports SPI, Quad SPI and Octal SPI (simulate Intel 8080 timing) modes.
|
||||||
|
|
||||||
.. code-block:: c
|
.. code-block:: c
|
||||||
|
|
||||||
spi_bus_config_t buscfg = {
|
spi_bus_config_t buscfg = {
|
||||||
.sclk_io_num = EXAMPLE_PIN_NUM_SCLK,
|
.sclk_io_num = EXAMPLE_PIN_NUM_SCLK,
|
||||||
.mosi_io_num = EXAMPLE_PIN_NUM_MOSI,
|
.mosi_io_num = EXAMPLE_PIN_NUM_MOSI,
|
||||||
.miso_io_num = EXAMPLE_PIN_NUM_MISO,
|
.miso_io_num = EXAMPLE_PIN_NUM_MISO,
|
||||||
.quadwp_io_num = -1, // Quad SPI LCD driver is not yet supported
|
.quadwp_io_num = -1,
|
||||||
.quadhd_io_num = -1, // Quad SPI LCD driver is not yet supported
|
.quadhd_io_num = -1,
|
||||||
.max_transfer_sz = EXAMPLE_LCD_H_RES * 80 * sizeof(uint16_t), // transfer 80 lines of pixels (assume pixel is RGB565) at most in one SPI transaction
|
.max_transfer_sz = EXAMPLE_LCD_H_RES * 80 * sizeof(uint16_t), // transfer 80 lines of pixels (assume pixel is RGB565) at most in one SPI transaction
|
||||||
};
|
};
|
||||||
ESP_ERROR_CHECK(spi_bus_initialize(LCD_HOST, &buscfg, SPI_DMA_CH_AUTO)); // Enable the DMA feature
|
ESP_ERROR_CHECK(spi_bus_initialize(LCD_HOST, &buscfg, SPI_DMA_CH_AUTO)); // Enable the DMA feature
|
||||||
|
@ -5,14 +5,16 @@ SPI 接口的 LCD
|
|||||||
|
|
||||||
#. 创建 SPI 总线。详情请参阅 :doc:`SPI 主机 API 文档 </api-reference/peripherals/spi_master>`。
|
#. 创建 SPI 总线。详情请参阅 :doc:`SPI 主机 API 文档 </api-reference/peripherals/spi_master>`。
|
||||||
|
|
||||||
|
目前驱动支持 SPI, Quad SPI 和 Octal SPI(模拟 Intel 8080 时序)模式。
|
||||||
|
|
||||||
.. code-block:: c
|
.. code-block:: c
|
||||||
|
|
||||||
spi_bus_config_t buscfg = {
|
spi_bus_config_t buscfg = {
|
||||||
.sclk_io_num = EXAMPLE_PIN_NUM_SCLK,
|
.sclk_io_num = EXAMPLE_PIN_NUM_SCLK,
|
||||||
.mosi_io_num = EXAMPLE_PIN_NUM_MOSI,
|
.mosi_io_num = EXAMPLE_PIN_NUM_MOSI,
|
||||||
.miso_io_num = EXAMPLE_PIN_NUM_MISO,
|
.miso_io_num = EXAMPLE_PIN_NUM_MISO,
|
||||||
.quadwp_io_num = -1, // 目前不支持 Quad SPI LCD 驱动
|
.quadwp_io_num = -1,
|
||||||
.quadhd_io_num = -1, // 目前不支持 Quad SPI LCD 驱动
|
.quadhd_io_num = -1,
|
||||||
.max_transfer_sz = EXAMPLE_LCD_H_RES * 80 * sizeof(uint16_t), // 单次最多可传输 80 行像素(假设像素格式为 RGB565)
|
.max_transfer_sz = EXAMPLE_LCD_H_RES * 80 * sizeof(uint16_t), // 单次最多可传输 80 行像素(假设像素格式为 RGB565)
|
||||||
};
|
};
|
||||||
ESP_ERROR_CHECK(spi_bus_initialize(LCD_HOST, &buscfg, SPI_DMA_CH_AUTO)); // 启用 DMA
|
ESP_ERROR_CHECK(spi_bus_initialize(LCD_HOST, &buscfg, SPI_DMA_CH_AUTO)); // 启用 DMA
|
||||||
|
Loading…
Reference in New Issue
Block a user