Fix RNDIS board and enhance camera initialization (#1702)
* Add support for RNDIS board and enhance camera initialization - Included rndis_board.cc in the build for ESP32S3 and ESP32P4 targets. - Updated camera initialization logic in esp32s3_korvo2_v3_board.cc and esp32s3_korvo2_v3_board.cc to use a more structured camera_config_t setup. - Improved code readability by refining comments and formatting in the camera initialization functions. * Remove outdated camera configuration options from esp32s3-korvo2-v3-rndis config.json to streamline setup and improve clarity. * Update IDF version in build configuration and component dependencies to v5.5.2 for improved compatibility. * update discord links --------- Co-authored-by: Xiaoxia <terrence.huang@tenclass.com>
This commit is contained in:
@ -50,6 +50,7 @@ static const ili9341_lcd_init_cmd_t vendor_specific_init[] = {
|
||||
{0, (uint8_t []){0}, 0xff, 0},
|
||||
};
|
||||
|
||||
// https://github.com/78/xiaozhi-esp32/pull/1655
|
||||
class Esp32S3Korvo2V3Board : public RndisBoard {
|
||||
private:
|
||||
Button boot_button_;
|
||||
@ -348,43 +349,41 @@ private:
|
||||
}
|
||||
|
||||
void InitializeCamera() {
|
||||
static esp_cam_ctlr_dvp_pin_config_t dvp_pin_config = {
|
||||
.data_width = CAM_CTLR_DATA_WIDTH_8,
|
||||
.data_io = {
|
||||
[0] = CAMERA_PIN_D0,
|
||||
[1] = CAMERA_PIN_D1,
|
||||
[2] = CAMERA_PIN_D2,
|
||||
[3] = CAMERA_PIN_D3,
|
||||
[4] = CAMERA_PIN_D4,
|
||||
[5] = CAMERA_PIN_D5,
|
||||
[6] = CAMERA_PIN_D6,
|
||||
[7] = CAMERA_PIN_D7,
|
||||
},
|
||||
.vsync_io = CAMERA_PIN_VSYNC,
|
||||
.de_io = CAMERA_PIN_HREF,
|
||||
.pclk_io = CAMERA_PIN_PCLK,
|
||||
.xclk_io = CAMERA_PIN_XCLK,
|
||||
camera_config_t camera_config = {
|
||||
.pin_pwdn = CAMERA_PIN_PWDN,
|
||||
.pin_reset = CAMERA_PIN_RESET,
|
||||
.pin_xclk = CAMERA_PIN_XCLK,
|
||||
.pin_sccb_sda = -1, // Use initialized I2C
|
||||
.pin_sccb_scl = -1,
|
||||
.pin_d7 = CAMERA_PIN_D7,
|
||||
.pin_d6 = CAMERA_PIN_D6,
|
||||
.pin_d5 = CAMERA_PIN_D5,
|
||||
.pin_d4 = CAMERA_PIN_D4,
|
||||
.pin_d3 = CAMERA_PIN_D3,
|
||||
.pin_d2 = CAMERA_PIN_D2,
|
||||
.pin_d1 = CAMERA_PIN_D1,
|
||||
.pin_d0 = CAMERA_PIN_D0,
|
||||
.pin_vsync = CAMERA_PIN_VSYNC,
|
||||
.pin_href = CAMERA_PIN_HREF,
|
||||
.pin_pclk = CAMERA_PIN_PCLK,
|
||||
|
||||
.xclk_freq_hz = XCLK_FREQ_HZ,
|
||||
.ledc_timer = LEDC_TIMER_0,
|
||||
.ledc_channel = LEDC_CHANNEL_0,
|
||||
|
||||
.pixel_format = PIXFORMAT_RGB565,
|
||||
.frame_size = FRAMESIZE_QVGA,
|
||||
.jpeg_quality = 12,
|
||||
.fb_count = 2,
|
||||
.fb_location = CAMERA_FB_IN_PSRAM,
|
||||
.grab_mode = CAMERA_GRAB_WHEN_EMPTY,
|
||||
.sccb_i2c_port = (i2c_port_t)1,
|
||||
};
|
||||
|
||||
esp_video_init_sccb_config_t sccb_config = {
|
||||
.init_sccb = false,
|
||||
.i2c_handle = i2c_bus_,
|
||||
.freq = 100000,
|
||||
};
|
||||
|
||||
esp_video_init_dvp_config_t dvp_config = {
|
||||
.sccb_config = sccb_config,
|
||||
.reset_pin = CAMERA_PIN_RESET,
|
||||
.pwdn_pin = CAMERA_PIN_PWDN,
|
||||
.dvp_pin = dvp_pin_config,
|
||||
.xclk_freq = XCLK_FREQ_HZ,
|
||||
};
|
||||
|
||||
esp_video_init_config_t video_config = {
|
||||
.dvp = &dvp_config,
|
||||
};
|
||||
|
||||
camera_ = new Esp32Camera(video_config);
|
||||
camera_ = new Esp32Camera(camera_config);
|
||||
if (camera_ != nullptr) {
|
||||
camera_->SetVFlip(true);
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user