Skip to content

Commit

Permalink
ESP32 LVGL library from v8.3.8 to v8.3.9 (no functional change) (#19510)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hadinger authored Sep 13, 2023
1 parent 860e12b commit 156f198
Show file tree
Hide file tree
Showing 55 changed files with 386 additions and 365 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
- Reduce IRAM consumption of HDMI CEC to 1453 bytes
- `Sendmail` upgraded to ESP-Mail-Client v3.4.9 from v1.2.0, using BearSSL instead of MbedTLS
- ESP32 Framework (Arduino Core) from v2.0.11 to v2.0.12
- ESP32 LVGL library from v8.3.8 to v8.3.9 (no functional change)

### Fixed
- PCF8574 mode 1 with base relays exception 3/28 regression from v12.4.0.4 (#19408)
Expand Down
2 changes: 1 addition & 1 deletion lib/libesp32_lvgl/lvgl/library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lvgl",
"version": "8.3.8",
"version": "8.3.9",
"keywords": "graphics, gui, embedded, tft, lvgl",
"description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion lib/libesp32_lvgl/lvgl/library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=lvgl
version=8.3.8
version=8.3.9
author=kisvegabor
maintainer=kisvegabor,embeddedt,pete-pjb
sentence=Full-featured Graphics Library for Embedded Systems
Expand Down
2 changes: 1 addition & 1 deletion lib/libesp32_lvgl/lvgl/lv_conf_template.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @file lv_conf.h
* Configuration file for v8.3.8
* Configuration file for v8.3.9
*/

/*
Expand Down
2 changes: 1 addition & 1 deletion lib/libesp32_lvgl/lvgl/lvgl.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extern "C" {
***************************/
#define LVGL_VERSION_MAJOR 8
#define LVGL_VERSION_MINOR 3
#define LVGL_VERSION_PATCH 8
#define LVGL_VERSION_PATCH 9
#define LVGL_VERSION_INFO ""

/*********************
Expand Down
8 changes: 4 additions & 4 deletions lib/libesp32_lvgl/lvgl/src/core/lv_indev.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,16 +356,16 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data)

/*Simple sanity check*/
if(data->point.x < 0) {
LV_LOG_WARN("X is %d which is smaller than zero", data->point.x);
LV_LOG_WARN("X is %d which is smaller than zero", (int)data->point.x);
}
if(data->point.x >= lv_disp_get_hor_res(i->driver->disp)) {
LV_LOG_WARN("X is %d which is greater than hor. res", data->point.x);
LV_LOG_WARN("X is %d which is greater than hor. res", (int)data->point.x);
}
if(data->point.y < 0) {
LV_LOG_WARN("Y is %d which is smaller than zero", data->point.y);
LV_LOG_WARN("Y is %d which is smaller than zero", (int)data->point.y);
}
if(data->point.y >= lv_disp_get_ver_res(i->driver->disp)) {
LV_LOG_WARN("Y is %d which is greater than ver. res", data->point.y);
LV_LOG_WARN("Y is %d which is greater than ver. res", (int)data->point.y);
}

/*Move the cursor if set and moved*/
Expand Down
16 changes: 13 additions & 3 deletions lib/libesp32_lvgl/lvgl/src/core/lv_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,22 @@ void lv_obj_add_flag(lv_obj_t * obj, lv_obj_flag_t f)

bool was_on_layout = lv_obj_is_layout_positioned(obj);

/* We must invalidate the area occupied by the object before we hide it as calls to invalidate hidden objects are ignored */
if(f & LV_OBJ_FLAG_HIDDEN) lv_obj_invalidate(obj);

obj->flags |= f;

if(f & LV_OBJ_FLAG_HIDDEN) {
lv_obj_invalidate(obj);
if(lv_obj_has_state(obj, LV_STATE_FOCUSED)) {
lv_group_t * group = lv_obj_get_group(obj);
if(group != NULL) {
lv_group_focus_next(group);
lv_obj_t * next_obj = lv_group_get_focused(group);
if(next_obj != NULL) {
lv_obj_invalidate(next_obj);
}
}
}
}

if((was_on_layout != lv_obj_is_layout_positioned(obj)) || (f & (LV_OBJ_FLAG_LAYOUT_1 | LV_OBJ_FLAG_LAYOUT_2))) {
Expand Down Expand Up @@ -718,9 +728,9 @@ static void lv_obj_event(const lv_obj_class_t * class_p, lv_event_t * e)
}
else if(code == LV_EVENT_RELEASED) {
lv_obj_clear_state(obj, LV_STATE_PRESSED);
void * param = lv_event_get_param(e);
lv_indev_t * indev = lv_event_get_indev(e);
/*Go the checked state if enabled*/
if(lv_indev_get_scroll_obj(param) == NULL && lv_obj_has_flag(obj, LV_OBJ_FLAG_CHECKABLE)) {
if(lv_indev_get_scroll_obj(indev) == NULL && lv_obj_has_flag(obj, LV_OBJ_FLAG_CHECKABLE)) {
if(!(lv_obj_get_state(obj) & LV_STATE_CHECKED)) lv_obj_add_state(obj, LV_STATE_CHECKED);
else lv_obj_clear_state(obj, LV_STATE_CHECKED);

Expand Down
1 change: 1 addition & 0 deletions lib/libesp32_lvgl/lvgl/src/core/lv_obj.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ typedef struct _lv_obj_t {
uint16_t style_cnt : 6;
uint16_t h_layout : 1;
uint16_t w_layout : 1;
uint16_t being_deleted : 1;
} lv_obj_t;


Expand Down
2 changes: 2 additions & 0 deletions lib/libesp32_lvgl/lvgl/src/core/lv_obj_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ static void obj_del_core(lv_obj_t * obj)
lv_res_t res = lv_event_send(obj, LV_EVENT_DELETE, NULL);
if(res == LV_RES_INV) return;

obj->being_deleted = 1;

/*Recursively delete the children*/
lv_obj_t * child = lv_obj_get_child(obj, 0);
while(child) {
Expand Down
2 changes: 1 addition & 1 deletion lib/libesp32_lvgl/lvgl/src/core/lv_refr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ static void draw_buf_rotate_180(lv_disp_drv_t * drv, lv_area_t * area, lv_color_
area->x1 = drv->hor_res - tmp_coord - 1;
}

static LV_ATTRIBUTE_FAST_MEM void draw_buf_rotate_90(bool invert_i, lv_coord_t area_w, lv_coord_t area_h,
static void LV_ATTRIBUTE_FAST_MEM draw_buf_rotate_90(bool invert_i, lv_coord_t area_w, lv_coord_t area_h,
lv_color_t * orig_color_p, lv_color_t * rot_buf)
{

Expand Down
149 changes: 69 additions & 80 deletions lib/libesp32_lvgl/lvgl/src/draw/arm2d/lv_gpu_arm2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,19 +418,17 @@
**********************/

#if __ARM_2D_HAS_HW_ACC__
LV_ATTRIBUTE_FAST_MEM
static bool lv_draw_arm2d_fill_colour(const arm_2d_tile_t * target_tile,
const arm_2d_region_t * region,
lv_color_t color,
lv_opa_t opa,
const arm_2d_tile_t * mask_tile);

LV_ATTRIBUTE_FAST_MEM
static bool lv_draw_arm2d_tile_copy(const arm_2d_tile_t * target_tile,
const arm_2d_region_t * region,
arm_2d_tile_t * source_tile,
lv_opa_t opa,
arm_2d_tile_t * mask_tile);
static bool /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_arm2d_fill_colour(const arm_2d_tile_t * target_tile,
const arm_2d_region_t * region,
lv_color_t color,
lv_opa_t opa,
const arm_2d_tile_t * mask_tile);

static bool /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_arm2d_tile_copy(const arm_2d_tile_t * target_tile,
const arm_2d_region_t * region,
arm_2d_tile_t * source_tile,
lv_opa_t opa,
arm_2d_tile_t * mask_tile);
#else

static void convert_cb(const lv_area_t * dest_area,
Expand All @@ -443,36 +441,32 @@ static void convert_cb(const lv_area_t * dest_area,
lv_color_t * cbuf,
lv_opa_t * abuf);

LV_ATTRIBUTE_FAST_MEM
static bool arm_2d_fill_normal(lv_color_t * dest_buf,
const lv_area_t * dest_area,
lv_coord_t dest_stride,
lv_color_t color,
lv_opa_t opa,
const lv_opa_t * mask,
lv_coord_t mask_stride);

LV_ATTRIBUTE_FAST_MEM
static bool arm_2d_copy_normal(lv_color_t * dest_buf,
const lv_area_t * dest_area,
lv_coord_t dest_stride,
const lv_color_t * src_buf,
lv_coord_t src_stride,
lv_opa_t opa,
const lv_opa_t * mask,
lv_coord_t mask_stride);
static bool /* LV_ATTRIBUTE_FAST_MEM */ arm_2d_fill_normal(lv_color_t * dest_buf,
const lv_area_t * dest_area,
lv_coord_t dest_stride,
lv_color_t color,
lv_opa_t opa,
const lv_opa_t * mask,
lv_coord_t mask_stride);

static bool /* LV_ATTRIBUTE_FAST_MEM */ arm_2d_copy_normal(lv_color_t * dest_buf,
const lv_area_t * dest_area,
lv_coord_t dest_stride,
const lv_color_t * src_buf,
lv_coord_t src_stride,
lv_opa_t opa,
const lv_opa_t * mask,
lv_coord_t mask_stride);
#endif

LV_ATTRIBUTE_FAST_MEM
static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc);
LV_ATTRIBUTE_FAST_MEM
static void lv_gpu_arm2d_wait_cb(lv_draw_ctx_t * draw_ctx);
LV_ATTRIBUTE_FAST_MEM
static void lv_draw_arm2d_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
const lv_draw_img_dsc_t * draw_dsc,
const lv_area_t * coords,
const uint8_t * src_buf,
lv_img_cf_t cf);
static void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx,
const lv_draw_sw_blend_dsc_t * dsc);
static void /* LV_ATTRIBUTE_FAST_MEM */ lv_gpu_arm2d_wait_cb(lv_draw_ctx_t * draw_ctx);
static void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_arm2d_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
const lv_draw_img_dsc_t * draw_dsc,
const lv_area_t * coords,
const uint8_t * src_buf,
lv_img_cf_t cf);

/**********************
* STATIC VARIABLES
Expand Down Expand Up @@ -512,8 +506,8 @@ void lv_draw_arm2d_ctx_deinit(lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx)
extern void test_flush(lv_color_t * color_p);

#if __ARM_2D_HAS_HW_ACC__
LV_ATTRIBUTE_FAST_MEM
static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc)
static void LV_ATTRIBUTE_FAST_MEM lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx,
const lv_draw_sw_blend_dsc_t * dsc)
{
const lv_opa_t * mask;
if(dsc->mask_buf == NULL) mask = NULL;
Expand Down Expand Up @@ -560,12 +554,11 @@ static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend
}


LV_ATTRIBUTE_FAST_MEM
static bool lv_draw_arm2d_fill_colour(const arm_2d_tile_t * target_tile,
const arm_2d_region_t * region,
lv_color_t color,
lv_opa_t opa,
const arm_2d_tile_t * mask_tile)
static bool LV_ATTRIBUTE_FAST_MEM lv_draw_arm2d_fill_colour(const arm_2d_tile_t * target_tile,
const arm_2d_region_t * region,
lv_color_t color,
lv_opa_t opa,
const arm_2d_tile_t * mask_tile)
{
arm_fsm_rt_t result = (arm_fsm_rt_t)ARM_2D_ERR_NONE;

Expand Down Expand Up @@ -623,12 +616,11 @@ static bool lv_draw_arm2d_fill_colour(const arm_2d_tile_t * target_tile,

}

LV_ATTRIBUTE_FAST_MEM
static bool lv_draw_arm2d_tile_copy(const arm_2d_tile_t * target_tile,
const arm_2d_region_t * region,
arm_2d_tile_t * source_tile,
lv_opa_t opa,
arm_2d_tile_t * mask_tile)
static bool LV_ATTRIBUTE_FAST_MEM lv_draw_arm2d_tile_copy(const arm_2d_tile_t * target_tile,
const arm_2d_region_t * region,
arm_2d_tile_t * source_tile,
lv_opa_t opa,
arm_2d_tile_t * mask_tile)
{
arm_fsm_rt_t result = (arm_fsm_rt_t)ARM_2D_ERR_NONE;

Expand Down Expand Up @@ -691,8 +683,8 @@ static void lv_gpu_arm2d_wait_cb(lv_draw_ctx_t * draw_ctx)
#else


LV_ATTRIBUTE_FAST_MEM
static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc)
static void LV_ATTRIBUTE_FAST_MEM lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx,
const lv_draw_sw_blend_dsc_t * dsc)
{
const lv_opa_t * mask;
if(dsc->mask_buf == NULL) mask = NULL;
Expand Down Expand Up @@ -777,14 +769,13 @@ static void lv_draw_arm2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend
if(!is_accelerated) lv_draw_sw_blend_basic(draw_ctx, dsc);
}

LV_ATTRIBUTE_FAST_MEM
static bool arm_2d_fill_normal(lv_color_t * dest_buf,
const lv_area_t * dest_area,
lv_coord_t dest_stride,
lv_color_t color,
lv_opa_t opa,
const lv_opa_t * mask,
lv_coord_t mask_stride)
static bool LV_ATTRIBUTE_FAST_MEM arm_2d_fill_normal(lv_color_t * dest_buf,
const lv_area_t * dest_area,
lv_coord_t dest_stride,
lv_color_t color,
lv_opa_t opa,
const lv_opa_t * mask,
lv_coord_t mask_stride)
{
arm_2d_size_t target_size = {
.iWidth = lv_area_get_width(dest_area),
Expand Down Expand Up @@ -835,15 +826,14 @@ static bool arm_2d_fill_normal(lv_color_t * dest_buf,
}


LV_ATTRIBUTE_FAST_MEM
static bool arm_2d_copy_normal(lv_color_t * dest_buf,
const lv_area_t * dest_area,
lv_coord_t dest_stride,
const lv_color_t * src_buf,
lv_coord_t src_stride,
lv_opa_t opa,
const lv_opa_t * mask,
lv_coord_t mask_stride)
static bool LV_ATTRIBUTE_FAST_MEM arm_2d_copy_normal(lv_color_t * dest_buf,
const lv_area_t * dest_area,
lv_coord_t dest_stride,
const lv_color_t * src_buf,
lv_coord_t src_stride,
lv_opa_t opa,
const lv_opa_t * mask,
lv_coord_t mask_stride)

{
int32_t w = lv_area_get_width(dest_area);
Expand Down Expand Up @@ -908,12 +898,11 @@ static bool arm_2d_copy_normal(lv_color_t * dest_buf,
return true;
}

LV_ATTRIBUTE_FAST_MEM
static void lv_draw_arm2d_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
const lv_draw_img_dsc_t * draw_dsc,
const lv_area_t * coords,
const uint8_t * src_buf,
lv_img_cf_t cf)
static void LV_ATTRIBUTE_FAST_MEM lv_draw_arm2d_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
const lv_draw_img_dsc_t * draw_dsc,
const lv_area_t * coords,
const uint8_t * src_buf,
lv_img_cf_t cf)
{
/*Use the clip area as draw area*/
lv_area_t draw_area;
Expand Down
8 changes: 5 additions & 3 deletions lib/libesp32_lvgl/lvgl/src/draw/lv_draw_img.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
/**********************
* STATIC PROTOTYPES
**********************/
LV_ATTRIBUTE_FAST_MEM static lv_res_t decode_and_draw(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * draw_dsc,
const lv_area_t * coords, const void * src);
static lv_res_t /* LV_ATTRIBUTE_FAST_MEM */ decode_and_draw(lv_draw_ctx_t * draw_ctx,
const lv_draw_img_dsc_t * draw_dsc,
const lv_area_t * coords, const void * src);

static void show_error(lv_draw_ctx_t * draw_ctx, const lv_area_t * coords, const char * msg);
static void draw_cleanup(_lv_img_cache_entry_t * cache);
Expand Down Expand Up @@ -236,7 +237,8 @@ void lv_draw_img_decoded(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * dsc
* STATIC FUNCTIONS
**********************/

LV_ATTRIBUTE_FAST_MEM static lv_res_t decode_and_draw(lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * draw_dsc,
static lv_res_t LV_ATTRIBUTE_FAST_MEM decode_and_draw(lv_draw_ctx_t * draw_ctx,
const lv_draw_img_dsc_t * draw_dsc,
const lv_area_t * coords, const void * src)
{
if(draw_dsc->opa <= LV_OPA_MIN) return LV_RES_OK;
Expand Down
4 changes: 2 additions & 2 deletions lib/libesp32_lvgl/lvgl/src/draw/lv_draw_label.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static uint8_t hex_char_to_num(char hex);
* GLOBAL FUNCTIONS
**********************/

void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc)
void LV_ATTRIBUTE_FAST_MEM lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc)
{
lv_memset_00(dsc, sizeof(lv_draw_label_dsc_t));
dsc->opa = LV_OPA_COVER;
Expand All @@ -74,7 +74,7 @@ void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc)
* @param hint pointer to a `lv_draw_label_hint_t` variable.
* It is managed by the draw to speed up the drawing of very long texts (thousands of lines).
*/
LV_ATTRIBUTE_FAST_MEM void lv_draw_label(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
void LV_ATTRIBUTE_FAST_MEM lv_draw_label(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
const lv_area_t * coords, const char * txt, lv_draw_label_hint_t * hint)
{
if(dsc->opa <= LV_OPA_MIN) return;
Expand Down
6 changes: 3 additions & 3 deletions lib/libesp32_lvgl/lvgl/src/draw/lv_draw_label.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct _lv_draw_ctx_t;
* GLOBAL PROTOTYPES
**********************/

LV_ATTRIBUTE_FAST_MEM void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc);
void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc);

/**
* Write a text
Expand All @@ -79,8 +79,8 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc);
* @param hint pointer to a `lv_draw_label_hint_t` variable.
* It is managed by the draw to speed up the drawing of very long texts (thousands of lines).
*/
LV_ATTRIBUTE_FAST_MEM void lv_draw_label(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
const lv_area_t * coords, const char * txt, lv_draw_label_hint_t * hint);
void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_label(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc,
const lv_area_t * coords, const char * txt, lv_draw_label_hint_t * hint);

void lv_draw_letter(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc, const lv_point_t * pos_p,
uint32_t letter);
Expand Down
Loading

0 comments on commit 156f198

Please sign in to comment.