Replace allLVGL driver I2C code with I2C Manager

For discussion see #70
This commit is contained in:
Rop Gonggrijp 2021-07-08 11:04:07 +02:00
parent 8f1370d1c4
commit e52112376f
24 changed files with 896 additions and 679 deletions

View file

@ -6,6 +6,7 @@ For a ready to use ESP32 project take look at the [lv_port_esp32](https://github
- [Supported display controllers](#supported-display-controllers)
- [Supported indev controllers](#supported-indev-controllers)
- [Support for predefined development kits](#support-for-predefined-development-kits)
- [Thread-safe I2C with I2C Manager](#thread-safe-i2c-with-i2c-manager)
**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).
@ -35,8 +36,8 @@ swap of RGB565 color on the LVGL configuration menuconfig (it's not handled auto
## Supported indev controllers
- XPT2046
- FT3236
- other FT6X36 or the FT6206 controllers should work as well (not tested)
- FT3236, FT6X36
- FT6206 controllers should work as well (not tested)
- STMPE610
- FT81x (Single, Dual, and Quad SPI)
@ -52,7 +53,7 @@ and sets the gpio numbers for the interface.
|---------------------------|-----------------------|-----------|-----------|-----------|
| ESP Wrover Kit v4.1 | ILI9341 | SPI | 240 | 320 |
| M5Stack | ILI9341 | SPI | 240 | 320 |
| M5Core2 | ILI9341 | SPI | 240 | 320 |
| M5Stack Core2 | ILI9341 | SPI | 240 | 320 |
| M5Stick | SH1107 | SPI | - | - |
| M5StickC | ST7735S | SPI | 80 | 160 |
| Adafruit 3.5 Featherwing | HX8357 | SPI | 480 | 320 |
@ -65,3 +66,16 @@ and sets the gpio numbers for the interface.
**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.
## Thread-safe I2C with I2C Manager
LVGL can use I2C to read from a touch sensor or write to a display, possibly
many times a second. Meanwhile, other tasks may also want to read from i2c
devices on the same bus. I2C using the ESP-IDF is not thread-safe.
I2C Manager (`i2c_manager`) is a component that will let code in multiple threads
talk to devices on the I2C ports without getting in each other's way. These drivers
use a built-in copy of I2C Manager to talk to the I2C port, but you can also use
the I2C Manager component itself and have others play nice with LVGL and vice-versa.
[Click here](i2c_manager/README.md) for details.