summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAntonio Vázquez Blanco <[email protected]>2024-01-22 23:19:43 +0100
committerAntonio Vázquez Blanco <[email protected]>2024-02-07 13:06:41 +0100
commit0531027b57e9401d49afa13e70f5a6a9763a3b85 (patch)
treeee0525b1ebde97f87d1d8c2c014feab3f23006d8 /src
parent57bbf3ad2baf4e47ed2a501e80cf975f2dcafad1 (diff)
usbd: log outbound xfer bytes in debug
Diffstat (limited to 'src')
-rw-r--r--src/device/usbd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 5c94ebcc5..28eb9aa6e 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -1232,6 +1232,11 @@ bool usbd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t
// TU_VERIFY(tud_ready());
TU_LOG_USBD(" Queue EP %02X with %u bytes ...\r\n", ep_addr, total_bytes);
+#if CFG_TUD_LOG_LEVEL >= 3
+ if(tu_edpt_dir(ep_addr) == TUSB_DIR_IN) {
+ TU_LOG_MEM(CFG_TUD_LOG_LEVEL, buffer, total_bytes, 2);
+ }
+#endif
// Attempt to transfer on a busy endpoint, sound like an race condition !
TU_ASSERT(_usbd_dev.ep_status[epnum][dir].busy == 0);