Update esp_lvgl_port (#230)
Updated to espressif/esp-bsp@531ad57 https://github.com/espressif/esp-bsp/commit/531ad57f6abe178d6b43d898fac495c59747803f
This commit is contained in:
committed by
GitHub
parent
ee88a563dc
commit
44b366b557
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -31,9 +31,9 @@ extern "C" {
|
||||
* @brief LVGL Port task event type
|
||||
*/
|
||||
typedef enum {
|
||||
LVGL_PORT_EVENT_DISPLAY = 1,
|
||||
LVGL_PORT_EVENT_TOUCH = 2,
|
||||
LVGL_PORT_EVENT_USER = 99,
|
||||
LVGL_PORT_EVENT_DISPLAY = 0x01,
|
||||
LVGL_PORT_EVENT_TOUCH = 0x02,
|
||||
LVGL_PORT_EVENT_USER = 0x80,
|
||||
} lvgl_port_event_type_t;
|
||||
|
||||
/**
|
||||
@@ -144,7 +144,7 @@ esp_err_t lvgl_port_resume(void);
|
||||
* @note It is called from LVGL events and touch interrupts
|
||||
*
|
||||
* @param event event type
|
||||
* @param param user param
|
||||
* @param param parameter is not used, keep for backwards compatibility
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_NOT_SUPPORTED if it is not implemented
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -32,10 +32,16 @@ extern "C" {
|
||||
* @brief Configuration of the navigation buttons structure
|
||||
*/
|
||||
typedef struct {
|
||||
lv_display_t *disp; /*!< LVGL display handle (returned from lvgl_port_add_disp) */
|
||||
lv_display_t *disp; /*!< LVGL display handle (returned from lvgl_port_add_disp) */
|
||||
#if BUTTON_VER_MAJOR < 4
|
||||
const button_config_t *button_prev; /*!< Navigation button for previous */
|
||||
const button_config_t *button_next; /*!< Navigation button for next */
|
||||
const button_config_t *button_enter; /*!< Navigation button for enter */
|
||||
#else
|
||||
button_handle_t button_prev; /*!< Handle for navigation button for previous */
|
||||
button_handle_t button_next; /*!< Handle for navigation button for next */
|
||||
button_handle_t button_enter; /*!< Handle for navigation button for enter */
|
||||
#endif
|
||||
} lvgl_port_nav_btns_cfg_t;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -36,9 +36,13 @@ extern "C" {
|
||||
* @brief Configuration of the encoder structure
|
||||
*/
|
||||
typedef struct {
|
||||
lv_display_t *disp; /*!< LVGL display handle (returned from lvgl_port_add_disp) */
|
||||
const knob_config_t *encoder_a_b;
|
||||
lv_display_t *disp; /*!< LVGL display handle (returned from lvgl_port_add_disp) */
|
||||
const knob_config_t *encoder_a_b; /*!< Encoder knob configuration */
|
||||
#if BUTTON_VER_MAJOR < 4
|
||||
const button_config_t *encoder_enter; /*!< Navigation button for enter */
|
||||
#else
|
||||
button_handle_t encoder_enter; /*!< Handle for enter button */
|
||||
#endif
|
||||
} lvgl_port_encoder_cfg_t;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -32,6 +32,15 @@ extern "C" {
|
||||
_lv_color_blend_to_rgb565_esp(dsc)
|
||||
#endif
|
||||
|
||||
#ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB888
|
||||
#define LV_DRAW_SW_COLOR_BLEND_TO_RGB888(dsc, dest_px_size) \
|
||||
_lv_color_blend_to_rgb888_esp(dsc, dest_px_size)
|
||||
#endif
|
||||
|
||||
#ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565
|
||||
#define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565(dsc) \
|
||||
_lv_rgb565_blend_normal_to_rgb565_esp(dsc)
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@@ -83,6 +92,40 @@ static inline lv_result_t _lv_color_blend_to_rgb565_esp(_lv_draw_sw_blend_fill_d
|
||||
return lv_color_blend_to_rgb565_esp(&asm_dsc);
|
||||
}
|
||||
|
||||
extern int lv_color_blend_to_rgb888_esp(asm_dsc_t *asm_dsc);
|
||||
|
||||
static inline lv_result_t _lv_color_blend_to_rgb888_esp(_lv_draw_sw_blend_fill_dsc_t *dsc, uint32_t dest_px_size)
|
||||
{
|
||||
if (dest_px_size != 3) {
|
||||
return LV_RESULT_INVALID;
|
||||
}
|
||||
asm_dsc_t asm_dsc = {
|
||||
.dst_buf = dsc->dest_buf,
|
||||
.dst_w = dsc->dest_w,
|
||||
.dst_h = dsc->dest_h,
|
||||
.dst_stride = dsc->dest_stride,
|
||||
.src_buf = &dsc->color,
|
||||
};
|
||||
|
||||
return lv_color_blend_to_rgb888_esp(&asm_dsc);
|
||||
}
|
||||
|
||||
extern int lv_rgb565_blend_normal_to_rgb565_esp(asm_dsc_t *asm_dsc);
|
||||
|
||||
static inline lv_result_t _lv_rgb565_blend_normal_to_rgb565_esp(_lv_draw_sw_blend_image_dsc_t *dsc)
|
||||
{
|
||||
asm_dsc_t asm_dsc = {
|
||||
.dst_buf = dsc->dest_buf,
|
||||
.dst_w = dsc->dest_w,
|
||||
.dst_h = dsc->dest_h,
|
||||
.dst_stride = dsc->dest_stride,
|
||||
.src_buf = dsc->src_buf,
|
||||
.src_stride = dsc->src_stride
|
||||
};
|
||||
|
||||
return lv_rgb565_blend_normal_to_rgb565_esp(&asm_dsc);
|
||||
}
|
||||
|
||||
#endif // CONFIG_LV_DRAW_SW_ASM_CUSTOM
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user