Skip to content

Commit c7894e8

Browse files
cmagliefacchinm
authored andcommitted
USBDevice: immediately ack EOR (it's just a bit more readable)
1 parent 639303d commit c7894e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cores/arduino/USB/USBCore.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -801,22 +801,22 @@ bool USBDeviceClass::handleStandardSetup(USBSetup &setup)
801801

802802
void USBDeviceClass::ISRHandler()
803803
{
804-
805804
if (_pack_message == true) {
806805
return;
807806
}
807+
808808
// End-Of-Reset
809809
if (usbd.isEndOfResetInterrupt())
810810
{
811+
usbd.ackEndOfResetInterrupt();
812+
811813
// Configure EP 0
812814
initEP(0, USB_ENDPOINT_TYPE_CONTROL);
813815

814816
// Enable Setup-Received interrupt
815817
usbd.epBank0EnableSetupReceived(0);
816818

817819
_usbConfiguration = 0;
818-
819-
usbd.ackEndOfResetInterrupt();
820820
}
821821

822822
// Start-Of-Frame

0 commit comments

Comments
 (0)