Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion .github/ci/bsp_noglib.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def remove_esp_lvgl_port(bsp_path):
del deps["espressif/esp_lvgl_port"]
except KeyError:
print("{}: could not remove esp_lvgl_port".format(str(bsp_path)))
return 1
try:
del deps["lvgl/lvgl"]
except KeyError:
Expand Down
17 changes: 9 additions & 8 deletions .github/ci/update_readme_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,15 @@ def get_capabilities_table(header_path, bsp_path, bsp_name, manifest):
if component_versions is not None:
components = [c for c, _ in component_versions]
versions = [v for _, v in component_versions]
table_data.append(
{
"Available": ":heavy_check_mark:",
"Capability": ":black_circle: " + 'LVGL_PORT',
"Controller/Codec": "",
"Component": "<br/>".join(components),
"Version": "<br/>".join(versions),
})
if versions:
table_data.append(
{
"Available": ":heavy_check_mark:",
"Capability": ":black_circle: " + 'LVGL_PORT',
"Controller/Codec": "",
"Component": "<br/>".join(components),
"Version": "<br/>".join(versions),
})
return table_data


Expand Down
140 changes: 0 additions & 140 deletions bsp/m5stack_tab5/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,6 @@ Below are some of the most relevant predefined constants:

| Type | Name |
| ---: | :--- |
| struct | [**bsp\_display\_cfg\_t**](#struct-bsp_display_cfg_t) <br>_BSP display (LVGL) configuration structure._ |
| struct | [**bsp\_display\_config\_t**](#struct-bsp_display_config_t) <br>_BSP display low level configuration structure._ |
| struct | [**bsp\_lcd\_handles\_t**](#struct-bsp_lcd_handles_t) <br>_BSP display return handles._ |
| struct | [**bsp\_touch\_config\_t**](#struct-bsp_touch_config_t) <br>_BSP touch configuration structure._ |
Expand All @@ -899,14 +898,8 @@ Below are some of the most relevant predefined constants:
| void | [**bsp\_display\_delete**](#function-bsp_display_delete) (void) <br>_Delete display panel._ |
| esp\_err\_t | [**bsp\_display\_enter\_sleep**](#function-bsp_display_enter_sleep) (void) <br>_Set display enter sleep mode._ |
| esp\_err\_t | [**bsp\_display\_exit\_sleep**](#function-bsp_display_exit_sleep) (void) <br>_Set display exit sleep mode._ |
| lv\_indev\_t \* | [**bsp\_display\_get\_input\_dev**](#function-bsp_display_get_input_dev) (void) <br>_Get pointer to input device (touch, buttons, ...)_ |
| bool | [**bsp\_display\_lock**](#function-bsp_display_lock) (uint32\_t timeout\_ms) <br>_Take LVGL mutex._ |
| esp\_err\_t | [**bsp\_display\_new**](#function-bsp_display_new) (const [**bsp\_display\_config\_t**](#struct-bsp_display_config_t) \*config, esp\_lcd\_panel\_handle\_t \*ret\_panel, esp\_lcd\_panel\_io\_handle\_t \*ret\_io) <br>_Create new display panel._ |
| esp\_err\_t | [**bsp\_display\_new\_with\_handles**](#function-bsp_display_new_with_handles) (const [**bsp\_display\_config\_t**](#struct-bsp_display_config_t) \*config, [**bsp\_lcd\_handles\_t**](#struct-bsp_lcd_handles_t) \*ret\_handles) <br>_Create new display panel._ |
| void | [**bsp\_display\_rotate**](#function-bsp_display_rotate) (lv\_display\_t \*disp, lv\_disp\_rotation\_t rotation) <br>_Rotate screen._ |
| lv\_display\_t \* | [**bsp\_display\_start**](#function-bsp_display_start) (void) <br>_Initialize display._ |
| lv\_display\_t \* | [**bsp\_display\_start\_with\_config**](#function-bsp_display_start_with_config) (const [**bsp\_display\_cfg\_t**](#struct-bsp_display_cfg_t) \*cfg) <br>_Initialize display._ |
| void | [**bsp\_display\_unlock**](#function-bsp_display_unlock) (void) <br>_Give LVGL mutex._ |
| esp\_err\_t | [**bsp\_touch\_new**](#function-bsp_touch_new) (const [**bsp\_touch\_config\_t**](#struct-bsp_touch_config_t) \*config, esp\_lcd\_touch\_handle\_t \*ret\_touch) <br>_Create new touchscreen._ |

## Macros
Expand Down Expand Up @@ -934,26 +927,6 @@ Below are some of the most relevant predefined constants:

## Structures and Types Documentation

### struct `bsp_display_cfg_t`

_BSP display (LVGL) configuration structure._

Variables:

- unsigned int buff_dma <br>Allocated LVGL buffer will be DMA capable

- unsigned int buff_spiram <br>Allocated LVGL buffer will be in PSRAM

- uint32\_t buffer_size <br>Size of the buffer for the screen in pixels

- bool double_buffer <br>True, if should be allocated two buffers

- struct [**bsp\_display\_cfg\_t**](#struct-bsp_display_cfg_t) flags

- lvgl\_port\_cfg\_t lvgl_port_cfg <br>LVGL port configuration

- unsigned int sw_rotate <br>Use software rotation (slower), The feature is unavailable under avoid-tear mode

### struct `bsp_display_config_t`

_BSP display low level configuration structure._
Expand Down Expand Up @@ -1147,50 +1120,6 @@ All the display (LCD, backlight, touch) will exit sleep mode.

* ESP\_OK on success
* ESP\_ERR\_NOT\_SUPPORTED if this function is not supported by the panel
### function `bsp_display_get_input_dev`

_Get pointer to input device (touch, buttons, ...)_
```c
lv_indev_t * bsp_display_get_input_dev (
void
)
```


**Note:**

The LVGL input device is initialized in [**bsp\_display\_start()**](#function-bsp_display_start) function.



**Returns:**

Pointer to LVGL input device or NULL when not initialized
### function `bsp_display_lock`

_Take LVGL mutex._
```c
bool bsp_display_lock (
uint32_t timeout_ms
)
```


**Parameters:**


* `timeout_ms` Timeout in [ms]. 0 will block indefinitely.


**Returns:**

true Mutex was taken



**Returns:**

false Mutex was NOT taken
### function `bsp_display_new`

_Create new display panel._
Expand Down Expand Up @@ -1269,75 +1198,6 @@ bsp_display_delete();

* ESP\_OK On success
* Other errors from underlying esp\_lcd driver
### function `bsp_display_rotate`

_Rotate screen._
```c
void bsp_display_rotate (
lv_display_t *disp,
lv_disp_rotation_t rotation
)
```


Display must be already initialized by calling [**bsp\_display\_start()**](#function-bsp_display_start)



**Parameters:**


* `disp` Pointer to LVGL display
* `rotation` Angle of the display rotation
### function `bsp_display_start`

_Initialize display._
```c
lv_display_t * bsp_display_start (
void
)
```


This function initializes SPI, display controller and starts LVGL handling task. LCD backlight must be enabled separately by calling [**bsp\_display\_brightness\_set()**](#function-bsp_display_brightness_set)



**Returns:**

Pointer to LVGL display or NULL when error occurred
### function `bsp_display_start_with_config`

_Initialize display._
```c
lv_display_t * bsp_display_start_with_config (
const bsp_display_cfg_t *cfg
)
```


This function initializes SPI, display controller and starts LVGL handling task. LCD backlight must be enabled separately by calling [**bsp\_display\_brightness\_set()**](#function-bsp_display_brightness_set)



**Parameters:**


* `cfg` display configuration


**Returns:**

Pointer to LVGL display or NULL when error occurred
### function `bsp_display_unlock`

_Give LVGL mutex._
```c
void bsp_display_unlock (
void
)
```

### function `bsp_touch_new`

_Create new touchscreen._
Expand Down
3 changes: 3 additions & 0 deletions bsp/m5stack_tab5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ idf_component_register(
REQUIRES ${REQ}
PRIV_REQUIRES esp_psram ${PRIV_REQ}
)

# BSP Name Alias
add_library(esp_bsp::core ALIAS ${COMPONENT_LIB})
35 changes: 19 additions & 16 deletions bsp/m5stack_tab5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,30 @@ Tab5 is suitable for smart home control, remote monitoring, industrial automatio

![image](doc/C145_01.webp)

## Graphics

This BSP includes only the low-level drivers and initialization for the LCD display and touch controller, and does not bundle any graphical library. For integration with LVGL or other graphics frameworks, see [Graphical Components](../components/bsp_graphics/).

## Capabilities and dependencies

<div align="center">
<!-- START_DEPENDENCIES -->

| Available | Capability |Controller/Codec| Component | Version |
|------------------|------------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|
|:heavy_check_mark:| :pager: DISPLAY |ili9881c, st7123| idf<br/>[espressif/esp_lcd_st7123](https://components.espressif.com/components/espressif/esp_lcd_st7123)<br/>[espressif/esp_lcd_ili9881c](https://components.espressif.com/components/espressif/esp_lcd_ili9881c) |>=5.4<br/>*<br/>*|
|:heavy_check_mark:|:black_circle: LVGL_PORT| | [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^2 |
|:heavy_check_mark:| :point_up: TOUCH | gt911, st7123 |[espressif/esp_lcd_touch_st7123](https://components.espressif.com/components/espressif/esp_lcd_touch_st7123)<br/>[espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911)| *<br/>* |
| :x: | :radio_button: BUTTONS | | | |
| :x: | :white_circle: KNOB | | | |
|:heavy_check_mark:| :musical_note: AUDIO | | [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ~1.5 |
|:heavy_check_mark:| :speaker: AUDIO_SPEAKER| es8388 | | |
|:heavy_check_mark:| :microphone: AUDIO_MIC | es7210 | | |
|:heavy_check_mark:| :floppy_disk: SDCARD | | idf | >=5.4 |
| :x: | :bulb: LED | | | |
|:heavy_check_mark:| :camera: CAMERA | SC202CS | [espressif/esp_video](https://components.espressif.com/components/espressif/esp_video) | ~2.0 |
| :x: | :battery: BAT | | | |
|:heavy_check_mark:| :video_game: IMU | | | |
| :x: | :thermometer: HUMITURE | | | |
| Available | Capability |Controller/Codec| Component | Version |
|------------------|-----------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|
|:heavy_check_mark:| :pager: DISPLAY |ili9881c, st7123| idf<br/>[espressif/esp_lcd_st7123](https://components.espressif.com/components/espressif/esp_lcd_st7123)<br/>[espressif/esp_lcd_ili9881c](https://components.espressif.com/components/espressif/esp_lcd_ili9881c) |>=5.4<br/>*<br/>*|
|:heavy_check_mark:| :point_up: TOUCH | gt911, st7123 |[espressif/esp_lcd_touch_st7123](https://components.espressif.com/components/espressif/esp_lcd_touch_st7123)<br/>[espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911)| *<br/>* |
| :x: | :radio_button: BUTTONS| | | |
| :x: | :white_circle: KNOB | | | |
|:heavy_check_mark:| :musical_note: AUDIO | | [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | ~1.5 |
|:heavy_check_mark:|:speaker: AUDIO_SPEAKER| es8388 | | |
|:heavy_check_mark:| :microphone: AUDIO_MIC| es7210 | | |
|:heavy_check_mark:| :floppy_disk: SDCARD | | idf | >=5.4 |
| :x: | :bulb: LED | | | |
|:heavy_check_mark:| :camera: CAMERA | SC202CS | [espressif/esp_video](https://components.espressif.com/components/espressif/esp_video) | ~2.0 |
| :x: | :battery: BAT | | | |
|:heavy_check_mark:| :video_game: IMU | | | |
| :x: | :thermometer: HUMITURE| | | |

<!-- END_DEPENDENCIES -->
</div>
Expand Down
11 changes: 3 additions & 8 deletions bsp/m5stack_tab5/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

version: "1.2.0~1"
version: "2.0.0"
description: Board Support Package (BSP) for M5Stack Tab5
url: https://github.com/espressif/esp-bsp/tree/master/bsp/m5stack_tab5

Expand Down Expand Up @@ -27,11 +27,6 @@ dependencies:
public: true
override_path: "../../components/io_expander/esp_io_expander_pi4ioe5v6408"

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

espressif/esp_lcd_st7123:
version: "*"
public: false
Expand All @@ -43,11 +38,11 @@ dependencies:

espressif/esp_lcd_touch_st7123:
version: "*"
public: false
public: true

espressif/esp_lcd_touch_gt911:
version: "*"
public: false
public: true
# Here cannot be override_path, because we are using two touch comonents.
# The ST7123 is not owned by BSP and loading another version of esp_lcd_touch

Expand Down
22 changes: 22 additions & 0 deletions bsp/m5stack_tab5/include/bsp/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,28 @@ esp_err_t bsp_display_backlight_on(void);
*/
esp_err_t bsp_display_backlight_off(void);

/**
* @brief Set display enter sleep mode
*
* All the display (LCD, backlight, touch) will enter sleep mode.
*
* @return
* - ESP_OK on success
* - ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel
*/
esp_err_t bsp_display_enter_sleep(void);

/**
* @brief Set display exit sleep mode
*
* All the display (LCD, backlight, touch) will exit sleep mode.
*
* @return
* - ESP_OK on success
* - ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel
*/
esp_err_t bsp_display_exit_sleep(void);

#ifdef __cplusplus
}
#endif
Expand Down
Loading
Loading