You've already forked ArduinoLowPower
mirror of
https://github.com/arduino-libraries/ArduinoLowPower.git
synced 2025-07-01 19:21:38 +03:00
Sleep also triggers USB subsystem standly
Requires SAMD core >= 1.6.14
This commit is contained in:
@ -14,6 +14,7 @@ void ArduinoLowPowerClass::idle(uint32_t millis) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ArduinoLowPowerClass::sleep() {
|
void ArduinoLowPowerClass::sleep() {
|
||||||
|
USBDevice.standby();
|
||||||
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
|
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
|
||||||
__DSB();
|
__DSB();
|
||||||
__WFI();
|
__WFI();
|
||||||
|
Reference in New Issue
Block a user