ARM functions for busy-wait delay loops.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Convenience functions for busy-wait delay loops | |
#define | cpu_delay_us(delay) delay_cycles_us(delay) |
Delay program execution for at least the specified number of microseconds. More... | |
#define | cpu_delay_ms(delay) delay_cycles_ms(delay) |
Delay program execution for at least the specified number of milliseconds. More... | |
#define | cpu_delay_s(delay) delay_cycles_ms(1000 * delay) |
Delay program execution for at least the specified number of seconds. More... | |
static void | delay_cycles (const uint32_t n) |
Delay loop to delay n number of cycles Delay program execution for at least the specified number of CPU cycles. More... | |
void | delay_cycles_us (uint32_t n) |
Delay loop to delay at least n number of microseconds. More... | |
void | delay_cycles_ms (uint32_t n) |
Delay loop to delay at least n number of milliseconds. More... | |
#define cpu_delay_ms | ( | delay | ) | delay_cycles_ms(delay) |
Delay program execution for at least the specified number of milliseconds.
delay | number of milliseconds to wait |
#define cpu_delay_s | ( | delay | ) | delay_cycles_ms(1000 * delay) |
Delay program execution for at least the specified number of seconds.
delay | number of seconds to wait |
#define cpu_delay_us | ( | delay | ) | delay_cycles_us(delay) |
Delay program execution for at least the specified number of microseconds.
delay | number of microseconds to wait |
|
inlinestatic |
Delay loop to delay n number of cycles Delay program execution for at least the specified number of CPU cycles.
n | Number of cycles to delay |
References n.
void delay_cycles_ms | ( | uint32_t | n | ) |
Delay loop to delay at least n number of milliseconds.
n | Number of milliseconds to wait |
References cycles_per_ms, and delay_cycles.
Referenced by rf212_init(), and rf233_init().
void delay_cycles_us | ( | uint32_t | n | ) |
Delay loop to delay at least n number of microseconds.
n | Number of microseconds to wait |
References cycles_per_us, and delay_cycles.