OS Tick¶
The hardware independent interface to set up interrupt timers or halt CPU in terms of OS ticks.
Description¶
Set up the periodic timer to interrupt at a frequency of ‘os_ticks_per_sec’ using the following function call where ‘prio’ is the cpu-specific priority of the periodic timer interrupt.
void os_tick_init(uint32_t os_ticks_per_sec, int prio);
You can halt CPU for up to n
ticks:
void os_tick_idle(os_time_t n);
The function implementations are in the mcu-specific directories such as
hw/mcu/nordic/nrf51xxx/src/hal_os_tick.c
.
API¶
-
void
os_tick_init
(uint32_t os_ticks_per_sec, int prio)¶ Set up the periodic timer to interrupt at a frequency of ‘os_ticks_per_sec’.
‘prio’ is the cpu-specific priority of the periodic timer interrupt.
- Parameters
os_ticks_per_sec
: Frequency of the OS tick timerprio
: Priority of the OS tick timer