8000 esp32/machine_pin.c: Fix the logic when to clear USB_SERIAL_JTAG_USB_… · micropython/micropython@a213830 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit a213830

Browse files
authored
esp32/machine_pin.c: Fix the logic when to clear USB_SERIAL_JTAG_USB_PAD_ENABLE
When we don't use USB JTAG, we want to use the two USB pins (D+/D-) as GPIO. So, do clear USB_SERIAL_JTAG_USB_PAD_ENABLE when USB SERIAL JTAG is not enabled Signed-off-by: Garry W <32130780+garywill@users.noreply.github.com>
1 parent 611d8f9 commit a213830

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/esp32/machine_pin.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ static mp_obj_t machine_pin_obj_init_helper(const machine_pin_obj_t *self, size_
158158
}
159159
}
160160

161-
#if CONFIG_IDF_TARGET_ESP32C3 && MICROPY_HW_ESP_USB_SERIAL_JTAG
161+
#if CONFIG_IDF_TARGET_ESP32C3 && !MICROPY_HW_ESP_USB_SERIAL_JTAG
162162
if (index == 18 || index == 19) {
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 && !CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED
167167
if (index == 12 || index == 13) {
168168
CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_USB_PAD_ENABLE);
169169
}

0 commit comments

Comments
 (0)
0