Skip to content

Commit 3df64f5

Browse files
committed
Merge branch 'feature/update_kconfig' into 'master'
Update kconfig Closes AEG-2480 See merge request espressif/esp-video-components!292
2 parents 7f14dda + dd59894 commit 3df64f5

File tree

40 files changed

+2602
-1077
lines changed

40 files changed

+2602
-1077
lines changed

esp_cam_sensor/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
## Unreleased
22

33
- Added support for BF3901 SPI camera sensor driver.
4-
- Added camera SPI interface driver
4+
- Added camera SPI interface driver.
5+
- Enhanced the clarity and readability of prompt and help descriptions in Kconfig files.
56

67
## 1.1.0
78

esp_cam_sensor/Kconfig

Lines changed: 90 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,128 @@
11
menu "Espressif Camera Sensors Configurations"
22
menu "Camera Sensor Configuration"
3-
rsource "sensors/bf3901/Kconfig.bf3901"
4-
rsource "sensors/bf3925/Kconfig.bf3925"
5-
rsource "sensors/bf3a03/Kconfig.bf3a03"
6-
rsource "sensors/gc0308/Kconfig.gc0308"
7-
rsource "sensors/gc2145/Kconfig.gc2145"
8-
rsource "sensors/ov2640/Kconfig.ov2640"
9-
rsource "sensors/ov2710/Kconfig.ov2710"
10-
rsource "sensors/ov5640/Kconfig.ov5640"
11-
rsource "sensors/ov5645/Kconfig.ov5645"
12-
rsource "sensors/ov5647/Kconfig.ov5647"
13-
rsource "sensors/sc030iot/Kconfig.sc030iot"
14-
rsource "sensors/sc035hgs/Kconfig.sc035hgs"
15-
rsource "sensors/sc101iot/Kconfig.sc101iot"
16-
rsource "sensors/sc202cs/Kconfig.sc202cs"
17-
rsource "sensors/sc2336/Kconfig.sc2336"
3+
menu "Select and Set Camera Sensor"
4+
rsource "sensors/bf3901/Kconfig.bf3901"
5+
rsource "sensors/bf3925/Kconfig.bf3925"
6+
rsource "sensors/bf3a03/Kconfig.bf3a03"
7+
rsource "sensors/gc0308/Kconfig.gc0308"
8+
rsource "sensors/gc2145/Kconfig.gc2145"
9+
rsource "sensors/ov2640/Kconfig.ov2640"
10+
rsource "sensors/ov2710/Kconfig.ov2710"
11+
rsource "sensors/ov5640/Kconfig.ov5640"
12+
rsource "sensors/ov5645/Kconfig.ov5645"
13+
rsource "sensors/ov5647/Kconfig.ov5647"
14+
rsource "sensors/sc030iot/Kconfig.sc030iot"
15+
rsource "sensors/sc035hgs/Kconfig.sc035hgs"
16+
rsource "sensors/sc101iot/Kconfig.sc101iot"
17+
rsource "sensors/sc202cs/Kconfig.sc202cs"
18+
rsource "sensors/sc2336/Kconfig.sc2336"
19+
endmenu
1820

1921
config CAMERA_SENSOR_SWAP_PIXEL_BYTE_ORDER
20-
bool "Swap Pixel Byte Order"
22+
bool "Enable pixel byte order swapping"
2123
default y if IDF_TARGET_ESP32P4
2224
default n if IDF_TARGET_ESP32S3
2325
depends on CAMERA_OV2640 || CAMERA_BF3901
2426
help
25-
If enabled, the pixel byte order will be swapped, for example:
27+
Enable pixel byte order swapping to match display or processing requirements.
2628

27-
Original RGB565 byte order:
28-
0x00 0x01 0x02 0x03 0x04 0x05
29-
B G R B G R B G R
29+
This feature exchanges the byte order of pixel data, which is useful when interfacing
30+
with different display controllers or image processing pipelines that expect specific
31+
byte ordering.
3032

