Skip to content

Commit 3230d5b

Browse files
author
Aladdin Bakosh
committed
debugging can be configured on renesas dcd
1 parent 41b6085 commit 3230d5b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/portable/renesas/rusb2/dcd_rusb2.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
#error "Unsupported MCU"
4646
#endif
4747

48+
#define TU_RUSB2_DCD_DBG 0
49+
4850
//--------------------------------------------------------------------+
4951
// MACRO TYPEDEF CONSTANT ENUM
5052
//--------------------------------------------------------------------+
@@ -444,7 +446,7 @@ static bool process_pipe_xfer(int buffer_type, uint8_t ep_addr, void* buffer, ui
444446
*ctr = RUSB2_PIPE_CTR_PID_BUF;
445447
}
446448
}
447-
// TU_LOG1("X %x %d %d\r\n", ep_addr, total_bytes, buffer_type);
449+
TU_LOG(TU_RUSB2_DCD_DBG ,"X %x %d %d\r\n", ep_addr, total_bytes, buffer_type);
448450
return true;
449451
}
450452

@@ -487,7 +489,7 @@ static void process_pipe_brdy(uint8_t rhport, unsigned num)
487489
dcd_event_xfer_complete(rhport, pipe->ep,
488490
pipe->length - pipe->remaining,
489491
XFER_RESULT_SUCCESS, true);
490-
// TU_LOG1("C %d %d\r\n", num, pipe->length - pipe->remaining);
492+
TU_LOG(TU_RUSB2_DCD_DBG, "C %d %d\r\n", num, pipe->length - pipe->remaining);
491493
}
492494
}
493495

@@ -691,7 +693,7 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc)
691693
if (dir || (xfer != TUSB_XFER_BULK)) {
692694
*ctr = RUSB2_PIPE_CTR_PID_BUF;
693695
}
694-
// TU_LOG1("O %d %x %x\r\n", RUSB2->PIPESEL, RUSB2->PIPECFG, RUSB2->PIPEMAXP);
696+
TU_LOG(TU_RUSB2_DCD_DBG, "O %d %x %x\r\n", RUSB2->PIPESEL, RUSB2->PIPECFG, RUSB2->PIPEMAXP);
695697
dcd_int_enable(rhport);
696698

697699
return true;

0 commit comments

Comments
 (0)