From bc1dade3048eac2c88ae0f1caf1daa2a19242cb5 Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Tue, 8 Mar 2022 16:39:24 +1100 Subject: [PATCH] Espressif: Fix i2c pullup detection --- ports/espressif/common-hal/busio/I2C.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/espressif/common-hal/busio/I2C.c b/ports/espressif/common-hal/busio/I2C.c index 454432ab91..0706de1df5 100644 --- a/ports/espressif/common-hal/busio/I2C.c +++ b/ports/espressif/common-hal/busio/I2C.c @@ -50,6 +50,8 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, gpio_set_direction(sda->number, GPIO_MODE_DEF_INPUT); gpio_set_direction(scl->number, GPIO_MODE_DEF_INPUT); + gpio_pullup_dis(sda->number); + gpio_pullup_dis(scl->number); gpio_pulldown_en(sda->number); gpio_pulldown_en(scl->number);