commit
a04036be65
52
CONTRIBUTE_CONTROLLER_SUPPORT.md
Normal file
52
CONTRIBUTE_CONTROLLER_SUPPORT.md
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
# Is your driver not listed on the supported drivers list?
|
||||||
|
|
||||||
|
Consider contributing to this demo project by adding support to your driver.
|
||||||
|
|
||||||
|
## Display driver.
|
||||||
|
|
||||||
|
To enable LVGL to work with your display you would need to implement from one up to three callback functions (one function for RGB TFT displays, three functions for monochrome display controllers), you can add more functions to enable backlight control, etc.
|
||||||
|
|
||||||
|
All display controller code is stored on the `components/lvgl_esp32_drivers/lvgl_tft` directory, see `disp_driver` and `CMakeLists.txt` to add your code into the idf project.
|
||||||
|
|
||||||
|
Create a header and source file named after the display controller (in lowercase). On the header file declare the necessary functions, such as:
|
||||||
|
|
||||||
|
```c
|
||||||
|
/* Configure your display */
|
||||||
|
void x_init(void);
|
||||||
|
|
||||||
|
/* LVGL callbacks */
|
||||||
|
void x_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_map);
|
||||||
|
/* Only for monochrome displays */
|
||||||
|
void x_rounder(lv_disp_drv_t *disp_drv, lv_area_t *area);
|
||||||
|
void x_set_px(lv_disp_drv_t *disp_drv, uint8_t *buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa);
|
||||||
|
```
|
||||||
|
|
||||||
|
Where x is the controller name.
|
||||||
|
|
||||||
|
For more information on the function callbacks check LVGL documentation: (Display driver)[https://docs.lvgl.io/v7/en/html/porting/display.html#display-driver].
|
||||||
|
|
||||||
|
Add your display functions on `disp_driver_init`, `disp_driver_flush`, `disp_driver_rounder` and `disp_driver_set_px` on the `disp_driver.c` file.
|
||||||
|
|
||||||
|
## Input device driver.
|
||||||
|
|
||||||
|
To enable LVGL to work with your touch controller you would need to implement an initialization function and one function to get the data out from your touch controller.
|
||||||
|
|
||||||
|
All touch controller code is stored on the `components/lvgl_esp32_drivers/lvgl_touch` directory.
|
||||||
|
|
||||||
|
Create a header and source file named after the display controller (in lowercase). On the header file declare the necessary functions, such as:
|
||||||
|
|
||||||
|
```c
|
||||||
|
/* Configure your display */
|
||||||
|
void x_init(void);
|
||||||
|
|
||||||
|
/* LVGL callbacks */
|
||||||
|
bool x_read(lv_disp_drv_t *drv, lv_indev_data_t *data);
|
||||||
|
```
|
||||||
|
|
||||||
|
Where x is the controller name.
|
||||||
|
|
||||||
|
For more information on the function callbacks check LVGL documentation: (Display driver)[https://docs.lvgl.io/v7/en/html/porting/indev.html].
|
||||||
|
|
||||||
|
## Kconfig and Project Configuration
|
||||||
|
|
||||||
|
The ESP32 SDK (ESP-IDF) uses [kconfiglib](https://github.com/ulfalizer/Kconfiglib) which is a Python-based extension to the [Kconfig](https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt) system which provides a compile-time project configuration mechanism. Using `idf.py menuconfig` will update the file sdkconfig and, during build, provide the file sdkconfig.h.
|
62
README.md
62
README.md
|
@ -1 +1,63 @@
|
||||||
# lvgl esp32 drivers
|
# lvgl esp32 drivers
|
||||||
|
|
||||||
|
**NOTE:** You need to set the display horizontal and vertical size, color depth and
|
||||||
|
swap of RGB565 color on the LVGL configuration menuconfig (it's not handled automatically).
|
||||||
|
|
||||||
|
[Supported display controllers](#Supported-display-controllers)
|
||||||
|
|
||||||
|
[Supported indev controllers](#Supported-indev-controllers)
|
||||||
|
|
||||||
|
[Support for predefined development kits](#Support-fot-predefined-development-kits)
|
||||||
|
|
||||||
|
# Supported display controllers
|
||||||
|
|
||||||
|
|
||||||
|
| Display Controller | Type | Interface | Color depth (LV_COLOR_DEPTH) | Swap RGB565 color (LV_COLOR_16_SWAP) |
|
||||||
|
|---------------------------------------------|------------|------------------------|------------------------------|----------------------------------------|
|
||||||
|
| ILI9341 | TFT | SPI | 16: RGB565 | Yes |
|
||||||
|
| ILI9486 | TFT | SPI | 16: RGB565 | Yes |
|
||||||
|
| ILI9488 | TFT | SPI | 16: RGB565 | No |
|
||||||
|
| HX8357B/HX8357D | TFT | SPI | 16: RGB565 | Yes |
|
||||||
|
| ST7789 | TFT | SPI | 16: RGB565 | Yes |
|
||||||
|
| ST7735S | TFT | SPI | 16: RGB565 | Yes |
|
||||||
|
| FT81x | TFT | Single, Dual, Quad SPI | 16: RGB565 | No |
|
||||||
|
| GC9A01 | TFT | SPI | 16: RGB565 | Yes |
|
||||||
|
| RA8875 | TFT | SPI | 16: RGB565 | Yes |
|
||||||
|
| SH1107 | Monochrome | SPI | 1: 1byte per pixel | No |
|
||||||
|
| SSD1306 | Monochrome | I2C | 1: 1byte per pixel | No |
|
||||||
|
| IL3820 | e-Paper | SPI | 1: 1byte per pixel | No |
|
||||||
|
| UC8151D/ GoodDisplay GDEW0154M10 DES | e-Paper | SPI | 1: 1byte per pixel | No |
|
||||||
|
| FitiPower JD79653A/ GoodDisplay GDEW0154M09 | e-Paper | SPI | 1: 1byte per pixel | No |
|
||||||
|
|
||||||
|
# Supported indev controllers
|
||||||
|
|
||||||
|
- XPT2046
|
||||||
|
- FT3236
|
||||||
|
- other FT6X36 or the FT6206 controllers should work as well (not tested)
|
||||||
|
- STMPE610
|
||||||
|
- FT81x (Single, Dual, and Quad SPI)
|
||||||
|
|
||||||
|
If your display or input device (touch) controller is not supported consider contributing to this repo by
|
||||||
|
adding support to it! [Contribute controller support](CONTRIBUTE_CONTROLLER_SUPPORT.md)
|
||||||
|
|
||||||
|
# Support for predefined development kits
|
||||||
|
|
||||||
|
You can also use the predefined kits, which selects the correct display controllers on the kit,
|
||||||
|
and sets the gpio numbers for the interface.
|
||||||
|
|
||||||
|
| Kit name | Display controller | Interface | Hor. Res. | Ver. Res. |
|
||||||
|
|---------------------------|-----------------------|-----------|-----------|-----------|
|
||||||
|
| ESP Wrover Kit v4.1 | ILI9341 | SPI | 240 | 320 |
|
||||||
|
| M5Stack | ILI9341 | SPI | 240 | 320 |
|
||||||
|
| M5Stick | SH1107 | SPI | - | - |
|
||||||
|
| M5StickC | ST7735S | SPI | 80 | 160 |
|
||||||
|
| Adafruit 3.5 Featherwing | HX8357 | SPI | 480 | 320 |
|
||||||
|
| RPi MPI3501 | ILI9486 | SPI | - | - |
|
||||||
|
| Wemos Lolin OLED | SSD1306 | SPI | 64 | 128 |
|
||||||
|
| ER-TFT035-6 | ILI9488 | SPI | 480 | 320 |
|
||||||
|
| AIRcable ATAGv3 | IL3820 | SPI | 128 | 296 |
|
||||||
|
| TTGO T-Display | ST7789 | SPI | 135 | 240 |
|
||||||
|
| TTGO Camera Plus | ST7789 | SPI | 240 | 240 |
|
||||||
|
|
||||||
|
**NOTE:** See [Supported display controllers](#Supported-display-controllers) for more information on display configuration.
|
||||||
|
**NOTE:** See [Supported indev controllers](#Supported-indev-controllers) for more information about indev configuration.
|
||||||
|
|
Loading…
Reference in a new issue