From 1e11b76379a32b8c2599f41705fa6c7bfc6fa718 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 2 Jul 2021 12:35:02 -0400 Subject: [PATCH] usb_cdc: Add comments on debugging USB connections via UART Signed-off-by: Kevin O'Connor --- src/generic/usb_cdc.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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