Skip to content

Commit e3f8643

Browse files
committed
tweak trace logging
1 parent 6daed37 commit e3f8643

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cores/arduino/USBCore.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,13 +1030,13 @@ void USBCore_::transcOut(usb_dev* usbd, uint8_t ep)
10301030
auto count = transc->xfer_count;
10311031
USBCore().logEP(':', ep, '<', count);
10321032
if (ep == 0) {
1033-
uint8_t buf[USBD_EP0_MAX_SIZE];
1034-
uint8_t count = usbd->drv_handler->ep_read(buf, 0U, EP_BUF_SNG);
10351033
if (count != 0) {
10361034
if (usbd->control.ctl_state == USBD_CTL_STATUS_OUT) {
1035+
uint8_t buf[USBD_EP0_MAX_SIZE];
1036+
uint8_t count = usbd->drv_handler->ep_read(buf, 0U, EP_BUF_SNG);
10371037
USBCore().hexDump('!', buf, count);
10381038
} else {
1039-
USBCore().hexDump('<', buf, count);
1039+
USBCore().hexDump('<', ctlBuf, count);
10401040
}
10411041
}
10421042
this->oldTranscOut(usbd, ep);

0 commit comments

Comments
 (0)