31-
Swapped RGB565 byte order:
32-
0x00 0x01 0x02 0x03 0x04 0x05
33-
R G B R G B R G B
33+
Supported transformations:
3434

35-
Original YUYV byte order:
36-
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
37-
Y U Y V Y U Y V
35+
RGB565 format:
36+
Original: [R₁G₁B₁][R₂G₂B₂] → Swapped: [B₁G₁R₁][B₂G₂R₂]
37+
Byte sequence: 0xRG 0xBR 0xGB → 0xBG 0xRB 0xGR
3838

39-
Swapped YUYV byte order:
40-
0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07
41-
U Y V Y U Y V Y
39+
YUYV format:
40+
Original: [Y₁U₁Y₂V₁] → Swapped: [U₁Y₁V₁Y₂]
41+
Byte sequence: Y U Y V → U Y V Y
4242

43-
Please note that this option is only valid for OV2640 and BF3901.
43+
Platform compatibility:
44+
- ESP32-P4: Default enabled
45+
- ESP32-S3: Default disabled
4446

45-
If you want to swap the pixel byte order of other sensors,
46-
please use ESP_VIDEO_ENABLE_SWAP_BYTE. Only ESP32-P4 is supported;
47-
other platforms are not supported.
47+
Note: This option only applies to OV2640 and BF3901 sensors.
48+
For other sensors, use ESP_VIDEO_ENABLE_SWAP_BYTE (ESP32-P4 only).
4849
endmenu
49-
50-
menu "Camera XCLK generator Configuration"
50+
51+
menu "Camera XCLK Generator Configuration"
5152
config CAMERA_XCLK_USE_LEDC
52-
bool "XCLK generated by LEDC"
53+
bool "Generate XCLK using LEDC"
5354
default n if IDF_TARGET_ESP32P4
5455
default y
5556
help
56-
If enabled, XCLK can be generated from LEDC.
57-
57+
Use the LED Control (LEDC) peripheral to generate the external clock (XCLK) signal
58+
for camera sensors.
59+
60+
The LEDC peripheral provides a flexible PWM-based clock generation method that is
61+
compatible with most ESP32 variants. It offers good frequency accuracy and is
62+
suitable for most camera sensor applications.
63+
5864
config CAMERA_XCLK_USE_ESP_CLOCK_ROUTER
59-
bool "XCLK generated by ESP clock router"
65+
bool "Generate XCLK using ESP clock router"
6066
depends on IDF_TARGET_ESP32P4
6167
default y
6268
help
63-
If enabled, XCLK can be generated from SoC's supported root clocks. Please refer to SoC's supported root clocks at:
64-
`https://docs.espressif.com/projects/esp-idf/en/latest/esp32p4/api-reference/peripherals/clk_tree.html`
69+
Use the ESP32-P4's dedicated clock router to generate the external clock (XCLK)
70+
signal for camera sensors.
71+
72+
The clock router provides high-precision clock generation directly from the SoC's
73+
root clock sources, offering superior frequency stability and accuracy compared
74+
to LEDC-based generation.
75+
76+
For detailed clock tree information, refer to:
77+
https://docs.espressif.com/projects/esp-idf/en/latest/esp32p4/api-reference/peripherals/clk_tree.html
78+
79+
Recommended for: High-performance camera applications requiring precise timing.
6580
endmenu
6681

67-
menu "Camera Motor Configuration"
82+
menu "Camera Motor Control Configuration"
6883
rsource "motors/dw9714/Kconfig.dw9714"
6984

7085
config CAMERA_MOTOR_DEVICE_USED
71-
bool
86+
bool
7287
default n
7388
help
74-
This option indicates whether any camera motor driver is enabled in the configuration.
75-
It is automatically set when any of the motor drivers are enabled.
89+
Internal configuration flag indicating whether any camera motor driver is enabled.
90+
91+
This flag is automatically set when any motor driver (such as autofocus motors,
92+
zoom motors, or iris control motors) is enabled in the configuration. It is used
93+
internally by the build system to include necessary motor control libraries and
94+
initialization code.
95+
96+
Do not modify this setting manually - it is managed automatically based on
97+
your motor driver selections.
7698

