cpu/saml21: pm: set deep flag
Set the deep flag for consistency with other family members.
This commit is contained in:
parent
4eb9b9b9df
commit
3f95d3d2e3
@ -26,16 +26,19 @@
|
|||||||
|
|
||||||
void pm_set(unsigned mode)
|
void pm_set(unsigned mode)
|
||||||
{
|
{
|
||||||
|
int deep = 0;
|
||||||
uint32_t _mode;
|
uint32_t _mode;
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 0:
|
case 0:
|
||||||
DEBUG_PUTS("pm_set(): setting BACKUP mode.");
|
DEBUG_PUTS("pm_set(): setting BACKUP mode.");
|
||||||
_mode = PM_SLEEPCFG_SLEEPMODE_BACKUP;
|
_mode = PM_SLEEPCFG_SLEEPMODE_BACKUP;
|
||||||
|
deep = 1;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
DEBUG_PUTS("pm_set(): setting STANDBY mode.");
|
DEBUG_PUTS("pm_set(): setting STANDBY mode.");
|
||||||
_mode = PM_SLEEPCFG_SLEEPMODE_STANDBY;
|
_mode = PM_SLEEPCFG_SLEEPMODE_STANDBY;
|
||||||
|
deep = 1;
|
||||||
break;
|
break;
|
||||||
default: /* Falls through */
|
default: /* Falls through */
|
||||||
case 2:
|
case 2:
|
||||||
@ -53,5 +56,5 @@ void pm_set(unsigned mode)
|
|||||||
/* make sure value has been set */
|
/* make sure value has been set */
|
||||||
while (PM->SLEEPCFG.bit.SLEEPMODE != _mode) {}
|
while (PM->SLEEPCFG.bit.SLEEPMODE != _mode) {}
|
||||||
|
|
||||||
sam0_cortexm_sleep(0);
|
sam0_cortexm_sleep(deep);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user