We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 963ff55 + fca1a1c commit 20e58fcCopy full SHA for 20e58fc
libraries/USBDevice/USBDevice/USBHAL_LPC11U.cpp
@@ -668,17 +668,17 @@ void USBHAL::usbisr(void) {
668
if (LPC_USB->DEVCMDSTAT & DSUS_C) {
669
// Suspend status changed
670
LPC_USB->DEVCMDSTAT = devCmdStat | DSUS_C;
671
- if((LPC_USB->DEVCMDSTAT & DSUS) != 0) {
+ if (LPC_USB->DEVCMDSTAT & DSUS) {
672
suspendStateChanged(1);
673
+ } else {
674
+ suspendStateChanged(0);
675
}
676
677
678
if (LPC_USB->DEVCMDSTAT & DRES_C) {
679
// Bus reset
680
LPC_USB->DEVCMDSTAT = devCmdStat | DRES_C;
681
- suspendStateChanged(0);
-
682
// Disable endpoints > 0
683
disableEndpoints();
684
0 commit comments