Timers
SPDX-License-Identifier: Apache-2.0
The Zephyr RTOS shall provide a mechanism to define and statically (i.e. compile time) initialize timers.
When initializing a timer, the Zephyr RTOS shall support setting a function that gets called when the timer expires.
When initializing a timer, the Zephyr RTOS shall support setting a function that gets called when a running timer is stopped.
The Zephyr RTOS shall provide a mechanism to define and initialize timers at run time.
The Zephyr RTOS shall provide a mechanism to start a timer for a specific duration and periodicity.
The Zephyr RTOS shall provide a mechanism to stop a running timer.
The Zephyr RTOS shall provide a mechanism to read the number of times a timer has expired and then reset this number to 0.
When a timer is initialized, started or synchronized to a thread, the Zephyr RTOS shall reset the timer number of times it has expired to 0.
The Zephyr RTOS shall provide a mechanism to synchronize a thread to a timer and then block the thread execution until any of the following conditions is satisfied: - The timer is stopped - The timer number of times it has expired is superior to 0
The Zephyr RTOS shall provide a mechanism to get a timer's next expiration time in system ticks.
The Zephyr RTOS shall provide a mechanism to get a timer's remaining time until its next expiry in system ticks.
The Zephyr RTOS shall provide a mechanism to get the timer's remaining time until its next expiry in milliseconds.
The Zephyr RTOS shall support adding user defined data to a timer.
The Zephyr RTOS shall support retrieving user defined data from a timer.
When a timer expiry function is called, the Zephyr RTOS shall do so in the interrupt context.