From ef16796f4941fb650cb87a8c29dfa663313e1049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20de=20Giessen?= Date: Thu, 28 Apr 2022 16:20:08 +0200 Subject: [PATCH] esp32/machine_pin: Fix ESP32C3 IDFv4.4.1 build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use new constants as seen in ESP-IDF commit b25fb1. Signed-off-by: Daniƫl van de Giessen --- ports/esp32/machine_pin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/esp32/machine_pin.c b/ports/esp32/machine_pin.c index edfa4d5cae..2238c6e5fa 100644 --- a/ports/esp32/machine_pin.c +++ b/ports/esp32/machine_pin.c @@ -41,7 +41,7 @@ #include "modesp32.h" #if CONFIG_IDF_TARGET_ESP32C3 -#include "hal/gpio_ll.h" +#include "soc/usb_serial_jtag_reg.h" #endif // Used to implement a range of pull capabilities @@ -290,7 +290,7 @@ STATIC mp_obj_t machine_pin_obj_init_helper(const machine_pin_obj_t *self, size_ #if CONFIG_IDF_TARGET_ESP32C3 if (self->id == 18 || self->id == 19) { - CLEAR_PERI_REG_MASK(USB_DEVICE_CONF0_REG, USB_DEVICE_USB_PAD_ENABLE); + CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_USB_PAD_ENABLE); } #endif