cpu/cortexm: s/cpu_sleep_until_.../cortexm_sle.../
This commit is contained in:
parent
7364192241
commit
f875c3efc2
@ -76,7 +76,7 @@ static inline void cpu_print_last_instruction(void)
|
|||||||
* This function is meant to be used for short periods of time, where it is not
|
* This function is meant to be used for short periods of time, where it is not
|
||||||
* feasible to switch to the idle thread and back.
|
* feasible to switch to the idle thread and back.
|
||||||
*/
|
*/
|
||||||
static inline void cpu_sleep_until_event(void)
|
static inline void cortexm_sleep_until_event(void)
|
||||||
{
|
{
|
||||||
__WFE();
|
__WFE();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@ void hwrng_read(void *buf, unsigned int num)
|
|||||||
while (count < num) {
|
while (count < num) {
|
||||||
/* sleep until number is generated */
|
/* sleep until number is generated */
|
||||||
while (NRF_RNG->EVENTS_VALRDY == 0) {
|
while (NRF_RNG->EVENTS_VALRDY == 0) {
|
||||||
cpu_sleep_until_event();
|
cortexm_sleep_until_event();
|
||||||
}
|
}
|
||||||
|
|
||||||
b[count++] = (uint8_t)NRF_RNG->VALUE;
|
b[count++] = (uint8_t)NRF_RNG->VALUE;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user