Skip to content

Commit

Permalink
tweak trace logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tlyu committed Mar 6, 2023
1 parent 6daed37 commit e3f8643
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cores/arduino/USBCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1030,13 +1030,13 @@ void USBCore_::transcOut(usb_dev* usbd, uint8_t ep)
auto count = transc->xfer_count;
USBCore().logEP(':', ep, '<', count);
if (ep == 0) {
uint8_t buf[USBD_EP0_MAX_SIZE];
uint8_t count = usbd->drv_handler->ep_read(buf, 0U, EP_BUF_SNG);
if (count != 0) {
if (usbd->control.ctl_state == USBD_CTL_STATUS_OUT) {
uint8_t buf[USBD_EP0_MAX_SIZE];
uint8_t count = usbd->drv_handler->ep_read(buf, 0U, EP_BUF_SNG);
USBCore().hexDump('!', buf, count);
} else {
USBCore().hexDump('<', buf, count);
USBCore().hexDump('<', ctlBuf, count);
}
}
this->oldTranscOut(usbd, ep);
Expand Down

0 comments on commit e3f8643

Please sign in to comment.