Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3-lcd-ev-board: add display & touch, update docs #203

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions LCD.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ The list of available LCD displays and links to LCD driver component and touch d
| <img src="docu/pics/wrover.png" width="150"> | [ESP-WROVER-KIT](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-wrover-kit.html) | ILI9341 | [IDF](https://github.com/espressif/esp-idf/tree/master/components/esp_lcd) | -| - | |
| <img src="docu/pics/box.webp" width="150"> | ESP-BOX | ST7789 | [IDF](https://github.com/espressif/esp-idf/tree/master/components/esp_lcd) | TT21100 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_touch_tt21100) | |
| <img src="docu/pics/kaluga.png" width="150"> | [ESP32-S2-Kaluga Kit](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-esp32-s2-kaluga-1-kit.html) | ST7789 | [IDF](https://github.com/espressif/esp-idf/tree/master/components/esp_lcd) | - | - | |
| <img src="docu/pics/esp32_s3_otg.png" width="150"> | [ESP32-S3-USB-OTG](https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32s3/esp32-s3-usb-otg/user_guide.html) | ST7789 | [IDF](https://github.com/espressif/esp-idf/tree/master/components/esp_lcd) | - | - | |
| <img src="docu/pics/esp32-s2-hmi-devkit-1-3d-v1.0.png" width="150"> | [ESP32-S2-HMI-DevKit-1](https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32s2/esp32-s2-hmi-devkit-1/user_guide.html#hardware-overview) | RM68120 | **IN PLAN** | FT5X06 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_touch_ft5x06) | |
| <img src="docu/pics/esp32_s3_otg.png" width="150"> | [ESP32-S3-USB-OTG](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-usb-otg/user_guide.html) | ST7789 | [IDF](https://github.com/espressif/esp-idf/tree/master/components/esp_lcd) | - | - | |
| <img src="docu/pics/esp32-s2-hmi-devkit-1-3d-v1.0.png" width="150"> | [ESP32-S2-HMI-DevKit-1](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s2/esp32-s2-hmi-devkit-1/user_guide.html#hardware-overview) | RM68120 | **IN PLAN** | FT5X06 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_touch_ft5x06) | |
| <img src="docu/pics/1.28inch-LCD-Module-1.jpg" width="150"> | [Waveshare 1.28" round LCD](https://www.waveshare.com/product/1.28inch-lcd-module.htm) | GC9A01 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_gc9a01) | - | - | |
| <img src="docu/pics/7inch-Capacitive-Touch-LCD-C_l.jpg" width="150"> | [Waveshare 7" LCD](https://www.waveshare.com/7inch-capacitive-touch-lcd-c.htm) | RA8875 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_ra8875) | GT911 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_touch_gt911) | |
| <img src="docu/pics/Adafruit-PiTFT.jpg" width="150"> | [Adafruit PiTFT - 2.8"](https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi) | ILI9341 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_ili9341) | STMPE610 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_touch_stmpe610) | |
Expand All @@ -18,5 +18,5 @@ The list of available LCD displays and links to LCD driver component and touch d
| <img src="docu/pics/ssd1306.jpg" width="150"> | 128x32 0,91" OLED | SSD1306 | [IDF](https://github.com/espressif/esp-idf/tree/master/components/esp_lcd) | - | - | |
| <img src="docu/pics/ssd1963.jpg" width="150"> | Parallel | SSD1963 | **N/A** | - | - | |
| <img src="docu/pics/st7796.jpg" width="150"> | Parallel/SPI | ST7796 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_st7796) | - | - | |
| <img src="docu/pics/esp32-s3-lcd-ev-board_480x480.png" width="150"> | [ESP32-S3-LCD-EV-Board](https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide.html) | GC9503 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_gc9503) | FT5X06 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_touch_ft5x06) | |
| <img src="docu/pics/esp32-s3-lcd-ev-board_800x480.png" width="150"> | [ESP32-S3-LCD-EV-Board-2](https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide.html) | ST7262E43 | **N/A** | GT1151 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_touch_gt1151) | |
| <img src="docu/pics/esp32-s3-lcd-ev-board_480x480.png" width="150"> | [ESP32-S3-LCD-EV-Board](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide.html) | GC9503 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_gc9503) | FT5X06 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_touch_ft5x06) | |
| <img src="docu/pics/esp32-s3-lcd-ev-board_800x480.png" width="150"> | [ESP32-S3-LCD-EV-Board-2](https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide.html) | ST7262E43 | **N/A** | GT1151 | [Component Manager](https://components.espressif.com/component/espressif/esp_lcd_touch_gt1151) | |
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Board support packages for development boards using Espressif's SoCs, written in
| [ESP32-S2-Kaluga Kit](esp32_s2_kaluga_kit) | ESP32-S2 | LCD display, audio codec + power amplifier,<br>smart LED and camera | <img src="docu/pics/kaluga.png" width="150"> |
| [ESP32-S3-USB-OTG](esp32_s3_usb_otg) | ESP32-S3 | LCD display, uSD card slot, USB-OTG | <img src="docu/pics/esp32_s3_otg.png" width="150"> |
| [ESP32-S3-EYE](esp32_s3_eye) | ESP32-S3 | LCD display, camera, uSD card slot, microphone and accelerometer | <img src="docu/pics/s3-eye.webp" width="150"> |
| [ESP32-S3-LCD-EV-BOARD](esp32_s3_lcd_ev_board) | ESP32-S3 | LCD display with touch, audio codec + power amplifier | <img src="docu/pics/esp32-s3-lcd-ev-board_800x480.png" width="150"> |
| [ESP32-S3-LCD-EV-Board](esp32_s3_lcd_ev_board) | ESP32-S3 | LCD display with touch, audio codec + power amplifier | <img src="docu/pics/esp32-s3-lcd-ev-board_480x480.png" width="150"> |
| [ESP32-S3-LCD-EV-Board-2](esp32_s3_lcd_ev_board) | ESP32-S3 | LCD display with touch, audio codec + power amplifier | <img src="docu/pics/esp32-s3-lcd-ev-board_800x480.png" width="150"> |
| [ESP32-S3-Korvo-2](esp32_s3_korvo_2) | ESP32-S3 | LCD display, camera, uSD card slot, microphone, audio codec + power amplifier | <img src="docu/pics/korvo-2.png" width="150"> |
| [ESP32-LyraT](esp32_lyrat) | ESP32 | uSD card slot, microphone, audio codec + power amplifier | <img src="docu/pics/lyrat.png" width="150"> |
| [ESP32-C3-LCDKit](esp32_c3_lcdkit) | ESP32-C3 | LCD display with encoder, IR, PDM audio| <img src="docu/pics/esp32_c3_lcdkit.png" width="150"> |
Expand Down Expand Up @@ -41,12 +42,12 @@ Best way to start with ESP-BSP is trying one of the [examples](examples) on your
| [display_camera](examples/display_camera) | Kaluga-kit |
| [display_audio_photo](examples/display_audio_photo) | ESP-BOX |
| [display_rotation](examples/display_rotation) | ESP-BOX |
| [display_lvgl_demos](examples/display_lvgl_demos) | ESP32-S3-LCD-EV-BOARD |
| [display_lvgl_demos](examples/display_lvgl_demos) | ESP32-S3-LCD-EV-Board |
| [mqtt_example](examples/mqtt_example) | Azure-IoT-kit |
| [sensors_example](examples/sensors_example) | Azure-IoT-kit |

### BSP headers
Each BSP provides its header file in 'bsp' subfolder, so it can be included as follows: `#include "bsp/name-of-the-bsp.h"`.
Each BSP provides its header file in 'bsp' subfolder, so it can be included as follows: `#include "bsp/name-of-the-bsp.h"`.
For you convenience, each BSP also provides a wrapper header, which has the same name for all BSPs: `#include "bsp/esp-bsp.h"`.

BSPs that contain LCD screen or touchscreen also provide `bsp/display.h` and `bsp/touch.h`. These files provide functions for LCD or touchscreen initialization without LVGL graphics library, which is used by default.
Expand Down
18 changes: 18 additions & 0 deletions esp32_s3_lcd_ev_board/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,21 @@
* RGB Anti-tearing:
* Optimize direct mode
* Use triple-buffer in full-refresh mode

## v2.0.0 - 2023-08-07

### Features

* Configurations:
* Add support for screen rotation using triple buffers when enabling RGB anti-tearing.
* Add support for configuring SPIFFS.
* Implementations:
* Use `esp_lcd_panel_io_additions` and `esp_lcd_gc9503` components to drive the LCD of sub_board2.
* Use `esp_codec_dev` component to handle audio chips.
* Use `button` component to handle button.
* Implement automatic detection of the LCD sub-board type
* APIs:
* Add new APIs for display in `bsp/display.h`
* Add new APIs for touch in `bsp/touch.h`
* Add new APIs for spiffs, audio in `bsp/esp32_s3_lcd_ev_board.h`
* Add new APIs for ADC in `bsp/esp32_s3_lcd_ev_board.h`
14 changes: 4 additions & 10 deletions esp32_s3_lcd_ev_board/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
set(SUB_BOARD_SRC "")

if (CONFIG_BSP_LCD_SUB_BOARD_480_480)
set(SUB_BOARD_SRC "sub_board/sub_board_480x480.c")
elseif (CONFIG_BSP_LCD_SUB_BOARD_800_480)
set(SUB_BOARD_SRC "sub_board/sub_board_800x480.c")
endif()
file(GLOB_RECURSE SRCS src/*.c)

idf_component_register(
SRCS "esp32_s3_lcd_ev_board.c" ${SUB_BOARD_SRC}
SRCS ${SRCS}
INCLUDE_DIRS "include"
PRIV_INCLUDE_DIRS "priv_include"
REQUIRES driver
PRIV_REQUIRES esp_timer esp_lcd
REQUIRES driver esp_lcd esp_adc
PRIV_REQUIRES esp_timer spiffs
)
67 changes: 63 additions & 4 deletions esp32_s3_lcd_ev_board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,62 @@ menu "Board Support Package"
default 100000
endmenu

menu "SPIFFS - Virtual File System"
config BSP_SPIFFS_FORMAT_ON_MOUNT_FAIL
bool "Format SPIFFS if mounting fails"
default n
help
Format SPIFFS if it fails to mount the filesystem.

config BSP_SPIFFS_MOUNT_POINT
string "SPIFFS mount point"
default "/spiffs"
help
Mount point of SPIFFS in the Virtual File System.

config BSP_SPIFFS_PARTITION_LABEL
string "Partition label of SPIFFS"
default "storage"
help
Partition label which stores SPIFFS.

config BSP_SPIFFS_MAX_FILES
int "Max files supported for SPIFFS VFS"
default 5
help
Supported max files for SPIFFS in the Virtual File System.
endmenu

menu "LCD"
choice BSP_LCD_SUB_BOARD
prompt "Select Sub board"
default BSP_LCD_SUB_BOARD_800_480
prompt "Select Target Sub board"
default BSP_LCD_SUB_BOARD_NONE
help
Select the sub-board of the LCD. If there are no specific requirements for the sub board, please select "Not specifying a sub board".

config BSP_LCD_SUB_BOARD_NONE
bool "Not specifying a sub board"
config BSP_LCD_SUB_BOARD_480_480
bool "Sub board 2 with 480x480 RGB LCD"
config BSP_LCD_SUB_BOARD_800_480
bool "Sub board 3 with 800x480 RGB LCD"
endchoice

config BSP_LCD_SUB_BOARD_TYPE
int
default 0 if BSP_LCD_SUB_BOARD_NONE
default 1 if BSP_LCD_SUB_BOARD_480_480
default 2 if BSP_LCD_SUB_BOARD_800_480

config BSP_LCD_RGB_BUFFER_NUMS
int "Set number of frame buffers"
depends on BSP_LCD_SUB_BOARD_480_480 || BSP_LCD_SUB_BOARD_800_480
default 1
range 1 3
help
Let RGB LCD driver create a specified number of frame-size buffers. Only when it is set to multiple can the avoiding tearing be turned on.

choice BSP_LCD_RGB_REFRESH_MODE
prompt "Select the refresh mode for RGB LCD"
depends on BSP_LCD_SUB_BOARD_480_480 || BSP_LCD_SUB_BOARD_800_480
default BSP_LCD_RGB_REFRESH_AUTO
config BSP_LCD_RGB_REFRESH_AUTO
bool "Auto refresh mode"
Expand Down Expand Up @@ -126,6 +161,30 @@ menu "Board Support Package"
bool "Direct mode"
endchoice

choice BSP_DISPLAY_LVGL_ROTATION
depends on BSP_DISPLAY_LVGL_AVOID_TEAR
depends on BSP_LCD_RGB_BUFFER_NUMS = 3
prompt "Select rotation"
default BSP_DISPLAY_LVGL_ROTATION_NONE
config BSP_DISPLAY_LVGL_ROTATION_NONE
bool "Rotation 0"
config BSP_DISPLAY_LVGL_ROTATION_90
bool "Rotation 90"
config BSP_DISPLAY_LVGL_ROTATION_180
bool "Rotation 180"
config BSP_DISPLAY_LVGL_ROTATION_270
bool "Rotation 270"
help
Rotate screen when avoid tearing effect is enabled. Need to set BSP_LCD_RGB_BUFFER_NUMS to 3.
endchoice

config BSP_DISPLAY_LVGL_ROTATION_DEGREE
int
default 0 if BSP_DISPLAY_LVGL_ROTATION_NONE
default 1 if BSP_DISPLAY_LVGL_ROTATION_90
default 2 if BSP_DISPLAY_LVGL_ROTATION_180
default 3 if BSP_DISPLAY_LVGL_ROTATION_270

choice BSP_DISPLAY_LVGL_BUF_CAPS
depends on !BSP_DISPLAY_LVGL_AVOID_TEAR
prompt "Select LVGL buffer memory capability"
Expand Down
Loading
Loading