Skip to content

Commit 29bebaf

Browse files
authored
Merge pull request #401 from Horion0415/feat/add_p4_avoid_tear
feat(p4): Added avoid-tear feature and audio-related code. (BSP-560)
2 parents 9e3665f + 44efecb commit 29bebaf

File tree

11 files changed

+464
-125
lines changed

11 files changed

+464
-125
lines changed

bsp/esp32_p4_function_ev_board/Kconfig

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ menu "Board Support Package(ESP32-P4)"
2626
default 100000
2727
endmenu
2828

29+
menu "I2S"
30+
config BSP_I2S_NUM
31+
int "I2S peripheral index"
32+
default 1
33+
range 0 2
34+
help
35+
ESP32P4 has three I2S peripherals, pick the one you want to use.
36+
endmenu
37+
2938
menu "uSD card - Virtual File System"
3039
config BSP_SD_FORMAT_ON_MOUNT_FAIL
3140
bool "Format uSD card if mounting fails"
@@ -68,14 +77,38 @@ menu "Board Support Package(ESP32-P4)"
6877
endmenu
6978

7079
menu "Display"
80+
config BSP_LCD_DPI_BUFFER_NUMS
81+
int "Set number of frame buffers"
82+
default 1
83+
range 1 3
84+
help
85+
Let DPI LCD driver create a specified number of frame-size buffers. Only when it is set to multiple can the avoiding tearing be turned on.
86+
87+
config BSP_DISPLAY_LVGL_AVOID_TEAR
88+
bool "Avoid tearing effect"
89+
depends on BSP_LCD_DPI_BUFFER_NUMS > 1
90+
default "n"
91+
help
92+
Avoid tearing effect through LVGL buffer mode and double frame buffers of RGB LCD. This feature is only available for RGB LCD.
93+
94+
choice BSP_DISPLAY_LVGL_MODE
95+
depends on BSP_DISPLAY_LVGL_AVOID_TEAR
96+
prompt "Select LVGL buffer mode"
97+
default BSP_DISPLAY_LVGL_FULL_REFRESH
98+
config BSP_DISPLAY_LVGL_FULL_REFRESH
99+
bool "Full refresh"
100+
config BSP_DISPLAY_LVGL_DIRECT_MODE
101+
bool "Direct mode"
102+
endchoice
103+
71104
config BSP_DISPLAY_BRIGHTNESS_LEDC_CH
72105
int "LEDC channel index"
73106
default 1
74107
range 0 7
75108
help
76109
LEDC channel is used to generate PWM signal that controls display brightness.
77110
Set LEDC index that should be used.
78-
111+
79112
choice BSP_LCD_COLOR_FORMAT
80113
prompt "Select LCD color format"
81114
default BSP_LCD_COLOR_FORMAT_RGB565

bsp/esp32_p4_function_ev_board/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ Selection color format `Board Support Package(ESP32-P4) --> Display --> Select L
2525

2626
<!-- Autogenerated start: Dependencies -->
2727
### Capabilities and dependencies
28-
| Capability | Available | Component | Version |
29-
|-------------|------------------|----------------------------------------------------------------------------------------------------------|--------------|
30-
| DISPLAY |:heavy_check_mark:| [espressif/esp_lcd_ek79007](https://components.espressif.com/components/espressif/esp_lcd_ek79007) |>=0.1.0,<1.0.0|
31-
| LVGL_PORT |:heavy_check_mark:| [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^2 |
32-
| TOUCH |:heavy_check_mark:|[espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911)| ^1 |
33-
| BUTTONS | :x: | | |
34-
| AUDIO | :x: | | |
35-
|AUDIO_SPEAKER| :x: | | |
36-
| AUDIO_MIC | :x: | | |
37-
| SDCARD |:heavy_check_mark:| idf | >=5.3 |
38-
| IMU | :x: | | |
28+
| Capability | Available | Component |Version|
29+
|-------------|------------------|----------------------------------------------------------------------------------------------------------|-------|
30+
| DISPLAY |:heavy_check_mark:| [espressif/esp_lcd_ek79007](https://components.espressif.com/components/espressif/esp_lcd_ek79007) | 1.* |
31+
| LVGL_PORT |:heavy_check_mark:| [espressif/esp_lvgl_port](https://components.espressif.com/components/espressif/esp_lvgl_port) | ^2 |
32+
| TOUCH |:heavy_check_mark:|[espressif/esp_lcd_touch_gt911](https://components.espressif.com/components/espressif/esp_lcd_touch_gt911)| ^1 |
33+
| BUTTONS | :x: | | |
34+
| AUDIO |:heavy_check_mark:| [espressif/esp_codec_dev](https://components.espressif.com/components/espressif/esp_codec_dev) | 1.2.* |
35+
|AUDIO_SPEAKER|:heavy_check_mark:| | |
36+
| AUDIO_MIC |:heavy_check_mark:| | |
37+
| SDCARD |:heavy_check_mark:| idf | >=5.3 |
38+
| IMU | :x: | | |
3939
<!-- Autogenerated end: Dependencies -->

0 commit comments

Comments
 (0)