Skip to content

Commit 1d5dc72

Browse files
projectgusdpgeorge
authored andcommitted
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 <[email protected]>
1 parent 4d2d60d commit 1d5dc72

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ports/esp32/machine_pin.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static mp_obj_t machine_pin_obj_init_helper(const machine_pin_obj_t *self, size_
163163
CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_USB_PAD_ENABLE);
164164
}
165165
#endif
166-
#if CONFIG_IDF_TARGET_ESP32C6 && !CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED
166+
#if CONFIG_IDF_TARGET_ESP32C6 && !MICROPY_HW_ESP_USB_SERIAL_JTAG
167167
if (index == 12 || index == 13) {
168168
CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_USB_PAD_ENABLE);
169169
}

ports/esp32/machine_pin.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
#define MICROPY_HW_ENABLE_GPIO9 (1)
109109
#define MICROPY_HW_ENABLE_GPIO10 (1)
110110
#define MICROPY_HW_ENABLE_GPIO11 (1)
111-
#if !CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
111+
#if !MICROPY_HW_ESP_USB_SERIAL_JTAG
112112
#define MICROPY_HW_ENABLE_GPIO12 (1)
113113
#define MICROPY_HW_ENABLE_GPIO13 (1)
114114
#endif

0 commit comments

Comments
 (0)