Skip to content

Commit 07ef730

Browse files
committed
Removed the !SerialUSB test before entering sleep mode.
This will return false even if the USB is connected. It only returns true if the COM port has been opened.
1 parent c8ebd8a commit 07ef730

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/RTCZero.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,9 @@ void RTCZero::detachInterrupt()
109109
void RTCZero::standbyMode()
110110
{
111111
// Entering standby mode when connected
112-
// via the native USB port causes issues
113-
if (!SerialUSB) {
114-
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
115-
__WFI();
116-
}
112+
// via the native USB port causes issues.
113+
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
114+
__WFI();
117115
}
118116

119117
/*

0 commit comments

Comments
 (0)