summaryrefslogtreecommitdiff
path: root/ports/esp32/usb.c
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2024-08-27 15:49:43 +1000
committerAngus Gratton <angus@redyak.com.au>2024-09-03 10:27:28 +1000
commit6ad6297ef7524ad74ad7618e666dd35fc5e92cfe (patch)
tree8a1de0abcdf3841035ba9a2ad7f7458d82993d39 /ports/esp32/usb.c
parent1897fe6227a578d351494e3db23b732b1c84584c (diff)
esp32: Fix ESP32-C3 USB serial/jtag peripheral pre-IDF 5.1.
Regression in 0a11832cd in IDF 5.0.x where macro CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED is not defined. With this patch, ESP32-S3 still USB Serial/JTAG incorrectly (now on all ESP-IDF versions). Closes #15701 This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'ports/esp32/usb.c')
-rw-r--r--ports/esp32/usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/esp32/usb.c b/ports/esp32/usb.c
index 5a0e6b8a9..471f2c2e0 100644
--- a/ports/esp32/usb.c
+++ b/ports/esp32/usb.c
@@ -28,7 +28,7 @@
#include "py/mphal.h"
#include "usb.h"
-#if CONFIG_USB_OTG_SUPPORTED && !CONFIG_ESP_CONSOLE_USB_CDC && !CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED
+#if CONFIG_USB_OTG_SUPPORTED && !CONFIG_ESP_CONSOLE_USB_CDC && !MICROPY_HW_ESP_USB_SERIAL_JTAG
#include "esp_timer.h"
#ifndef NO_QSTR
@@ -100,4 +100,4 @@ void usb_tx_strn(const char *str, size_t len) {
}
}
-#endif // CONFIG_USB_OTG_SUPPORTED && !CONFIG_ESP_CONSOLE_USB_CDC && !CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED
+#endif // CONFIG_USB_OTG_SUPPORTED && !CONFIG_ESP_CONSOLE_USB_CDC && !MICROPY_HW_ESP_USB_SERIAL_JTAG