59#define PX_SYSTMR_TICKS_PER_SEC PX_SYSCLK_CFG_TICKS_PER_SEC
68 PX_SYSTMR_STOPPED = 0,
177#define PX_SYSTMR_MS_TO_TICKS(delay_in_ms) \
178 PX_UDIV_ROUND((delay_in_ms) * PX_SYSTMR_TICKS_PER_SEC, 1000ul)
px_systmr_state_t state
State of timer: STOPPED, STARTED or EXPIRED.
px_systmr_ticks_t delay_in_ticks
Timer delay, used for subsequent timer restarts/resets.
px_systmr_ticks_t start_tick
Tick when timer started.
px_systmr_ticks_t px_systmr_ticks_elapsed(px_systmr_t *systmr)
Return the number of ticks that have elapsed sinced the timer has been started.
bool px_systmr_has_started(const px_systmr_t *systmr)
See if a timer has been started.
void px_systmr_stop(px_systmr_t *systmr)
Stop a running timer.
void px_systmr_start(px_systmr_t *systmr, const px_systmr_ticks_t delay_in_ticks)
Start a timer.
px_sysclk_ticks_t px_systmr_ticks_t
Size definition of the tick counter.
void px_systmr_restart(px_systmr_t *systmr)
Restart a timer with the delay set with px_systmr_start().
void px_systmr_reset(px_systmr_t *systmr)
Reset a timer with the delay set with px_systmr_start().
void px_systmr_wait(const px_systmr_ticks_t delay_in_ticks)
Blocking wait for specified number of ticks.
px_systmr_state_t
Timer state.
bool px_systmr_has_expired(px_systmr_t *systmr)
See if a timer has expired.
Structure to track state of a timer.
uint32_t px_sysclk_ticks_t
Size definition of the tick counter.