esp32/machine_pin: Fix logic clearing 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> Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
parent
bfd974d658
commit
4d2d60d6e1
1 changed files with 2 additions and 2 deletions
|
|
@ -158,12 +158,12 @@ static mp_obj_t machine_pin_obj_init_helper(const machine_pin_obj_t *self, size_
|
|||
}
|
||||
}
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32C3 && MICROPY_HW_ESP_USB_SERIAL_JTAG
|
||||
#if CONFIG_IDF_TARGET_ESP32C3 && !MICROPY_HW_ESP_USB_SERIAL_JTAG
|
||||
if (index == 18 || index == 19) {
|
||||
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 && !CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED
|
||||
if (index == 12 || index == 13) {
|
||||
CLEAR_PERI_REG_MASK(USB_SERIAL_JTAG_CONF0_REG, USB_SERIAL_JTAG_USB_PAD_ENABLE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue