Skip to content
Closed
7 changes: 6 additions & 1 deletion bsp/esp32_s3_lcd_ev_board/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "2.1.0"
version: "3.0.0"
description: Board Support Package for ESP32-S3-LCD-EV-Board
url: https://github.com/espressif/esp-bsp/tree/master/bsp/esp32_s3_lcd_ev_board

Expand Down Expand Up @@ -44,5 +44,10 @@ dependencies:
version: ">=2.5,<4.0"
public: true

esp_lvgl_port:
version: "^2"
override_path: '../../components/esp_lvgl_port'
public: true

examples:
- path: ../../examples/display_lvgl_demos
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "esp_lcd_gc9503.h"
#include "iot_button.h"
#include "lvgl.h"
#include "esp_lvgl_port.h"

#include "sdkconfig.h"

Expand Down Expand Up @@ -96,7 +97,7 @@ extern "C" {
*
*/
typedef struct {
void *dummy; /*!< Prepared for future use. */
lvgl_port_cfg_t lvgl_port_cfg;
} bsp_display_cfg_t;

/**************************************************************************************************
Expand Down
33 changes: 5 additions & 28 deletions bsp/esp32_s3_lcd_ev_board/priv_include/bsp_lvgl_port.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -18,36 +18,13 @@ extern "C" {
#endif

/**
* @brief Initialize LVGL port
* @brief Initialize LCD panel and LVGL portation
*
* @param[in] lcd: LCD panel handle
* @param[in] tp: Touch handle
* @param[out] disp: LVGL display device
* @param[out] indev: LVGL input device
* @note This function initialize RGB LCD panel and add add disp to LVGL.
*
* @return
* - ESP_OK: Success
* - ESP_ERR_INVALID_ARG: Invalid argument
* - Others: Fail
* @return Pointer to LVGL display or NULL when error occured
*/
esp_err_t bsp_lvgl_port_init(esp_lcd_panel_handle_t lcd, esp_lcd_touch_handle_t tp, lv_disp_t **disp, lv_indev_t **indev);

/**
* @brief Take LVGL mutex
*
* @param[in] timeout_ms: Timeout in [ms]. 0 will block indefinitely.
*
* @return
* - true: Mutex was taken
* - false: Mutex was NOT taken
*/
bool bsp_lvgl_port_lock(uint32_t timeout_ms);

/**
* @brief Give LVGL mutex
*
*/
void bsp_lvgl_port_unlock(void);
lv_disp_t *bsp_display_lcd_init();

#ifdef __cplusplus
}
Expand Down
Loading