Skip to content

Commit 4d4e20b

Browse files
author
IngHK
committed
missing \r\n after TU_LOG_BUF => moved \r\n to tu_print_buf()
1 parent a066002 commit 4d4e20b

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

src/common/tusb_debug.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ void tu_print_mem(void const *buf, uint32_t count, uint8_t indent);
6060

6161
static inline void tu_print_buf(uint8_t const* buf, uint32_t bufsize) {
6262
for(uint32_t i=0; i<bufsize; i++) tu_printf("%02X ", buf[i]);
63+
tu_printf("\r\n");
6364
}
6465

6566
// Log with Level

src/device/usbd.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@ void tud_task_ext(uint32_t timeout_ms, bool in_isr)
500500

501501
case DCD_EVENT_SETUP_RECEIVED:
502502
TU_LOG_BUF(CFG_TUD_LOG_LEVEL, &event.setup_received, 8);
503-
TU_LOG_USBD("\r\n");
504503

505504
// Mark as connected after receiving 1st setup packet.
506505
// But it is easier to set it every time instead of wasting time to check then set

src/host/usbh.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,6 @@ bool tuh_control_xfer (tuh_xfer_t* xfer) {
589589
(xfer->setup->bmRequestType_bit.type == TUSB_REQ_TYPE_STANDARD && xfer->setup->bRequest <= TUSB_REQ_SYNCH_FRAME) ?
590590
tu_str_std_request[xfer->setup->bRequest] : "Class Request");
591591
TU_LOG_BUF_USBH(xfer->setup, 8);
592-
TU_LOG_USBH("\r\n");
593592

594593
if (xfer->complete_cb) {
595594
TU_ASSERT( hcd_setup_send(rhport, daddr, (uint8_t const*) &_ctrl_xfer.request) );
@@ -662,7 +661,6 @@ static bool usbh_control_xfer_cb (uint8_t dev_addr, uint8_t ep_addr, xfer_result
662661
if (XFER_RESULT_SUCCESS != result) {
663662
TU_LOG_USBH("[%u:%u] Control %s, xferred_bytes = %lu\r\n", rhport, dev_addr, result == XFER_RESULT_STALLED ? "STALLED" : "FAILED", xferred_bytes);
664663
TU_LOG_BUF_USBH(request, 8);
665-
TU_LOG_USBH("\r\n");
666664

667665
// terminate transfer if any stage failed
668666
_xfer_complete(dev_addr, result);

0 commit comments

Comments
 (0)