Skip to content

Commit 19250c9

Browse files
committed
lv_port: Add RGB interface for lv_port
1 parent a966ec3 commit 19250c9

File tree

8 files changed

+289
-317
lines changed

8 files changed

+289
-317
lines changed

bsp/esp32_s3_lcd_ev_board/idf_component.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,9 @@ dependencies:
4444
version: ">=2.5,<4.0"
4545
public: true
4646

47+
esp_lvgl_port:
48+
version: "^1"
49+
public: true
50+
4751
examples:
4852
- path: ../../examples/display_lvgl_demos

bsp/esp32_s3_lcd_ev_board/include/bsp/esp32_s3_lcd_ev_board.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "esp_lcd_gc9503.h"
2222
#include "iot_button.h"
2323
#include "lvgl.h"
24+
#include "esp_lvgl_port.h"
2425

2526
#include "sdkconfig.h"
2627

@@ -96,7 +97,7 @@ extern "C" {
9697
*
9798
*/
9899
typedef struct {
99-
void *dummy; /*!< Prepared for future use. */
100+
lvgl_port_cfg_t lvgl_port_cfg;
100101
} bsp_display_cfg_t;
101102

102103
/**************************************************************************************************

bsp/esp32_s3_lcd_ev_board/priv_include/bsp_lvgl_port.h

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -17,37 +17,7 @@
1717
extern "C" {
1818
#endif
1919

20-
/**
21-
* @brief Initialize LVGL port
22-
*
23-
* @param[in] lcd: LCD panel handle
24-
* @param[in] tp: Touch handle
25-
* @param[out] disp: LVGL display device
26-
* @param[out] indev: LVGL input device
27-
*
28-
* @return
29-
* - ESP_OK: Success
30-
* - ESP_ERR_INVALID_ARG: Invalid argument
31-
* - Others: Fail
32-
*/
33-
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);
34-
35-
/**
36-
* @brief Take LVGL mutex
37-
*
38-
* @param[in] timeout_ms: Timeout in [ms]. 0 will block indefinitely.
39-
*
40-
* @return
41-
* - true: Mutex was taken
42-
* - false: Mutex was NOT taken
43-
*/
44-
bool bsp_lvgl_port_lock(uint32_t timeout_ms);
45-
46-
/**
47-
* @brief Give LVGL mutex
48-
*
49-
*/
50-
void bsp_lvgl_port_unlock(void);
20+
lv_disp_t *bsp_display_lcd_init();
5121

5222
#ifdef __cplusplus
5323
}

0 commit comments

Comments
 (0)