@@ -141,7 +141,7 @@ bool common_hal_busio_i2c_probe(busio_i2c_obj_t *self, uint8_t addr) {
141
141
i2c_master_start (cmd );
142
142
i2c_master_write_byte (cmd , addr << 1 , true);
143
143
i2c_master_stop (cmd );
144
- esp_err_t result = i2c_master_cmd_begin (self -> i2c_num , cmd , 10 );
144
+ esp_err_t result = i2c_master_cmd_begin (self -> i2c_num , cmd , 1 );
145
145
i2c_cmd_link_delete (cmd );
146
146
return result == ESP_OK ;
147
147
}
@@ -172,7 +172,7 @@ uint8_t common_hal_busio_i2c_write(busio_i2c_obj_t *self, uint16_t addr,
172
172
if (transmit_stop_bit ) {
173
173
i2c_master_stop (cmd );
174
174
}
175
- esp_err_t result = i2c_master_cmd_begin (self -> i2c_num , cmd , 100 /* wait in ticks */ );
175
+ esp_err_t result = i2c_master_cmd_begin (self -> i2c_num , cmd , pdMS_TO_TICKS ( 1000 ) );
176
176
i2c_cmd_link_delete (cmd );
177
177
178
178
if (result == ESP_OK ) {
@@ -193,7 +193,7 @@ uint8_t common_hal_busio_i2c_read(busio_i2c_obj_t *self, uint16_t addr,
193
193
}
194
194
i2c_master_read_byte (cmd , data + len - 1 , 1 );
195
195
i2c_master_stop (cmd );
196
- esp_err_t result = i2c_master_cmd_begin (self -> i2c_num , cmd , 100 /* wait in ticks */ );
196
+ esp_err_t result = i2c_master_cmd_begin (self -> i2c_num , cmd , pdMS_TO_TICKS ( 1000 ) );
197
197
i2c_cmd_link_delete (cmd );
198
198
199
199
if (result == ESP_OK ) {
0 commit comments