Skip to content

Commit d349acc

Browse files
committed
[AVR USB] move leds handling inside USB_Recv function
1 parent 4a9d339 commit d349acc

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

hardware/arduino/avr/cores/arduino/USBCore.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,10 @@ static inline void Recv(volatile u8* data, u8 count)
115115
{
116116
while (count--)
117117
*data++ = UEDATX;
118-
119-
RXLED1; // light the RX LED
120-
RxLEDPulse = TX_RX_LED_PULSE_MS;
121118
}
122119

123120
static inline u8 Recv8()
124121
{
125-
RXLED1; // light the RX LED
126-
RxLEDPulse = TX_RX_LED_PULSE_MS;
127-
128122
return UEDATX;
129123
}
130124

@@ -226,6 +220,9 @@ int USB_Recv(u8 ep, void* d, int len)
226220
if (!_usbConfiguration || len < 0)
227221
return -1;
228222

223+
RXLED1; // light the RX LED
224+
RxLEDPulse = TX_RX_LED_PULSE_MS;
225+
229226
LockEP lock(ep);
230227
u8 n = FifoByteCount();
231228
len = min(n,len);

0 commit comments

Comments
 (0)