7799
endmenu
78100

79-
menu "Camera Controller SPI Configuration"
101+
menu "Camera SPI Controller Configuration"
80102
config CAM_CTLR_SPI_ISR_CACHE_SAFE
81-
bool "Camera Controller SPI ISR Cache-Safe"
103+
bool "Enable cache-safe SPI interrupt handling"
82104
default y
83105
select SPI_SLAVE_ISR_IN_IRAM
84106
help
85-
Ensure the camera controller SPI ISR is Cache-Safe. When enabled, the ISR handler
86-
will be available when the cache is disabled.
107+
Ensure camera controller SPI interrupt service routine (ISR) remains accessible
108+
when cache is disabled.
109+
110+
When enabled, the SPI ISR code is placed in internal RAM (IRAM), allowing it to
111+
execute even when external flash cache is temporarily disabled during operations
112+
like flash writes, OTA updates, or power management transitions.
113+
114+
Benefits:
115+
- Prevents SPI communication interruptions during cache-disabled periods
116+
- Ensures reliable camera data transfer during system operations
117+
- Reduces latency in time-critical camera control scenarios
118+
119+
Trade-offs:
120+
- Uses additional IRAM memory
121+
- Slightly increases firmware size
122+
123+
Recommended: Enable for production applications requiring reliable camera operation
124+
during all system states.
125+
126+
Note: This automatically enables SPI_SLAVE_ISR_IN_IRAM for the SPI peripheral.
87127
endmenu
88-
endmenu
128+
endmenu

esp_cam_sensor/motors/dw9714/Kconfig.dw9714

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,51 @@ menuconfig CAM_MOTOR_DW9714
33
default n
44
select CAMERA_MOTOR_DEVICE_USED
55
help
6-
Enabling this option will add the support for DW9714 camera motor.
6+
Enable support for the DW9714 Voice Coil Motor (VCM) autofocus actuator.
77

88
if CAM_MOTOR_DW9714
99
config CAM_MOTOR_DW9714_AUTO_DETECT
1010
bool "Auto detect DW9714"
1111
default y
1212
help
13-
When enabled, it provides the ability in application layer to automatically
14-
detect camera motors one by one.
13+
When enabled, the DW9714 motor will be automatically detected and
14+
initialized during system startup without requiring manual detection
15+
calls in your application.
16+
17+
The auto-detection process uses I2C communication to identify and
18+
configure the motor with the default settings.
1519

1620
choice CAM_MOTOR_DW9714_DEFAULT_FMT
1721
prompt "Default format select"
1822
default CAM_MOTOR_DW9714_DLC_MCLK02_SRC17
1923
help
20-
We define a "format" structure in the software to store the initialization information of the motor device.
21-
Here, the default format is selected for loading when the motor is detected.
22-
24+
A "format" structure stores the motor device initialization parameters.
25+
This setting selects which default format to load when the motor is detected.
26+
2327
config CAM_MOTOR_DW9714_LSC_MCLK01_SRC03
24-
bool "LSC mode with mclk01 src03"
28+
bool "LSC(Linear Step Control) mode with mclk01 src03"
29+
help
30+
Linear Step Control mode with moderate clock and source settings.
31+
32+
Configuration: MCLK=01, SRC=03
2533
config CAM_MOTOR_DW9714_DLC_MCLK02_SRC17
26-
bool "DLC mode with mclk02 src17"
34+
bool "DLC(Direct Linear Control) mode with mclk02 src17"
35+
help
36+
Direct Linear Control mode with higher clock and source settings.
37+
38+
Configuration: MCLK=02, SRC=17
2739
endchoice # CAM_MOTOR_DW9714_DEFAULT_FMT
2840

