Skip to content

Commit da990cd

Browse files
authored
feat(lvgl): Update to LVGL v9.2.2 (#379)
* Update LVGL submodule to 9.2.2 * Update display to use public APIs instead of private APIs * Update affected examples to use public APIs instead of private APIs * Update t-dongle to have proper color and display offset configuration
1 parent 0af7980 commit da990cd

File tree

16 files changed

+20
-20
lines changed

16 files changed

+20
-20
lines changed

components/display/include/display.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,7 @@ template <typename Pixel> class Display : public BaseComponent {
239239
*/
240240
void force_refresh() const {
241241
auto disp = lv_display_get_default();
242-
// lv_refr_now(disp);
243-
lv_area_t area = {.x1 = 0, .y1 = 0, .x2 = (int16_t)width_, .y2 = (int16_t)height_};
244-
_lv_inv_area(disp, &area);
242+
lv_obj_invalidate(lv_scr_act());
245243
}
246244

247245
/**
@@ -273,7 +271,7 @@ template <typename Pixel> class Display : public BaseComponent {
273271
* @brief LVGL event handler.
274272
*/
275273
static void event_cb(lv_event_t *event) {
276-
if (event->code == LV_EVENT_RESOLUTION_CHANGED) {
274+
if (lv_event_get_code(event) == LV_EVENT_RESOLUTION_CHANGED) {
277275
auto rotation = lv_display_get_rotation(lv_display_get_default());
278276
auto rotation_callback = reinterpret_cast<rotation_fn>(lv_event_get_user_data(event));
279277
if (rotation_callback != nullptr) {

components/display_drivers/example/main/display_drivers_example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static void IRAM_ATTR lcd_spi_post_transfer_callback(spi_transaction_t *t) {
6161
uint16_t user_flags = (uint32_t)(t->user);
6262
bool should_flush = user_flags & FLUSH_BIT;
6363
if (should_flush) {
64-
lv_display_t *disp = _lv_refr_get_disp_refreshing();
64+
lv_display_t *disp = lv_display_get_default();
6565
lv_display_flush_ready(disp);
6666
}
6767
}

components/esp-box/example/main/esp_box_example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ extern "C" void app_main(void) {
107107
clear_circles();
108108
static auto rotation = LV_DISPLAY_ROTATION_0;
109109
rotation = static_cast<lv_display_rotation_t>((static_cast<int>(rotation) + 1) % 4);
110-
lv_display_t *disp = _lv_refr_get_disp_refreshing();
110+
lv_display_t *disp = lv_display_get_default();
111111
lv_disp_set_rotation(disp, rotation);
112112
},
113113
LV_EVENT_PRESSED, nullptr);

components/esp-box/src/video.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static void lcd_spi_post_transfer_callback(spi_transaction_t *t) {
2929
uint16_t user_flags = (uint32_t)(t->user);
3030
bool should_flush = user_flags & FLUSH_BIT;
3131
if (should_flush) {
32-
lv_display_t *disp = _lv_refr_get_disp_refreshing();
32+
lv_display_t *disp = lv_display_get_default();
3333
lv_display_flush_ready(disp);
3434
}
3535
}

components/lvgl

Submodule lvgl updated 1946 files

components/matouch-rotary-display/example/main/matouch_rotary_display_example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ extern "C" void app_main(void) {
108108
clear_circles();
109109
static auto rotation = LV_DISPLAY_ROTATION_0;
110110
rotation = static_cast<lv_display_rotation_t>((static_cast<int>(rotation) + 1) % 4);
111-
lv_display_t *disp = _lv_refr_get_disp_refreshing();
111+
lv_display_t *disp = lv_display_get_default();
112112
lv_disp_set_rotation(disp, rotation);
113113
},
114114
LV_EVENT_PRESSED, nullptr);

components/matouch-rotary-display/src/matouch-rotary-display.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static void IRAM_ATTR lcd_spi_post_transfer_callback(spi_transaction_t *t) {
226226
uint16_t user_flags = (uint32_t)(t->user);
227227
bool should_flush = user_flags & FLUSH_BIT;
228228
if (should_flush) {
229-
lv_display_t *disp = _lv_refr_get_disp_refreshing();
229+
lv_display_t *disp = lv_display_get_default();
230230
lv_display_flush_ready(disp);
231231
}
232232
}

components/seeed-studio-round-display/example/main/seeed_studio_round_display_example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static void on_rotate_pressed(lv_event_t *event) {
145145
std::lock_guard<std::recursive_mutex> lock(lvgl_mutex);
146146
static auto rotation = LV_DISPLAY_ROTATION_0;
147147
rotation = static_cast<lv_display_rotation_t>((static_cast<int>(rotation) + 1) % 4);
148-
lv_display_t *disp = _lv_refr_get_disp_refreshing();
148+
lv_display_t *disp = lv_display_get_default();
149149
lv_disp_set_rotation(disp, rotation);
150150
}
151151

components/seeed-studio-round-display/src/seeed-studio-round-display.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static void IRAM_ATTR lcd_spi_post_transfer_callback(spi_transaction_t *t) {
186186
uint16_t user_flags = (uint32_t)(t->user);
187187
bool should_flush = user_flags & FLUSH_BIT;
188188
if (should_flush) {
189-
lv_display_t *disp = _lv_refr_get_disp_refreshing();
189+
lv_display_t *disp = lv_display_get_default();
190190
lv_display_flush_ready(disp);
191191
}
192192
}

components/t-deck/example/main/t_deck_example.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extern "C" void app_main(void) {
3434
std::lock_guard<std::recursive_mutex> lock(lvgl_mutex);
3535
clear_circles();
3636
rotation = static_cast<lv_display_rotation_t>((static_cast<int>(rotation) + 1) % 4);
37-
lv_display_t *disp = _lv_refr_get_disp_refreshing();
37+
lv_display_t *disp = lv_display_get_default();
3838
lv_disp_set_rotation(disp, rotation);
3939
}
4040
};
@@ -117,7 +117,7 @@ extern "C" void app_main(void) {
117117
std::lock_guard<std::recursive_mutex> lock(lvgl_mutex);
118118
clear_circles();
119119
rotation = static_cast<lv_display_rotation_t>((static_cast<int>(rotation) + 1) % 4);
120-
lv_display_t *disp = _lv_refr_get_disp_refreshing();
120+
lv_display_t *disp = lv_display_get_default();
121121
lv_disp_set_rotation(disp, rotation);
122122
},
123123
LV_EVENT_PRESSED, nullptr);

0 commit comments

Comments
 (0)