Skip to content

Commit 3176a45

Browse files
同步esp-video组件驱动摄像头的配置(waveshare s3-3.5、s3-3.5b、s3-audio-board) (#1291)
* 同步esp-video组件驱动摄像头的配置 * 修改Waveshare ESP32-S3-AUDIO-Board 摄像头配置。 * Modify the XCLK parameters of the camera, and modify the config.txt to be compatible with 2640 and 5640. * Update the esp_video component version to 1.3.0 * Downgrade the esp_video component version. There are unfixed bugs. * Update component version
1 parent a601a5c commit 3176a45

File tree

7 files changed

+44
-30
lines changed

7 files changed

+44
-30
lines changed

main/boards/esp32-s3-touch-lcd-3.5/config.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
{
55
"name": "esp32-s3-touch-lcd-3.5",
66
"sdkconfig_append": [
7-
"CONFIG_USE_WECHAT_MESSAGE_STYLE=y"
7+
"CONFIG_USE_WECHAT_MESSAGE_STYLE=y",
8+
"CONFIG_CAMERA_OV2640=y",
9+
"CONFIG_CAMERA_OV2640_AUTO_DETECT_DVP_INTERFACE_SENSOR=y",
10+
"CONFIG_CAMERA_OV2640_DVP_YUV422_640X480_6FPS=y",
11+
"CONFIG_CAMERA_OV2640_DVP_IF_FORMAT_INDEX_DEFAULT=1",
12+
"CONFIG_CAMERA_OV5640=y",
13+
"CONFIG_CAMERA_OV5640_AUTO_DETECT_DVP_INTERFACE_SENSOR=y",
14+
"CONFIG_CAMERA_OV5640_DVP_YUV422_800X600_10FPS=y",
15+
"CONFIG_CAMERA_OV5640_DVP_IF_FORMAT_INDEX_DEFAULT=0"
816
]
917
}
1018
]

main/boards/esp32-s3-touch-lcd-3.5/esp32-s3-touch-lcd-3.5.cc

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,21 +193,17 @@ class CustomBoard : public WifiBoard {
193193
};
194194

195195
esp_video_init_sccb_config_t sccb_config = {
196-
.init_sccb = true,
197-
.i2c_config = {
198-
.port = I2C_NUM_0,
199-
.scl_pin = CAM_PIN_SIOC,
200-
.sda_pin = CAM_PIN_SIOD,
201-
},
202-
.freq = 100000,
196+
.init_sccb = false, // 不初始化新的 SCCB,使用现有的 I2C 总线
197+
.i2c_handle = i2c_bus_, // 使用现有的 I2C 总线句柄
198+
.freq = 100000, // 100kHz
203199
};
204200

205201
esp_video_init_dvp_config_t dvp_config = {
206202
.sccb_config = sccb_config,
207203
.reset_pin = CAM_PIN_RESET,
208204
.pwdn_pin = CAM_PIN_PWDN,
209205
.dvp_pin = dvp_pin_config,
210-
.xclk_freq = 10000000,
206+
.xclk_freq = 12000000,
211207
};
212208

213209
esp_video_init_config_t video_config = {

main/boards/waveshare-s3-audio-board/config.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@
33
"builds": [
44
{
55
"name": "waveshare-s3-audio-board",
6-
"sdkconfig_append": []
6+
"sdkconfig_append": [
7+
"CONFIG_USE_WECHAT_MESSAGE_STYLE=y",
8+
"CONFIG_CAMERA_OV2640=y",
9+
"CONFIG_CAMERA_OV2640_AUTO_DETECT_DVP_INTERFACE_SENSOR=y",
10+
"CONFIG_CAMERA_OV2640_DVP_YUV422_640X480_6FPS=y",
11+
"CONFIG_CAMERA_OV2640_DVP_IF_FORMAT_INDEX_DEFAULT=1",
12+
"CONFIG_CAMERA_OV5640=y",
13+
"CONFIG_CAMERA_OV5640_AUTO_DETECT_DVP_INTERFACE_SENSOR=y",
14+
"CONFIG_CAMERA_OV5640_DVP_YUV422_800X600_10FPS=y",
15+
"CONFIG_CAMERA_OV5640_DVP_IF_FORMAT_INDEX_DEFAULT=0"
16+
]
717
}
818
]
919
}

main/boards/waveshare-s3-audio-board/esp32-s3-audio_board.cc

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "led/circular_strip.h"
2121
#include "esp_lcd_jd9853.h"
2222

