mirror of
https://github.com/micropython/micropython.git
synced 2025-07-21 04:51:12 +02:00
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>
This commit is contained in:
committed by
Damien George
parent
4d2d60d6e1
commit
1d5dc723b4
@@ -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);
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user