Skip to content

Commit 7eb6eeb

Browse files
author
Fabian Schuette
committed
fixes arduino#103 Misleadingly 'else' clause
1 parent 2df9e9c commit 7eb6eeb

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

cores/arduino/USB/USBCore.cpp

+12-4
Original file line numberDiff line numberDiff line change
@@ -684,9 +684,13 @@ static void USB_ISR(void)
684684
// Send the endpoint status
685685
// Check if the endpoint if currently halted
686686
if( isEndpointHalt == 1 )
687-
UDD_Send8(EP0, 1); // TODO
687+
{
688+
UDD_Send8(EP0, 1); // TODO
689+
}
688690
else
689-
UDD_Send8(EP0, 0); // TODO
691+
{
692+
UDD_Send8(EP0, 0); // TODO
693+
}
690694
UDD_Send8(EP0, 0);
691695
}
692696
}
@@ -697,9 +701,13 @@ static void USB_ISR(void)
697701
{
698702
// Enable remote wake-up and send a ZLP
699703
if( isRemoteWakeUpEnabled == 1 )
700-
UDD_Send8(EP0, 1);
704+
{
705+
UDD_Send8(EP0, 1);
706+
}
701707
else
702-
UDD_Send8(EP0, 0);
708+
{
709+
UDD_Send8(EP0, 0);
710+
}
703711
UDD_Send8(EP0, 0);
704712
}
705713
else // if( setup.wValueL == 0) // ENDPOINTHALT

0 commit comments

Comments
 (0)