Skip to content

Commit

Permalink
Sleep also triggers USB subsystem standly
Browse files Browse the repository at this point in the history
Requires SAMD core >= 1.6.14
  • Loading branch information
facchinm committed Apr 4, 2017
1 parent e0fcfbd commit 10471dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ArduinoLowPower.cpp
Expand Up @@ -14,6 +14,7 @@ void ArduinoLowPowerClass::idle(uint32_t millis) {
}

void ArduinoLowPowerClass::sleep() {
USBDevice.standby();
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
__DSB();
__WFI();
Expand Down

3 comments on commit 10471dd

@tplooker
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I have just download this library to test it and I am getting no such method on my version of the USBDeviceClass "standby()" are you able to provide details on what version I need for this aspect to be compatible?

@facchinm
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tplooker ,
the USB standby feature was implemented here (/arduino/ArduinoCore-samd@b9ac48c) and published with SAMD core 1.6.14. You only need to update SAMD core and it will work correctly 🙂

@tplooker
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thankyou for such a prompt reply!

Please sign in to comment.