2941
config DW9714_FORMAT_INDEX_DEFAULT
3042
int
3143
default 0 if CAM_MOTOR_DW9714_LSC_MCLK01_SRC03
3244
default 1 if CAM_MOTOR_DW9714_DLC_MCLK02_SRC17
3345
help
34-
Set the configuration loaded by default.
35-
More information can be obtained by calling the query_support_formats().
46+
Internal format index for the selected default motor configuration.
47+
48+
This value corresponds to the control mode index used internally
49+
by the driver to configure the motor with the selected default mode.
50+
51+
For additional format options and runtime configuration changes,
52+
use the query_support_formats() API function.
3653
endif

esp_cam_sensor/sensors/bf3901/Kconfig.bf3901

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,46 @@ menuconfig CAMERA_BF3901
22
bool "BF3901"
33
default n
44
help
5-
Enabling this option will add the support for BF3901.
5+
Enable support for the BF3901 CMOS image sensor.
66

77
if CAMERA_BF3901
88
menu "Auto detect BF3901"
99
config CAMERA_BF3901_AUTO_DETECT_SPI_INTERFACE_SENSOR
1010
bool "Detect for SPI interface sensor"
11-
default n
11+
default y
1212
help
13-
When enabled, you don't need to call bf3901_detect manaually, BF3901 will
14-
be automatically detected and connected to the SPI interface when the
15-
application starts.
13+
When enabled, the BF3901 sensor will be automatically detected
14+
and initialized on the SPI interface at startup without requiring
15+
manual detection call(bf3901_detect) in your application.
1616
endmenu
1717

1818
choice CAMERA_BF3901_SPI_DEFAULT_FMT
19-
prompt "Default format select"
19+
prompt "Select default output format for SPI interface"
2020
default CAMERA_BF3901_SPI_YUV422_240X320_10FPS
2121
help
22-
Select the default format to load when the sensor is detected.
23-
When the sensor is in stream off state, the format can be changed.
24-
22+
This option allows you to select the default video format for the BF3901 sensor
23+
when it is initialized on the SPI interface. The selected format will be used
24+
when the sensor is detected and initialized, and can be changed later when the
25+
sensor is in stream off state.
26+
2527
config CAMERA_BF3901_SPI_RGB565_240X320_10FPS
26-
bool "RGB565 240x320 10fps, SPI 1bit 24M input"
28+
bool "RGB565 240x320 10fps, SPI 1-bit, 24M input"
29+
help
30+
RGB565 color format at 240x320 resolution with 10fps framerate.
31+
Requires 1-bit SPI interface with 24MHz input clock.
32+
2733
config CAMERA_BF3901_SPI_YUV422_240X320_10FPS
28-
bool "YUV422 240x320 10fps, SPI 1bit 24M input"
34+
bool "YUV422 240x320 10fps, SPI 1-bit, 24M input"
35+
help
36+
YUV422 color format at 240x320 resolution with 10fps framerate.
37+
Requires 1-bit SPI interface with 24MHz input clock.
2938
endchoice # CAMERA_BF3901_SPI_DEFAULT_FMT
3039

3140
config CAMERA_BF3901_SPI_IF_FORMAT_INDEX_DEFAULT
3241
int
3342
default 0 if CAMERA_BF3901_SPI_RGB565_240X320_10FPS
3443
default 1 if CAMERA_BF3901_SPI_YUV422_240X320_10FPS
3544
help
36-
Set the configuration loaded by default for the SPI interface.
37-
More information can be obtained by calling the query_support_formats().
45+
Sets the default configuration for the SPI interface.
46+
Use query_support_formats() API to get more format options.
3847
endif

esp_cam_sensor/sensors/bf3925/Kconfig.bf3925

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,39 @@ menuconfig CAMERA_BF3925
33
default n
44
depends on SOC_LCDCAM_CAM_SUPPORTED
55
help
6-
Enabling this option will add the support for BF3925.
6+
Enable support for the BF3925 CMOS image sensor.
77

