Skip to content

Commit

Permalink
docs(spi_lcd): update supported spi mode description
Browse files Browse the repository at this point in the history
Closes #14605
  • Loading branch information
Kainarx authored and suda-morris committed Oct 9, 2024
1 parent 24d39de commit 941d389
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/en/api-reference/peripherals/lcd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ SPI Interfaced LCD

#. 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
spi_bus_config_t buscfg = {
.sclk_io_num = EXAMPLE_PIN_NUM_SCLK,
.mosi_io_num = EXAMPLE_PIN_NUM_MOSI,
.miso_io_num = EXAMPLE_PIN_NUM_MISO,
.quadwp_io_num = -1, // Quad SPI LCD driver is not yet supported
.quadhd_io_num = -1, // Quad SPI LCD driver is not yet supported
.quadwp_io_num = -1,
.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
};
ESP_ERROR_CHECK(spi_bus_initialize(LCD_HOST, &buscfg, SPI_DMA_CH_AUTO)); // Enable the DMA feature
Expand Down

0 comments on commit 941d389

Please sign in to comment.