mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/saml21/pm: specify power mode names
This commit is contained in:
parent
d704a1a805
commit
d0c11e568a
@ -35,7 +35,10 @@ extern "C" {
|
||||
* @name Power mode configuration
|
||||
* @{
|
||||
*/
|
||||
#define PM_NUM_MODES (3)
|
||||
#define PM_NUM_MODES (3)
|
||||
#define SAML21_PM_MODE_BACKUP (0) /**< Wakeup by some IRQs possible, but no RAM retention */
|
||||
#define SAML21_PM_MODE_STANDBY (1) /**< Just peripherals clocked by 32K OSC are active */
|
||||
#define SAML21_PM_MODE_IDLE (2) /**< CPU sleeping, peripherals are active */
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -30,18 +30,18 @@ void pm_set(unsigned mode)
|
||||
uint32_t _mode;
|
||||
|
||||
switch (mode) {
|
||||
case 0:
|
||||
case SAML21_PM_MODE_BACKUP:
|
||||
DEBUG_PUTS("pm_set(): setting BACKUP mode.");
|
||||
_mode = PM_SLEEPCFG_SLEEPMODE_BACKUP;
|
||||
deep = 1;
|
||||
break;
|
||||
case 1:
|
||||
case SAML21_PM_MODE_STANDBY:
|
||||
DEBUG_PUTS("pm_set(): setting STANDBY mode.");
|
||||
_mode = PM_SLEEPCFG_SLEEPMODE_STANDBY;
|
||||
deep = 1;
|
||||
break;
|
||||
default: /* Falls through */
|
||||
case 2:
|
||||
case SAML21_PM_MODE_IDLE:
|
||||
DEBUG_PUTS("pm_set(): setting IDLE mode.");
|
||||
#if !defined(PM_SLEEPCFG_SLEEPMODE_IDLE2)
|
||||
_mode = PM_SLEEPCFG_SLEEPMODE_IDLE;
|
||||
|
Loading…
Reference in New Issue
Block a user