We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d2db24 commit 345087cCopy full SHA for 345087c
cores/esp32/HWCDC.h
@@ -21,6 +21,7 @@
21
#include <inttypes.h>
22
#include "esp_event.h"
23
#include "Stream.h"
24
+#include "hal/usb_serial_jtag_ll.h"
25
26
ESP_EVENT_DECLARE_BASE(ARDUINO_HW_CDC_EVENTS);
27
@@ -69,7 +70,12 @@ class HWCDC : public Stream {
69
70
size_t write(const uint8_t *buffer, size_t size);
71
void flush(void);
72
- static bool isPlugged(void);
73
+ inline static bool isPlugged(void) {
74
+ // SOF ISR is causing esptool to be unable to upload firmware to the board
75
+ // Using IDF 5.1 helper function because it is based on Timer check instead of ISR
76
+ return usb_serial_jtag_is_connected();
77
+ }
78
+
79
inline static bool isConnected(void) {
80
return isCDC_Connected();
81
}
0 commit comments