Skip to content

Commit 398f125

Browse files
committed
Added esp32_p4_Function_ev_board component
1 parent 64e9337 commit 398f125

File tree

20 files changed

+5865
-0
lines changed

20 files changed

+5865
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
if(CONFIG_IDF_TARGET_ESP32P4)
2+
set(SRCS "")
3+
list(APPEND SRCS
4+
"src/bsp_board_extra.c"
5+
"src/bsp_camera.c"
6+
"src/esp32_p4_function_ev_board.c")
7+
8+
set(INCLUDE_DIRS "")
9+
list(APPEND INCLUDE_DIRS "include")
10+
list(APPEND INCLUDE_DIRS "priv_include")
11+
12+
set(SRC_DIRS "")
13+
list(APPEND SRC_DIRS "src/sensor")
14+
15+
foreach(SRC_DIR IN LISTS SRC_DIRS)
16+
file(GLOB_RECURSE SRC ${SRC_DIR}/*.c)
17+
list(APPEND SRCS ${SRC})
18+
list(APPEND INCLUDE_DIRS ${SRC_DIR}/include)
19+
endforeach()
20+
else()
21+
message(STATUS "Skipping esp32p4_function_ev_board")
22+
endif()
23+
24+
idf_component_register(
25+
SRCS ${SRCS}
26+
INCLUDE_DIRS ${INCLUDE_DIRS}
27+
REQUIRES driver esp_driver_cam esp_lcd esp_driver_isp
28+
PRIV_REQUIRES esp_timer spiffs fatfs esp_psram esp_mm
29+
)
30+
31+
if(CONFIG_IDF_TARGET_ESP32P4)
32+
target_compile_options(
33+
${COMPONENT_LIB} PRIVATE
34+
-Wno-format
35+
-Wno-int-conversion
36+
-Wno-incompatible-pointer-types
37+
-Wunused-function
38+
-Wno-unused-variable
39+
-Wno-unused-function
40+
-Wno-overflow
41+
-Wno-unused-but-set-variable
42+
-Wno-discarded-qualifiers)
43+
endif()
Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
menu "Board Support Package"
2+
3+
config BSP_ERROR_CHECK
4+
bool "Enable error check in BSP"
5+
default y
6+
help
7+
Error check assert the application before returning the error code.
8+
9+
choice
10+
prompt "Choose Board Type"
11+
default BSP_BOARD_TYPE_SAMPLE_V10B
12+
config BSP_BOARD_TYPE_FLY_LINE
13+
bool "Fly Line"
14+
15+
config BSP_BOARD_TYPE_FIB
16+
bool "FIB"
17+
18+
config BSP_BOARD_TYPE_SAMPLE_V10B
19+
bool "ESP32-P4 Function_EV_Board V1.0B"
20+
21+
config BSP_BOARD_TYPE_SAMPLE_V12
22+
bool "ESP32-P4 Function_EV_Board V1.2"
23+
endchoice
24+
25+
menu "I2C"
26+
config BSP_I2C_NUM
27+
int "I2C peripheral index"
28+
default 1
29+
range 0 1
30+
help
31+
ESP32S3 has two I2C peripherals, pick the one you want to use.
32+
33+
config BSP_I2C_FAST_MODE
34+
bool "Enable I2C fast mode"
35+
default y
36+
help
37+
I2C has two speed modes: normal (100kHz) and fast (400kHz).
38+
39+
config BSP_I2C_CLK_SPEED_HZ
40+
int
41+
default 400000 if BSP_I2C_FAST_MODE
42+
default 100000
43+
endmenu
44+
45+
menu "SPIFFS - Virtual File System"
46+
config BSP_SPIFFS_FORMAT_ON_MOUNT_FAIL
47+
bool "Format SPIFFS if mounting fails"
48+
default n
49+
help
50+
Format SPIFFS if it fails to mount the filesystem.
51+
52+
config BSP_SPIFFS_MOUNT_POINT
53+
string "SPIFFS mount point"
54+
default "/spiffs"
55+
help
56+
Mount point of SPIFFS in the Virtual File System.
57+
58+
config BSP_SPIFFS_PARTITION_LABEL
59+
string "Partition label of SPIFFS"
60+
default "storage"
61+
help
62+
Partition label which stores SPIFFS.
63+
64+
config BSP_SPIFFS_MAX_FILES
65+
int "Max files supported for SPIFFS VFS"
66+
default 5
67+
help
68+
Supported max files for SPIFFS in the Virtual File System.
69+
endmenu
70+
71+
menu "SD card - Virtual File System"
72+
choice
73+
prompt "Choose Host"
74+
default BSP_SD_HOST_SPI
75+
config BSP_SD_HOST_SDMMC
76+
bool "SDMMC"
77+
config BSP_SD_HOST_SPI
78+
bool "SPI"
79+
endchoice
80+
81+
config BSP_SD_FORMAT_ON_MOUNT_FAIL
82+
bool "Format SD card if mounting fails"
83+
default n
84+
help
85+
The SDMMC host will format (FAT) the SD card if it fails to mount the filesystem.
86+
87+
config BSP_SD_MOUNT_POINT
88+
string "SD card mount point"
89+
default "/sdcard"
90+
help
91+
Mount point of the SD card in the Virtual File System
92+
endmenu
93+
94+
menu "LCD DSI"
95+
choice
96+
prompt "Choose LCD Controller"
97+
default BSP_LCD_CONTROLLER_ILI9881
98+
config BSP_LCD_CONTROLLER_ILI9881
99+
bool "ILI9881"
100+
101+
config BSP_LCD_CONTROLLER_EK79007
102+
bool "EK79007"
103+
endchoice
104+
105+
config BSP_LCD_DSI_USE_DMA2D
106+
bool "Use DMA2D for LCD DSI"
107+
default y
108+
endmenu
109+
110+
menu "Display"
111+
choice
112+
prompt "Choose LVGL Version"
113+
default BSP_DISPLAY_LVGL_VERSION_V9
114+
config BSP_DISPLAY_LVGL_VERSION_V8
115+
bool "v8"
116+
117+
config BSP_DISPLAY_LVGL_VERSION_V9
118+
bool "v9"
119+
endchoice
120+
121+
config EXAMPLE_LCD_RGB_BOUNCE_BUFFER_HEIGHT
122+
int "RGB Bounce buffer height"
123+
default 10
124+
help
125+
Height of bounce buffer. The width of the buffer is the same as that of the LCD.
126+
127+
config BSP_DISPLAY_LVGL_TASK_MAX_DELAY_MS
128+
int "LVGL timer task maximum delay (ms)"
129+
default 500
130+
range 2 2000 # Example range, adjust as needed
131+
help
132+
The maximum delay of the LVGL timer task, in milliseconds.
133+
134+
config BSP_DISPLAY_LVGL_TASK_MIN_DELAY_MS
135+
int "LVGL timer task minimum delay (ms)"
136+
default 10
137+
range 1 100 # Example range, adjust as needed
138+
help
139+
The minimum delay of the LVGL timer task, in milliseconds.
140+
141+
config BSP_DISPLAY_LVGL_TASK_PRIORITY
142+
int "LVGL task priority"
143+
default 2
144+
help
145+
The Board Support Package will create a task that will periodically handle LVGL operation in lv_timer_handler().
146+
147+
config BSP_DISPLAY_LVGL_TASK_STACK_SIZE_KB
148+
int "LVGL task stack size (KB)"
149+
default 6
150+
help
151+
Size(KB) of LVGL task stack.
152+
153+
config BSP_DISPLAY_LVGL_TASK_CORE
154+
int "LVGL timer task core"
155+
default -1
156+
range -1 1
157+
help
158+
The core of the LVGL timer task.
159+
Set to -1 to not specify the core.
160+
Set to 1 only if the SoCs support dual-core, otherwise set to -1 or 0.
161+
162+
config BSP_DISPLAY_LVGL_TICK
163+
int "LVGL tick period"
164+
default 2
165+
range 1 100
166+
help
167+
Period of LVGL tick timer.
168+
169+
config BSP_DISPLAY_LVGL_AVOID_TEAR_ENABLE
170+
bool "Avoid tearing effect"
171+
default "n"
172+
help
173+
Avoid tearing effect through LVGL buffer mode and double frame buffers of RGB LCD. This feature is only available for RGB LCD.
174+
175+
choice
176+
depends on BSP_DISPLAY_LVGL_AVOID_TEAR_ENABLE
177+
prompt "Select Avoid Tearing Mode"
178+
default BSP_DISPLAY_LVGL_AVOID_TEAR_ENABLE_MODE_3
179+
config BSP_DISPLAY_LVGL_AVOID_TEAR_ENABLE_MODE_1
180+
bool "Mode1: LCD double-buffer & LVGL full-refresh"
181+
config BSP_DISPLAY_LVGL_AVOID_TEAR_ENABLE_MODE_2
182+
bool "Mode2: LCD triple-buffer & LVGL full-refresh"
183+
config BSP_DISPLAY_LVGL_AVOID_TEAR_ENABLE_MODE_3
184+
bool "Mode3: LCD double-buffer & LVGL direct-mode"
185+
help
186+
The current tearing prevention mode supports both full refresh mode and direct mode. Tearing prevention mode may consume more PSRAM space
187+
endchoice
188+
189+
config BSP_DISPLAY_LVGL_AVOID_TEAR_ENABLE_MODE
190+
depends on BSP_DISPLAY_LVGL_AVOID_TEAR_ENABLE
191+
int
192+
default 0 if BSP_DISPLAY_LVGL_AVOID_TEAR_ENABLE_MODE_1
193+
default 1 if BSP_DISPLAY_LVGL_AVOID_TEAR_ENABLE_MODE_2
194+
default 2 if BSP_DISPLAY_LVGL_AVOID_TEAR_ENABLE_MODE_3
195+
196+
choice
197+
depends on !BSP_DISPLAY_LVGL_AVOID_TEAR_ENABLE
198+
prompt "Select LVGL buffer memory capability"
199+
default BSP_DISPLAY_LVGL_BUF_PSRAM
200+
config BSP_DISPLAY_LVGL_BUF_PSRAM
201+
bool "PSRAM memory"
202+
config BSP_DISPLAY_LVGL_BUF_INTERNAL
203+
bool "Internal memory"
204+
endchoice
205+
206+
config BSP_DISPLAY_LVGL_BUF_HEIGHT
207+
depends on !BSP_DISPLAY_LVGL_AVOID_TEAR_ENABLE
208+
int "LVGL buffer height"
209+
default 1280
210+
help
211+
Height of LVGL buffer. The width of the buffer is the same as that of the LCD.
212+
213+
config LVGL_PORT_USE_GPU
214+
depends on BSP_LCD_DSI_USE_DMA2D && BSP_DISPLAY_LVGL_VERSION_V8
215+
bool "Use GPU"
216+
default y
217+
endmenu
218+
219+
config BSP_I2S_NUM
220+
int "I2S peripheral index"
221+
default 1
222+
range 0 1
223+
help
224+
ESP32S3 has two I2S peripherals, pick the one you want to use.
225+
endmenu

0 commit comments

Comments
 (0)