This module defines Low Power Timer Abstraction Layer for the 802.15.4 driver. More...
Functions | |
void | nrf_802154_lp_timer_init (void) |
Initialize the Timer. | |
void | nrf_802154_lp_timer_deinit (void) |
Uninitialize the Timer. | |
void | nrf_802154_lp_timer_critical_section_enter (void) |
Enter critical section of the timer. More... | |
void | nrf_802154_lp_timer_critical_section_exit (void) |
Exit critical section of the timer. More... | |
uint32_t | nrf_802154_lp_timer_time_get (void) |
Get current time. More... | |
uint32_t | nrf_802154_lp_timer_granularity_get (void) |
Get granularity of currently used timer. More... | |
void | nrf_802154_lp_timer_start (uint32_t t0, uint32_t dt) |
Start one-shot timer that expires at specified time. More... | |
void | nrf_802154_lp_timer_stop (void) |
Stop currently running timer. | |
bool | nrf_802154_lp_timer_is_running (void) |
Check if timer is currently running. More... | |
void | nrf_802154_lp_timer_sync_start_now (void) |
Start one-shot synchronization timer that expires at nearest possible timepoint. More... | |
void | nrf_802154_lp_timer_sync_start_at (uint32_t t0, uint32_t dt) |
Start one-shot synchronization timer that expires at specified time. More... | |
void | nrf_802154_lp_timer_sync_stop (void) |
Stop currently running synchronization timer. | |
uint32_t | nrf_802154_lp_timer_sync_event_get (void) |
Get event used to synchronize this timer with HP Timer. More... | |
uint32_t | nrf_802154_lp_timer_sync_time_get (void) |
Get timestamp of the synchronization event. More... | |
void | nrf_802154_lp_timer_fired (void) |
Callback executed when timer expires. | |
void | nrf_802154_lp_timer_synchronized (void) |
Callback executed when synchronization timer expires. | |
This module defines Low Power Timer Abstraction Layer for the 802.15.4 driver.
Low Power Timer Abstraction Layer interface for the 802.15.4 driver.
Low Power Timer Abstraction Layer is an abstraction layer of timer that is meant to be used by the nRF 802.15.4 driver. This timer should provide low latency (max 100 us) in order to allow implementation in the driver code features like:
void nrf_802154_lp_timer_critical_section_enter | ( | void | ) |
Enter critical section of the timer.
In critical section timer cannot execute
void nrf_802154_lp_timer_critical_section_exit | ( | void | ) |
Exit critical section of the timer.
In critical section timer cannot execute
uint32_t nrf_802154_lp_timer_granularity_get | ( | void | ) |
Get granularity of currently used timer.
This function may be used to round up/down time calculations.
bool nrf_802154_lp_timer_is_running | ( | void | ) |
Check if timer is currently running.
true | Timer is running. |
false | Timer is not running. |
void nrf_802154_lp_timer_start | ( | uint32_t | t0, |
uint32_t | dt | ||
) |
Start one-shot timer that expires at specified time.
Start one-shot timer that will expire dt
microseconds after t0
time. If timer is running when this function is called, previously running timer will be stopped automatically.
On timer expiration
[in] | t0 | Number of microseconds representing timer start time. |
[in] | dt | Time of timer expiration as time elapsed from t0 [us]. |
uint32_t nrf_802154_lp_timer_sync_event_get | ( | void | ) |
Get event used to synchronize this timer with HP Timer.
void nrf_802154_lp_timer_sync_start_at | ( | uint32_t | t0, |
uint32_t | dt | ||
) |
Start one-shot synchronization timer that expires at specified time.
Start one-shot synchronization timer that will expire dt
microseconds after t0
time.
On timer expiration nrf_802154_lp_timer_synchronized function will be called and event returned by nrf_802154_lp_timer_sync_event_get will be triggered.
[in] | t0 | Number of microseconds representing timer start time. |
[in] | dt | Time of timer expiration as time elapsed from t0 [us]. |
void nrf_802154_lp_timer_sync_start_now | ( | void | ) |
Start one-shot synchronization timer that expires at nearest possible timepoint.
On timer expiration nrf_802154_lp_timer_synchronized function will be called and event returned by nrf_802154_lp_timer_sync_event_get will be triggered.
uint32_t nrf_802154_lp_timer_sync_time_get | ( | void | ) |
Get timestamp of the synchronization event.
uint32_t nrf_802154_lp_timer_time_get | ( | void | ) |
Get current time.
Prior to getting current time, Timer must be initialized