mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/samd5x: allow to block IDLE mode
Make it possible to prevent the CPU clock from stopping.
This commit is contained in:
parent
6849e33854
commit
7c3bfb980e
@ -53,7 +53,11 @@ extern "C" {
|
||||
* @name Power mode configuration
|
||||
* @{
|
||||
*/
|
||||
#define PM_NUM_MODES (3)
|
||||
#define PM_NUM_MODES 4 /**< Backup, Hibernate, Standby, Idle */
|
||||
|
||||
#ifndef PM_BLOCKER_INITIAL
|
||||
#define PM_BLOCKER_INITIAL 0x00010101 /**< Block all modes but Idle */
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -45,11 +45,13 @@ void pm_set(unsigned mode)
|
||||
_mode = PM_SLEEPCFG_SLEEPMODE_STANDBY;
|
||||
deep = 1;
|
||||
break;
|
||||
default: /* Falls through */
|
||||
case 3:
|
||||
DEBUG_PUTS("pm_set(): setting IDLE2 mode.");
|
||||
_mode = PM_SLEEPCFG_SLEEPMODE_IDLE2;
|
||||
break;
|
||||
default:
|
||||
/* no sleep */
|
||||
return;
|
||||
}
|
||||
|
||||
/* write sleep configuration */
|
||||
|
Loading…
Reference in New Issue
Block a user