Module that defines the Low Power Timer Abstraction Layer for the 802.15.4 driver. More...
Functions | |
void | nrf_802154_lp_timer_init (void) |
Initializes the Timer. | |
void | nrf_802154_lp_timer_deinit (void) |
Deinitializes the Timer. | |
void | nrf_802154_lp_timer_critical_section_enter (void) |
Enters the critical section of the timer. More... | |
void | nrf_802154_lp_timer_critical_section_exit (void) |
Exits the critical section of the timer. More... | |
uint32_t | nrf_802154_lp_timer_time_get (void) |
Gets the current time. More... | |
uint32_t | nrf_802154_lp_timer_granularity_get (void) |
Gets the granularity of the timer. More... | |
void | nrf_802154_lp_timer_start (uint32_t t0, uint32_t dt) |
Starts a one-shot timer that expires at the specified time. More... | |
void | nrf_802154_lp_timer_stop (void) |
Stops the currently running timer. | |
bool | nrf_802154_lp_timer_is_running (void) |
Checks if the timer is currently running. More... | |
void | nrf_802154_lp_timer_sync_start_now (void) |
Starts a one-shot synchronization timer that expires at the nearest possible timepoint. More... | |
void | nrf_802154_lp_timer_sync_start_at (uint32_t t0, uint32_t dt) |
Starts a one-shot synchronization timer that expires at the specified time. More... | |
void | nrf_802154_lp_timer_sync_stop (void) |
Stops the currently running synchronization timer. | |
uint32_t | nrf_802154_lp_timer_sync_event_get (void) |
Gets the event used to synchronize this timer with the HP Timer. More... | |
uint32_t | nrf_802154_lp_timer_sync_time_get (void) |
Gets the timestamp of the synchronization event. More... | |
void | nrf_802154_lp_timer_fired (void) |
Callback function executed when the timer expires. | |
void | nrf_802154_lp_timer_synchronized (void) |
Callback function executed when the synchronization timer expires. | |
Module that defines the Low Power Timer Abstraction Layer for the 802.15.4 driver.
Low Power Timer Abstraction Layer interface for the 802.15.4 driver.
The Low Power Timer Abstraction Layer is an abstraction layer of the timer that is meant to be used by the nRF 802.15.4 driver. This timer is intended to provide low latency (max. 100 microseconds) to allow the implementation of the following features in the driver code:
void nrf_802154_lp_timer_critical_section_enter | ( | void | ) |
Enters the critical section of the timer.
In the critical section, the timer cannot execute the nrf_802154_lp_timer_fired() function.
void nrf_802154_lp_timer_critical_section_exit | ( | void | ) |
Exits the critical section of the timer.
In the critical section, the timer cannot execute the nrf_802154_lp_timer_fired() function.
uint32_t nrf_802154_lp_timer_granularity_get | ( | void | ) |
Gets the granularity of the timer.
This function can be used to round up or round down the time calculations.
bool nrf_802154_lp_timer_is_running | ( | void | ) |
Checks if the 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 | ||
) |
Starts a one-shot timer that expires at the specified time.
This function starts a one-shot timer that will expire dt
microseconds after t0
time. If the timer is running when this function is called, the running timer is stopped automatically.
On timer expiration, the nrf_802154_lp_timer_fired function will be called. The timer stops automatically after the expiration.
[in] | t0 | Number of microseconds representing timer start time. |
[in] | dt | Time of the timer expiration as time elapsed from t0 , in microseconds. |
uint32_t nrf_802154_lp_timer_sync_event_get | ( | void | ) |
Gets the event used to synchronize this timer with the HP Timer.
void nrf_802154_lp_timer_sync_start_at | ( | uint32_t | t0, |
uint32_t | dt | ||
) |
Starts a one-shot synchronization timer that expires at the specified time.
This function starts a one-shot synchronization timer that expires dt
microseconds after t0
time.
On timer expiration, nrf_802154_lp_timer_synchronized function is called and the event returned by nrf_802154_lp_timer_sync_event_get is triggered.
[in] | t0 | Number of microseconds that represents the timer start time. |
[in] | dt | Time of the timer expiration as time elapsed from t0 , in microseconds. |
void nrf_802154_lp_timer_sync_start_now | ( | void | ) |
Starts a one-shot synchronization timer that expires at the nearest possible timepoint.
On timer expiration, the nrf_802154_lp_timer_synchronized function is called and the event returned by nrf_802154_lp_timer_sync_event_get is triggered.
uint32_t nrf_802154_lp_timer_sync_time_get | ( | void | ) |
Gets the timestamp of the synchronization event.
uint32_t nrf_802154_lp_timer_time_get | ( | void | ) |
Gets the current time.