88
if CAMERA_BF3925
99
menu "Auto detect BF3925"
1010
config CAMERA_BF3925_AUTO_DETECT_DVP_INTERFACE_SENSOR
1111
bool "Detect for DVP interface sensor"
1212
default y
1313
help
14-
When enabled, you don't need to call bf3925_detect manaually, BF3925 will
15-
be automatically detected and connected to the DVP interface when the
16-
application starts.
14+
When enabled, the BF3925 sensor will be automatically detected
15+
and initialized on the DVP interface at startup without requiring
16+
manual detection call(bf3925_detect) in your application.
1717
endmenu
1818

1919
choice CAMERA_BF3925_DVP_DEFAULT_FMT
20-
prompt "Default format select"
20+
prompt "Select default output format for DVP interface"
2121
default CAMERA_BF3925_DVP_YUV422_1600X1200_9FPS
2222
help
23-
Select the default format to load when the sensor is detected.
24-
When the sensor is in stream off state, the format can be changed.
25-
23+
This option allows you to select the default video format for the BF3925 sensor
24+
when it is initialized on the DVP interface. The selected format will be used
25+
when the sensor is detected and initialized, and can be changed later when the
26+
sensor is in stream off state.
27+
2628
config CAMERA_BF3925_DVP_YUV422_1600X1200_9FPS
27-
bool "YUV422 1600x1200 9fps, DVP 8bit 20M input"
29+
bool "YUV422 1600x1200 9fps, DVP 8-bit, 20M input"
30+
help
31+
YUV422 color format at 1600x1200 resolution (UXGA) with 9fps framerate.
32+
Requires 8-bit DVP interface and 20MHz input clock.
2833
endchoice # CAMERA_BF3925_DVP_DEFAULT_FMT
2934

30-
config CAMERA_BF3925_DVP_IF_FORMAT_INDEX_DAFAULT
35+
config CAMERA_BF3925_DVP_IF_FORMAT_INDEX_DEFAULT
3136
int
3237
default 0 if CAMERA_BF3925_DVP_YUV422_1600X1200_9FPS
3338
help
34-
Set the configuration loaded by default for the DVP interface.
35-
More information can be obtained by calling the query_support_formats().
39+
Sets the default configuration for the DVP interface.
40+
Use query_support_formats() API to get more format options.
3641
endif

esp_cam_sensor/sensors/bf3925/bf3925.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ static esp_err_t bf3925_set_format(esp_cam_sensor_device_t *dev, const esp_cam_s
493493
/* Depending on the interface type, an available configuration is automatically loaded.
494494
You can set the output format of the sensor without using query_format().*/
495495
if (format == NULL) {
496-
format = &bf3925_format_info[CONFIG_CAMERA_BF3925_DVP_IF_FORMAT_INDEX_DAFAULT];
496+
format = &bf3925_format_info[CONFIG_CAMERA_BF3925_DVP_IF_FORMAT_INDEX_DEFAULT];
497497
}
498498
/*Todo, IDF I2C driver to be fixed*/
499499
// bf3925_write(dev->sccb_handle, BF3925_REG_PAGE_SELECT, 0x01); // select reg page
@@ -672,7 +672,7 @@ esp_cam_sensor_device_t *bf3925_detect(esp_cam_sensor_config_t *config)
672672
dev->pwdn_pin = config->pwdn_pin;
673673
dev->sensor_port = config->sensor_port;
674674
dev->ops = &bf3925_ops;
675-
dev->cur_format = &bf3925_format_info[CONFIG_CAMERA_BF3925_DVP_IF_FORMAT_INDEX_DAFAULT];
675+
dev->cur_format = &bf3925_format_info[CONFIG_CAMERA_BF3925_DVP_IF_FORMAT_INDEX_DEFAULT];
676676

677677
// Configure sensor power, clock, and SCCB port
678678
if (bf3925_power_on(dev) != ESP_OK) {

0 commit comments

Comments
 (0)