Skip to content

Commit 656e68e

Browse files
authored
Fixes HWCDC_Events.ino
1 parent 60dd40e commit 656e68e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Diff for: libraries/ESP32/examples/HWCDC_Events/HWCDC_Events.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
#ifndef ARDUINO_USB_MODE
1616
#error This ESP32 SoC has no Native USB interface
1717
#elif ARDUINO_USB_MODE == 0
18-
#warning This sketch should be used when USB is in Hardware CDC and JTAG mode
19-
void setup(){}
20-
void loop(){}
18+
#error This sketch should be used when USB is in Hardware CDC and JTAG mode
2119
#else
2220

2321
#if !ARDUINO_USB_CDC_ON_BOOT
@@ -63,8 +61,8 @@ const char* HWCDC_Status() {
6361
}
6462

6563
void setup() {
66-
USBSerial.onEvent(usbEventCallback);
67-
USBSerial.begin();
64+
HWCDCSerial.onEvent(usbEventCallback);
65+
HWCDCSerial.begin();
6866

6967
Serial0.begin(115200);
7068
Serial0.setDebugOutput(true);

0 commit comments

Comments
 (0)