Skip to content

Commit 0605c11

Browse files
committed
USBD: RX LED now blinks again (fixed regression)
1 parent b4ad266 commit 0605c11

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cores/arduino/USB/USBCore.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -526,18 +526,20 @@ uint32_t USBDeviceClass::recv(uint32_t ep, void *_data, uint32_t len)
526526
if (!_usbConfiguration)
527527
return -1;
528528

529+
#ifdef PIN_LED_RXL
530+
if (rxLEDPulse == 0)
531+
digitalWrite(PIN_LED_RXL, LOW);
532+
533+
rxLEDPulse = TX_RX_LED_PULSE_MS;
534+
#endif
535+
529536
if (epHandlers[ep]) {
530537
return epHandlers[ep]->recv(_data, len);
531538
}
532539

533540
if (available(ep) < len)
534541
len = available(ep);
535542

536-
#ifdef PIN_LED_RXL
537-
digitalWrite(PIN_LED_RXL, LOW);
538-
rxLEDPulse = TX_RX_LED_PULSE_MS;
539-
#endif
540-
541543
armRecv(ep);
542544

543545
usbd.epBank0DisableTransferComplete(ep);

0 commit comments

Comments
 (0)