aboutsummaryrefslogtreecommitdiffstats
path: root/src/generic/usb_cdc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/generic/usb_cdc.c')
-rw-r--r--src/generic/usb_cdc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/generic/usb_cdc.c b/src/generic/usb_cdc.c
index a282a604..e522abff 100644
--- a/src/generic/usb_cdc.c
+++ b/src/generic/usb_cdc.c
@@ -15,6 +15,15 @@
#include "sched.h" // sched_wake_task
#include "usb_cdc.h" // usb_notify_ep0
+// To debug a USB connection over UART, uncomment the two macros
+// below, alter the board KConfig to "select USBSERIAL" on a serial
+// UART build (so both USB and UART are enabled in a single build),
+// compile the code using serial UART, add output() calls to the USB
+// code as needed, deploy the new binary, and then connect via
+// console.py using UART to see those output() messages.
+//#define console_sendf(ce,va) console_sendf_usb(ce,va)
+//#define command_find_and_dispatch(rb, rp, pc) ({*(pc) = rp; 1;})
+
/****************************************************************
* Message block sending