usbd: log outbound xfer bytes in debug

This commit is contained in:
Antonio Vázquez Blanco 2024-01-22 23:19:43 +01:00
parent 57bbf3ad2b
commit 0531027b57
1 changed files with 5 additions and 0 deletions

View File

@ -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);