Skip to content

Commit df13bef

Browse files
authored
Merge pull request #5220 from tannewt/fix_esp_i2c_display
Allocate I2C mutex with IDF
2 parents 5484a2d + 0552ce2 commit df13bef

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

ports/esp32s2/common-hal/busio/I2C.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
8888
}
8989
#endif
9090

91-
self->xSemaphore = xSemaphoreCreateMutexStatic(&self->xSemaphoreBuffer);
91+
self->xSemaphore = xSemaphoreCreateMutex();
9292
if (self->xSemaphore == NULL) {
9393
mp_raise_RuntimeError(translate("Unable to create lock"));
9494
}

ports/esp32s2/common-hal/busio/I2C.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ typedef struct {
4040
const mcu_pin_obj_t *sda_pin;
4141
i2c_port_t i2c_num;
4242
SemaphoreHandle_t xSemaphore;
43-
StaticSemaphore_t xSemaphoreBuffer;
4443
bool has_lock;
4544
} busio_i2c_obj_t;
4645

0 commit comments

Comments
 (0)