From e3f8643ba634a521bac4abd94b474b058b6b3eb7 Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Mon, 6 Mar 2023 16:13:30 -0600 Subject: [PATCH] tweak trace logging --- cores/arduino/USBCore.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp index 82207a46..d3fd48b0 100644 --- a/cores/arduino/USBCore.cpp +++ b/cores/arduino/USBCore.cpp @@ -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);