Skip to content

Dotclock enhancements #8430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Sep 27, 2023
Prev Previous commit
Next Next commit
espressif: i2c: initialize "has_lock"
Otherwise, a stack-constructed i2c instance might get some other value
here.
  • Loading branch information
jepler committed Sep 26, 2023
commit 03141d40af1e4c1ebd9f9df01f7e1e72f3cbb098
1 change: 1 addition & 0 deletions ports/espressif/common-hal/busio/I2C.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
self->sda_pin = sda;
self->scl_pin = scl;
self->i2c_num = peripherals_i2c_get_free_num();
self->has_lock = 0;

if (self->i2c_num == I2C_NUM_MAX) {
mp_raise_ValueError(translate("All I2C peripherals are in use"));
Expand Down