1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/saml21: pm: set deep flag

Set the deep flag for consistency with other family members.
This commit is contained in:
Benjamin Valentin 2020-02-24 19:25:08 +01:00 committed by Benjamin Valentin
parent 4eb9b9b9df
commit 3f95d3d2e3

View File

@ -26,16 +26,19 @@
void pm_set(unsigned mode)
{
int deep = 0;
uint32_t _mode;
switch (mode) {
case 0:
DEBUG_PUTS("pm_set(): setting BACKUP mode.");
_mode = PM_SLEEPCFG_SLEEPMODE_BACKUP;
deep = 1;
break;
case 1:
DEBUG_PUTS("pm_set(): setting STANDBY mode.");
_mode = PM_SLEEPCFG_SLEEPMODE_STANDBY;
deep = 1;
break;
default: /* Falls through */
case 2:
@ -53,5 +56,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);
}