We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3d1256 commit 367d380Copy full SHA for 367d380
ports/esp32s2/common-hal/busio/I2C.c
@@ -163,6 +163,9 @@ bool common_hal_busio_i2c_probe(busio_i2c_obj_t *self, uint8_t addr) {
163
}
164
165
bool common_hal_busio_i2c_try_lock(busio_i2c_obj_t *self) {
166
+ if (self->has_lock) {
167
+ return false;
168
+ }
169
self->has_lock = xSemaphoreTake(&self->semaphore, 0) == pdTRUE;
170
return self->has_lock;
171
0 commit comments