summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2024-11-15 15:48:52 +1100
committerDamien George <damien@micropython.org>2025-03-13 13:08:05 +1100
commit1d5dc723b40d978b84da2f9b1a48e880777385ea (patch)
tree04d47363b7fe451439598fa6fc1e6fe06fc5ed80
parent4d2d60d6e1422dc5a66f15f7e48e3ebad2dfc41c (diff)
esp32/machine_pin: Fix availability of USB Serial/JTAG pins on ESP32-C6.
Similar to parent commit, allow using USB Serial/JTAG pins for other purposes but only if this feature is disabled in the build config. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-rw-r--r--ports/esp32/machine_pin.c2
-rw-r--r--ports/esp32/machine_pin.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/ports/esp32/machine_pin.c b/ports/esp32/machine_pin.c
index bb0d40c4d..d0c4ee1a7 100644
--- a/ports/esp32/machine_pin.c
+++ b/ports/esp32/machine_pin.c
@@ -163,7 +163,7 @@ static mp_obj_t machine_pin_obj_init_helper(const machine_pin_obj_t *self, size_
CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_USB_PAD_ENABLE);
}
#endif
- #if CONFIG_IDF_TARGET_ESP32C6 && !CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED
+ #if CONFIG_IDF_TARGET_ESP32C6 && !MICROPY_HW_ESP_USB_SERIAL_JTAG
if (index == 12 || index == 13) {
CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_USB_PAD_ENABLE);
}
diff --git a/ports/esp32/machine_pin.h b/ports/esp32/machine_pin.h
index 3f94508e0..47f1ddebe 100644
--- a/ports/esp32/machine_pin.h
+++ b/ports/esp32/machine_pin.h
@@ -108,7 +108,7 @@
#define MICROPY_HW_ENABLE_GPIO9 (1)
#define MICROPY_HW_ENABLE_GPIO10 (1)
#define MICROPY_HW_ENABLE_GPIO11 (1)
-#if !CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
+#if !MICROPY_HW_ESP_USB_SERIAL_JTAG
#define MICROPY_HW_ENABLE_GPIO12 (1)
#define MICROPY_HW_ENABLE_GPIO13 (1)
#endif