1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

Merge pull request #14106 from benpicco/cpu/saml1x/pm_deep_flag

cpu/saml1x: pm: set deep flag
This commit is contained in:
Dylan Laduranty 2020-06-17 22:02:34 +02:00 committed by GitHub
commit 00b14cce27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,12 +26,14 @@
void pm_set(unsigned mode)
{
int deep = 0;
uint32_t _mode;
switch (mode) {
case 0:
DEBUG_PUTS("pm_set(): setting STANDBY mode.");
_mode = PM_SLEEPCFG_SLEEPMODE_STANDBY;
deep = 1;
break;
default: /* Falls through */
case 1:
@ -45,5 +47,5 @@ void pm_set(unsigned mode)
/* make sure value has been set */
while (PM->SLEEPCFG.bit.SLEEPMODE != _mode) {}
sam0_cortexm_sleep(0);
sam0_cortexm_sleep(deep);
}