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

cpu/sam0*: Wrap cortexm_sleep call

This commit is contained in:
Juergen Fitschen 2020-02-21 16:18:36 +01:00
parent ac8a81b8f3
commit 1265efc785
5 changed files with 14 additions and 4 deletions

View File

@ -352,6 +352,16 @@ typedef struct {
*/
void gpio_init_mux(gpio_t pin, gpio_mux_t mux);
/**
* @brief Wrapper for cortexm_sleep calling power management callbacks
*
* @param[in] deep
*/
static inline void sam0_cortexm_sleep(int deep)
{
cortexm_sleep(deep);
}
/**
* @brief Returns the frequency of a GCLK provider.
*

View File

@ -82,5 +82,5 @@ void pm_set(unsigned mode)
break;
}
cortexm_sleep(deep);
sam0_cortexm_sleep(deep);
}

View File

@ -57,5 +57,5 @@ void pm_set(unsigned mode)
/* make sure value has been set */
while (PM->SLEEPCFG.bit.SLEEPMODE != _mode) {}
cortexm_sleep(deep);
sam0_cortexm_sleep(deep);
}

View File

@ -47,5 +47,5 @@ void pm_set(unsigned mode)
while (PM->SLEEPCFG.bit.SLEEPMODE != _mode) {}
}
cortexm_sleep(0);
sam0_cortexm_sleep(0);
}

View File

@ -55,5 +55,5 @@ void pm_set(unsigned mode)
while (PM->SLEEPCFG.bit.SLEEPMODE != _mode) {}
}
cortexm_sleep(0);
sam0_cortexm_sleep(0);
}