aboutsummaryrefslogtreecommitdiffstats
path: root/src/generic/usb_cdc.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-07-02 12:35:02 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-07-04 10:11:02 -0400
commit1e11b76379a32b8c2599f41705fa6c7bfc6fa718 (patch)
tree3a01d900124011eda6450568498118a077d3db1b /src/generic/usb_cdc.c
parentd1bdde56cced15cdc76625e4e1075abdcda3c9b5 (diff)
downloadkutter-1e11b76379a32b8c2599f41705fa6c7bfc6fa718.tar.gz
kutter-1e11b76379a32b8c2599f41705fa6c7bfc6fa718.tar.xz
kutter-1e11b76379a32b8c2599f41705fa6c7bfc6fa718.zip
usb_cdc: Add comments on debugging USB connections via UART
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
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