aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/CDC.cpp
diff options
context:
space:
mode:
authorMartino Facchin <m.facchin@arduino.cc>2021-10-01 09:41:18 +0200
committerGitHub <noreply@github.com>2021-10-01 09:41:18 +0200
commit44dc454b9382298fa8be542c8c92e7944d9aa21e (patch)
treeafd6e5a8c793ffd83820ea188c08c7b72598cf28 /cores/arduino/CDC.cpp
parent8f8df161ebf3d8bc595d226c3d3a9125383042a5 (diff)
parent8e823d276f939d79b2d323fad675fb8442a718c2 (diff)
Merge pull request #383 from DanielGibson/disable-cdc
Allow disabling CDC with -DCDC_DISABLED
Diffstat (limited to 'cores/arduino/CDC.cpp')
-rw-r--r--cores/arduino/CDC.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/cores/arduino/CDC.cpp b/cores/arduino/CDC.cpp
index 4ff6b9b..7d5afaa 100644
--- a/cores/arduino/CDC.cpp
+++ b/cores/arduino/CDC.cpp
@@ -22,6 +22,13 @@
#if defined(USBCON)
+#ifndef CDC_ENABLED
+
+#warning "! Disabled serial console via USB (CDC)!"
+#warning "! With this change you'll have to use the Arduino's reset button/pin to flash (upload)!"
+
+#else // CDC not disabled
+
typedef struct
{
u32 dwDTERate;
@@ -299,4 +306,5 @@ int32_t Serial_::readBreak() {
Serial_ Serial;
+#endif /* if defined(CDC_ENABLED) */
#endif /* if defined(USBCON) */