Skip to content

Commit 9b9ffef

Browse files
committed
cmodules/m5camera: Fix camera initialization exception.
The camera is not initialized using the correct i2c port. Signed-off-by: lbuque <[email protected]>
1 parent 1fed9fd commit 9b9ffef

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

m5stack/board.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ extern "C" {
4848
auto cfg = M5.config();
4949
cfg.output_power = false;
5050
M5.begin(cfg);
51-
// in_i2c_init();
52-
// M5.In_I2C.release();
51+
in_i2c_init();
52+
M5.In_I2C.release();
5353
}
5454

5555
void power_init()

m5stack/cmodules/m5camera/m5camera.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ static camera_config_t camera_config = {
5050
.pin_pwdn = CORES3_CAMERA_POWER_DOWN_PIN,
5151
.pin_reset = CORES3_CAMERA_RESET_PIN,
5252
.pin_xclk = CORES3_CAMERA_XCLK_PIN,
53-
.pin_sscb_sda = CORES3_CAMERA_SDA_PIN,
54-
.pin_sscb_scl = CORES3_CAMERA_SCL_PIN,
53+
.pin_sscb_sda = -1,
54+
.pin_sscb_scl = -1,
5555
.pin_d7 = CORES3_CAMERA_D7_PIN,
5656
.pin_d6 = CORES3_CAMERA_D6_PIN,
5757
.pin_d5 = CORES3_CAMERA_D5_PIN,
@@ -73,6 +73,7 @@ static camera_config_t camera_config = {
7373
.fb_count = 2,
7474
.fb_location = CAMERA_FB_IN_PSRAM,
7575
.grab_mode = CAMERA_GRAB_LATEST,
76+
.sccb_i2c_port = 1,
7677
};
7778

7879
static enum {

0 commit comments

Comments
 (0)