Use a longer clock stretching timeout for RP2040 zero-byte I2C writes

This commit is contained in:
Dan Halbert 2021-12-03 18:19:13 -05:00
parent 553d2253b0
commit 80abd2d645
1 changed files with 4 additions and 1 deletions

View File

@ -109,8 +109,11 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
// set up as GPIO by the bitbangio.I2C object.
//
// Sets pins to open drain, high, and input.
//
// Do not use the default supplied clock stretching timeout here.
// It is too short for some devices. Use the busio timeout instead.
shared_module_bitbangio_i2c_construct(&self->bitbangio_i2c, scl, sda,
frequency, timeout);
frequency, BUS_TIMEOUT_US);
self->baudrate = i2c_init(self->peripheral, frequency);