From 8371c056b4a09854ef2ca066334c8ed9741c5c01 Mon Sep 17 00:00:00 2001 From: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:26:56 +1100 Subject: [PATCH] [qspi_dbi] Rename from qspi_amoled (#4335) --- _redirects | 1 + .../display/{qspi_amoled.rst => qspi_dbi.rst} | 75 +++++++++++++++---- index.rst | 2 +- 3 files changed, 63 insertions(+), 15 deletions(-) rename components/display/{qspi_amoled.rst => qspi_dbi.rst} (74%) diff --git a/_redirects b/_redirects index 0b7f37536..c2015d757 100644 --- a/_redirects +++ b/_redirects @@ -42,3 +42,4 @@ /ready-made/projects /projects/ 301 /components/images /components/image 301 +/components/display/qspi_amoled.html /components/display/qspi_dbi.html 301 diff --git a/components/display/qspi_amoled.rst b/components/display/qspi_dbi.rst similarity index 74% rename from components/display/qspi_amoled.rst rename to components/display/qspi_dbi.rst index 5d65d8b46..fbd54f7c8 100644 --- a/components/display/qspi_amoled.rst +++ b/components/display/qspi_dbi.rst @@ -1,20 +1,21 @@ -Quad SPI AMOLED Displays -======================== +Quad SPI Displays +================= .. seo:: - :description: Instructions for setting up quad SPI AMOLED displays. + :description: Instructions for setting up quad SPI displays. :image: t4-s3.jpg -.. _qspi_amoled: +.. _qspi_dbi: Models ------ -This display driver supports AMOLED displays with quad SPI interfaces. +This display driver supports AMOLED and LCD displays with quad SPI interfaces, using the MIPI DBI interface. This driver has been tested with the following displays: - Lilygo T4-S3 - Lilygo T-Display S3 AMOLED + - JC4832W535 board using AXS15231 Usage ----- @@ -36,19 +37,16 @@ ESP-IDF. PSRAM is a requirement due to the size of the display buffer. A :ref:`q .. code-block:: yaml - # Example minimal configuration entry + # Example configuration entry display: - - platform: qspi_amoled + - platform: qspi_dbi model: RM690B0 data_rate: 80MHz - spi_mode: mode0 dimensions: width: 450 height: 600 offset_width: 16 - color_order: rgb - invert_colors: false brightness: 255 cs_pin: GPIOXX reset_pin: GPIOXX @@ -58,7 +56,8 @@ ESP-IDF. PSRAM is a requirement due to the size of the display buffer. A :ref:`q Configuration variables: ************************ -- **model** (**Required**): One of ``RM67162`` or ``RM690B0``. +- **model** (**Required**): One of ``CUSTOM``, ``RM67162`` or ``RM690B0``. +- **init_sequence** (*Optional*, A list of byte arrays): Specifies the init sequence for the display. This is required when using the ``CUSTOM`` model - but may be empty. If specified for other models this data will be sent after the pre-configured sequence. - **cs_pin** (**Required**, :ref:`Pin Schema `): The chip select pin. - **reset_pin** (*Optional*, :ref:`Pin Schema `): The RESET pin. - **enable_pin** (*Optional*, :ref:`Pin Schema `): The display enable pin. @@ -84,6 +83,7 @@ Configuration variables: - **data_rate** (*Optional*): Set the data rate of the SPI interface to the display. One of ``80MHz``, ``40MHz``, ``20MHz``, ``10MHz`` (default), ``5MHz``, ``2MHz`` or ``1MHz``. - **spi_mode** (*Optional*): Set the mode for the SPI interface to the display. Default is ``MODE0``. - **invert_colors** (*Optional*): With this boolean option you can invert the display colors. +- **draw_from_origin** (*Optional*): When set, all partial display updates will start at the origin (0,0). Defaults to false. - **lambda** (*Optional*, :ref:`lambda `): The lambda to use for rendering the content on the display. See :ref:`display-engine` for more information. @@ -115,7 +115,7 @@ Lilygo T4-S3 reset_pin: 17 display: - - platform: qspi_amoled + - platform: qspi_dbi model: RM690B0 data_rate: 80MHz spi_mode: mode0 @@ -162,7 +162,7 @@ Lilygo T-Display S3 AMOLED number: 21 display: - - platform: qspi_amoled + - platform: qspi_dbi model: RM67162 id: main_lcd dimensions: @@ -178,9 +178,56 @@ Lilygo T-Display S3 AMOLED enable_pin: 38 +JC4832W535 3.5" LCD Board +************************* + +This rotates the display into landscape mode using software rotation. + +.. code-block:: yaml + + psram: + mode: octal + speed: 80MHz + + spi: + id: display_qspi + type: quad + clk_pin: 47 + data_pins: [21,48,40,39] + + power_supply: + id: backlight_id + pin: 1 + enable_on_boot: true + + display: + - platform: qspi_dbi + model: axs15231 + data_rate: 40MHz + dimensions: + height: 480 + width: 320 + cs_pin: + number: 45 + ignore_strapping_warning: true + auto_clear_enabled: false + update_interval: never + init_sequence: + + i2c: + sda: 4 + scl: 8 + + touchscreen: + platform: axs15231 + transform: + swap_xy: true + mirror_y: true + + See Also -------- - :doc:`index` -- :apiref:`qspi_amoled/qspi_amoled.h` +- :apiref:`qspi_dbi/qspi_dbi.h` - :ghedit:`Edit` diff --git a/index.rst b/index.rst index 313144cf7..f95db6dc3 100644 --- a/index.rst +++ b/index.rst @@ -872,7 +872,7 @@ Display Hardware Platforms Nextion, components/display/nextion, nextion.jpg PCD8544 (Nokia 5110/ 3310), components/display/pcd8544, pcd8544.jpg PVVX MiThermometer, components/display/pvvx_mithermometer, ../components/sensor/images/xiaomi_lywsd03mmc.jpg - Quad SPI AMOLED, components/display/qspi_amoled, t4-s3.jpg + Quad SPI Displays, components/display/qspi_dbi, t4-s3.jpg RPI_DPI_RGB, components/display/rpi_dpi_rgb, waveshare_touch-s3.jpg SSD1306, components/display/ssd1306, ssd1306.jpg SSD1322, components/display/ssd1322, ssd1322.jpg