Skip to content

Commit de322e7

Browse files
cnadler86chris
andauthored
prperly set sccb_owns_i2c_port when camera driver is not the owner of i2c camera port (#818)
Co-authored-by: chris <chris@example.com>
1 parent b817e9b commit de322e7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

driver/sccb-ng.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ int SCCB_Use_Port(int i2c_num)
152152
return ESP_ERR_INVALID_ARG;
153153
}
154154
sccb_i2c_port = i2c_num;
155-
155+
sccb_owns_i2c_port = false; // in this case, camera doesn't own the i2c port
156156
return ESP_OK;
157157
}
158158

driver/sccb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ int SCCB_Use_Port(int i2c_num) { // sccb use an already initialized I2C port
8181
return ESP_ERR_INVALID_ARG;
8282
}
8383
sccb_i2c_port = i2c_num;
84+
sccb_owns_i2c_port = false; // in this case, camera doesn't own the i2c port
8485
return ESP_OK;
8586
}
8687

0 commit comments

Comments
 (0)