Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion components/esp_lvgl_port/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Changelog

## [Unreleased]
## 2.7.0

### Features
- Added option to place LVGL task stack to external RAM
- Added option to inclide a rounder callback for LVGL 9

## 2.6.0

Expand Down
1 change: 1 addition & 0 deletions components/esp_lvgl_port/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Add an LCD screen to the LVGL. It can be called multiple times for adding multip
.monochrome = false,
.mipi_dsi = false,
.color_format = LV_COLOR_FORMAT_RGB565,
.rounder_cb = my_rounder_cb, // for LVGL9
.rotation = {
.swap_xy = false,
.mirror_x = false,
Expand Down
2 changes: 1 addition & 1 deletion components/esp_lvgl_port/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "2.6.0"
version: "2.7.0"
description: ESP LVGL port
url: https://github.com/espressif/esp-bsp/tree/master/components/esp_lvgl_port
dependencies:
Expand Down
8 changes: 8 additions & 0 deletions components/esp_lvgl_port/include/esp_lvgl_port_disp.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ typedef struct {
bool mirror_y; /*!< LCD Screen mirrored Y (in esp_lcd driver) */
} lvgl_port_rotation_cfg_t;

#if LVGL_VERSION_MAJOR >= 9
/**
* @brief Rounder callback
*/
typedef void (*lvgl_port_rounder_cb_t)(lv_area_t *area);
#endif

/**
* @brief Configuration display structure
*/
Expand All @@ -53,6 +60,7 @@ typedef struct {
lvgl_port_rotation_cfg_t rotation; /*!< Default values of the screen rotation (Only HW state. Not supported for default SW rotation!) */
#if LVGL_VERSION_MAJOR >= 9
lv_color_format_t color_format; /*!< The color format of the display */
lvgl_port_rounder_cb_t rounder_cb; /*!< Rounder callback for display area */
#endif
struct {
unsigned int buff_dma: 1; /*!< Allocated LVGL buffer will be DMA capable */
Expand Down
6 changes: 6 additions & 0 deletions components/esp_lvgl_port/src/lvgl9/esp_lvgl_port_disp.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,12 @@ static void lvgl_port_disp_size_update_callback(lv_event_t *e)

static void lvgl_port_display_invalidate_callback(lv_event_t *e)
{
lvgl_port_display_ctx_t *disp_ctx = (lvgl_port_display_ctx_t *)lv_event_get_user_data(e);
lv_area_t *area = (lv_area_t *)lv_event_get_param(e);
if (area != NULL && disp_ctx != NULL && disp_ctx->rounder_cb != NULL) {
disp_ctx->rounder_cb(area);
}

/* Wake LVGL task, if needed */
lvgl_port_task_wake(LVGL_PORT_EVENT_DISPLAY, NULL);
}