Skip to content

Commit

Permalink
cmodules/m5camera: Fix camera initialization exception.
Browse files Browse the repository at this point in the history
The camera is not initialized using the correct i2c port.

Signed-off-by: lbuque <[email protected]>
  • Loading branch information
lbuque committed Nov 29, 2024
1 parent 1fed9fd commit 9b9ffef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions m5stack/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ extern "C" {
auto cfg = M5.config();
cfg.output_power = false;
M5.begin(cfg);
// in_i2c_init();
// M5.In_I2C.release();
in_i2c_init();
M5.In_I2C.release();
}

void power_init()
Expand Down
5 changes: 3 additions & 2 deletions m5stack/cmodules/m5camera/m5camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ static camera_config_t camera_config = {
.pin_pwdn = CORES3_CAMERA_POWER_DOWN_PIN,
.pin_reset = CORES3_CAMERA_RESET_PIN,
.pin_xclk = CORES3_CAMERA_XCLK_PIN,
.pin_sscb_sda = CORES3_CAMERA_SDA_PIN,
.pin_sscb_scl = CORES3_CAMERA_SCL_PIN,
.pin_sscb_sda = -1,
.pin_sscb_scl = -1,
.pin_d7 = CORES3_CAMERA_D7_PIN,
.pin_d6 = CORES3_CAMERA_D6_PIN,
.pin_d5 = CORES3_CAMERA_D5_PIN,
Expand All @@ -73,6 +73,7 @@ static camera_config_t camera_config = {
.fb_count = 2,
.fb_location = CAMERA_FB_IN_PSRAM,
.grab_mode = CAMERA_GRAB_LATEST,
.sccb_i2c_port = 1,
};

static enum {
Expand Down

0 comments on commit 9b9ffef

Please sign in to comment.