Update to LVGL 9.0.0 (#47)
- Updated LVGL from 8.3 to 9.0 (removed example/docs/demo folders) - Updated esp_lvgl_port to current status of the `lvgl9` branch on `esp-bsp`: https://github.com/espressif/esp-bsp/tree/lvgl9 - Updated all boards and drivers - Removed `libs/lv_drivers` subproject as SDL is now supported by LVGL directly (although keyboard input seems broken) - Updated `libs/lv_screenshot` - Fixed the way `tt_statusbar` widget works due to behaviour change in LVGL - Updated other lvgl code
This commit is contained in:
committed by
GitHub
parent
5fef25fb13
commit
473fb673bd
@@ -13,6 +13,20 @@ This component helps with using LVGL with Espressif's LCD and touch drivers. It
|
||||
* Add/remove navigation buttons input (using [`button`](https://github.com/espressif/esp-iot-solution/tree/master/components/button))
|
||||
* Add/remove encoder input (using [`knob`](https://github.com/espressif/esp-iot-solution/tree/master/components/knob))
|
||||
|
||||
## LVGL Version
|
||||
|
||||
This component supports **LVGL8** and **LVGL9**. By default, it selects the latest LVGL version. If you want to use a specific version (e.g. latest LVGL8), you can easily put into `idf_component.yml` in your project like this:
|
||||
|
||||
```
|
||||
lvgl/lvgl:
|
||||
version: "^8"
|
||||
public: true
|
||||
```
|
||||
|
||||
### LVGL Version Compatibility
|
||||
|
||||
This component is fully compatible with LVGL version 9. All types and functions are used from LVGL9. Some LVGL9 types are not supported in LVGL8 and there are retyping in [`esp_lvgl_port_compatibility.h`](include/esp_lvgl_port_compatibility.h) header file. **Please, be aware, that some draw and object functions are not compatible between LVGL8 and LVGL9.**
|
||||
|
||||
## Usage
|
||||
|
||||
### Initialization
|
||||
@@ -53,6 +67,7 @@ Add an LCD screen to the LVGL. It can be called multiple times for adding multip
|
||||
},
|
||||
.flags = {
|
||||
.buff_dma = true,
|
||||
.swap_bytes = false,
|
||||
}
|
||||
};
|
||||
disp_handle = lvgl_port_add_disp(&disp_cfg);
|
||||
@@ -219,11 +234,43 @@ Every LVGL calls must be protected with these lock/unlock commands:
|
||||
```
|
||||
|
||||
### Rotating screen
|
||||
|
||||
LVGL port supports rotation of the display. You can select whether you'd like software rotation or hardware rotation.
|
||||
Software rotation requires no additional logic in your `flush_cb` callback.
|
||||
|
||||
Rotation mode can be selected in the `lvgl_port_display_cfg_t` structure.
|
||||
``` c
|
||||
const lvgl_port_display_cfg_t disp_cfg = {
|
||||
...
|
||||
.flags = {
|
||||
...
|
||||
.sw_rotate = true / false, // true: software; false: hardware
|
||||
}
|
||||
}
|
||||
```
|
||||
Display rotation can be changed at runtime.
|
||||
|
||||
``` c
|
||||
lv_disp_set_rotation(disp_handle, LV_DISP_ROT_90);
|
||||
```
|
||||
|
||||
**Note:** During the rotating, the component call [`esp_lcd`](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/lcd.html) API.
|
||||
**Note:** During the hardware rotating, the component call [`esp_lcd`](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/lcd.html) API. When using software rotation, you cannot use neither `direct_mode` nor `full_refresh` in the driver. See [LVGL documentation](https://docs.lvgl.io/8.3/porting/display.html?highlight=sw_rotate) for more info.
|
||||
|
||||
### Using PSRAM canvas
|
||||
|
||||
If the SRAM is insufficient, you can use the PSRAM as a canvas and use a small trans_buffer to carry it, this makes drawing more efficient.
|
||||
``` c
|
||||
const lvgl_port_display_cfg_t disp_cfg = {
|
||||
...
|
||||
.buffer_size = DISP_WIDTH * DISP_HEIGHT, // in PSRAM, not DMA-capable
|
||||
.trans_size = size, // in SRAM, DMA-capable
|
||||
.flags = {
|
||||
.buff_spiram = true,
|
||||
.buff_dma = false,
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Performance
|
||||
|
||||
|
||||
Reference in New Issue
Block a user