Timer#
Functions#
void
Called for every millisecond and increments the timer counter.
uint32_t
rsi_timer_read_counter(void)
Read the timer counter value.
void
rsi_init_timer(rsi_timer_instance_t *rsi_timer, uint32_t duration)
Initialize the timer instance.
int32_t
rsi_timer_expired(rsi_timer_instance_t *timer)
Check if the timer instance is expired.
uint32_t
rsi_timer_left(rsi_timer_instance_t *timer)
Get the remaining time for timer expiry.
Function Documentation#
rsi_timer_expiry_interrupt_handler#
void rsi_timer_expiry_interrupt_handler (void )
Called for every millisecond and increments the timer counter.
Parameters
[in] |
Returns
void
Definition at line
37
of file driver/rsi_timer.c
rsi_timer_read_counter#
uint32_t rsi_timer_read_counter (void )
Read the timer counter value.
Parameters
[in] |
Returns
Timer counter value in milliseconds
Definition at line
58
of file driver/rsi_timer.c
rsi_init_timer#
void rsi_init_timer (rsi_timer_instance_t * rsi_timer, uint32_t duration)
Initialize the timer instance.
Parameters
[in] | rsi_timer | - timer instance |
[in] | duration | - duration in milli seconds |
Returns
Void
Definition at line
73
of file driver/rsi_timer.c
References rsi_timer_instance_s::start_time , rsi_timer_read_counter , and rsi_timer_instance_s::timeout
Referenced by rsi_req_wakeup , rsi_wireless_init , rsi_bl_upgrade_firmware , rsi_device_init , rsi_tx_event_handler , rsi_rx_event_handler , and rsi_semaphore_wait
rsi_timer_expired#
int32_t rsi_timer_expired (rsi_timer_instance_t * timer)
Check if the timer instance is expired.
Parameters
[in] | timer | - timer instance |
Returns
1 - if timer is expired
0 - if timer is not expired
Definition at line
89
of file driver/rsi_timer.c
References rsi_timer_read_counter , rsi_timer_instance_s::start_time , and rsi_timer_instance_s::timeout
Referenced by rsi_req_wakeup , rsi_wireless_init , rsi_bl_upgrade_firmware , rsi_device_init , rsi_tx_event_handler , rsi_rx_event_handler , and rsi_semaphore_wait
rsi_timer_left#
uint32_t rsi_timer_left (rsi_timer_instance_t * timer)
Get the remaining time for timer expiry.
Parameters
[in] | timer | - timer instance |
Returns
Positive value - Time left to expire
0 - Timer is expired
Definition at line
107
of file driver/rsi_timer.c
References rsi_timer_instance_s::timeout , rsi_timer_read_counter , and rsi_timer_instance_s::start_time