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:
Ken Van Hoeylandt
2024-02-18 17:40:02 +01:00
committed by GitHub
parent 5fef25fb13
commit 473fb673bd
1630 changed files with 142517 additions and 182264 deletions
+4 -2
View File
@@ -44,7 +44,7 @@ void tdeck_backlight_set(uint8_t duty) {
}
}
lv_disp_t* tdeck_display_init() {
lv_display_t* tdeck_display_init() {
const esp_lcd_panel_io_spi_config_t panel_io_config = {
.cs_gpio_num = TDECK_LCD_PIN_CS,
.dc_gpio_num = TDECK_LCD_PIN_DC,
@@ -134,10 +134,12 @@ lv_disp_t* tdeck_display_init() {
.flags = {
.buff_dma = false,
.buff_spiram = true,
.sw_rotate = false,
.swap_bytes = true
}
};
lv_disp_t* display = lvgl_port_add_disp(&disp_cfg);
lv_display_t* display = lvgl_port_add_disp(&disp_cfg);
return display;
}
+2 -2
View File
@@ -1,13 +1,13 @@
#pragma once
#include "hal/lv_hal_disp.h"
#include "lvgl.h"
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
lv_disp_t* tdeck_display_init();
lv_display_t* tdeck_display_init();
bool tdeck_backlight_init();
+6 -14
View File
@@ -1,6 +1,6 @@
#include "keyboard.h"
#include "config.h"
#include "hal/lv_hal.h"
#include "lvgl.h"
#include "tactility_core.h"
#include "ui/lvgl_keypad.h"
#include <driver/i2c.h>
@@ -8,7 +8,6 @@
#define TAG "tdeck_keyboard"
typedef struct {
lv_indev_drv_t* driver;
lv_indev_t* device;
} KeyboardData;
@@ -44,7 +43,7 @@ void keyboard_wait_for_response() {
* @param indev_drv
* @param data
*/
static void keyboard_read_callback(TT_UNUSED struct _lv_indev_drv_t* indev_drv, lv_indev_data_t* data) {
static void keyboard_read_callback(TT_UNUSED lv_indev_t* indev, lv_indev_data_t* data) {
static uint8_t last_buffer = 0x00;
uint8_t read_buffer = 0x00;
@@ -70,16 +69,10 @@ static void keyboard_read_callback(TT_UNUSED struct _lv_indev_drv_t* indev_drv,
Keyboard keyboard_alloc(_Nullable lv_disp_t* display) {
KeyboardData* data = malloc(sizeof(KeyboardData));
data->driver = malloc(sizeof(lv_indev_drv_t));
memset(data->driver, 0, sizeof(lv_indev_drv_t));
lv_indev_drv_init(data->driver);
data->driver->type = LV_INDEV_TYPE_KEYPAD;
data->driver->read_cb = &keyboard_read_callback;
data->driver->disp = display;
data->device = lv_indev_drv_register(data->driver);
tt_check(data->device != NULL);
data->device = lv_indev_create();
lv_indev_set_type(data->device, LV_INDEV_TYPE_KEYPAD);
lv_indev_set_read_cb(data->device, &keyboard_read_callback);
lv_indev_set_display(data->device, display);
tt_lvgl_keypad_set_indev(data->device);
@@ -89,6 +82,5 @@ Keyboard keyboard_alloc(_Nullable lv_disp_t* display) {
void keyboard_free(Keyboard keyboard) {
KeyboardData* data = (KeyboardData*)keyboard;
lv_indev_delete(data->device);
free(data->driver);
free(data);
}