23-
#define TAG "waveshare_lcd_1_85c"
23+
#define TAG "waveshare_s3_audio_board"
2424

2525
#define LCD_OPCODE_WRITE_CMD (0x02ULL)
2626
#define LCD_OPCODE_READ_CMD (0x0BULL)
@@ -175,29 +175,25 @@ class CustomBoard : public WifiBoard {
175175
};
176176

177177
esp_video_init_sccb_config_t sccb_config = {
178-
.init_sccb = true,
179-
.i2c_config = {
180-
.port = 0,
181-
.scl_pin = CAMERA_PIN_SIOC,
182-
.sda_pin = CAMERA_PIN_SIOD,
183-
},
184-
.freq = 100000,
178+
.init_sccb = false, // 不初始化新的 SCCB,使用现有的 I2C 总线
179+
.i2c_handle = i2c_bus_, // 使用现有的 I2C 总线句柄
180+
.freq = 100000, // 100kHz
185181
};
186182

187183
esp_video_init_dvp_config_t dvp_config = {
188184
.sccb_config = sccb_config,
189185
.reset_pin = CAMERA_PIN_RESET,
190186
.pwdn_pin = CAMERA_PIN_PWDN,
191187
.dvp_pin = dvp_pin_config,
192-
.xclk_freq = XCLK_FREQ_HZ,
188+
.xclk_freq = 12000000,
193189
};
194190

195191
esp_video_init_config_t video_config = {
196192
.dvp = &dvp_config,
197193
};
198194

199195
camera_ = new Esp32Camera(video_config);
200-
camera_->SetVFlip(1);
196+
201197
}
202198
public:
203199
CustomBoard() :

main/boards/waveshare-s3-touch-lcd-3.5b/config.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
{
55
"name": "waveshare-s3-touch-lcd-3.5b",
66
"sdkconfig_append": [
7-
"CONFIG_USE_WECHAT_MESSAGE_STYLE=y"
7+
"CONFIG_USE_WECHAT_MESSAGE_STYLE=y",
8+
"CONFIG_CAMERA_OV2640=y",
9+
"CONFIG_CAMERA_OV2640_AUTO_DETECT_DVP_INTERFACE_SENSOR=y",
10+
"CONFIG_CAMERA_OV2640_DVP_YUV422_640X480_6FPS=y",
11+
"CONFIG_CAMERA_OV2640_DVP_IF_FORMAT_INDEX_DEFAULT=1",
12+
"CONFIG_CAMERA_OV5640=y",
13+
"CONFIG_CAMERA_OV5640_AUTO_DETECT_DVP_INTERFACE_SENSOR=y",
14+
"CONFIG_CAMERA_OV5640_DVP_YUV422_800X600_10FPS=y",
15+
"CONFIG_CAMERA_OV5640_DVP_IF_FORMAT_INDEX_DEFAULT=0"
816
]
917
}
1018
]

main/boards/waveshare-s3-touch-lcd-3.5b/waveshare-s3-touch-lcd-3.5b.cc

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,21 +196,17 @@ class CustomBoard : public WifiBoard {
196196
};
197197

198198
esp_video_init_sccb_config_t sccb_config = {
199-
.init_sccb = true,
200-
.i2c_config = {
201-
.port = I2C_NUM_0,
202-
.scl_pin = CAM_PIN_SIOC,
203-
.sda_pin = CAM_PIN_SIOD,
204-
},
205-
.freq = 100000,
199+
.init_sccb = false, // 不初始化新的 SCCB,使用现有的 I2C 总线
200+
.i2c_handle = i2c_bus_, // 使用现有的 I2C 总线句柄
201+
.freq = 100000, // 100kHz
206202
};
207203

208204
esp_video_init_dvp_config_t dvp_config = {
209205
.sccb_config = sccb_config,
210206
.reset_pin = CAM_PIN_RESET,
211207
.pwdn_pin = CAM_PIN_PWDN,
212208
.dvp_pin = dvp_pin_config,
213-
.xclk_freq = 10000000,
209+
.xclk_freq = 12000000,
214210
};
215211

216212
esp_video_init_config_t video_config = {

main/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies:
2727
espressif/button: ~4.1.3
2828
espressif/knob: ^1.0.0
2929
espressif/esp_video:
30-
version: '==1.2.0' # for compatibility. update version may need to modify this project code.
30+
version: '==1.3.1' # for compatibility. update version may need to modify this project code.
3131
rules:
3232
- if: target not in [esp32]
3333
espressif/esp_lcd_touch_ft5x06: ~1.0.7

0 commit comments

Comments
 (0)