Modules | |
Common SW Timer | |
Implements the software Algorithm for Timer Handling in the Stack. | |
Typedefs | |
typedef enum ps_type_tag | ps_type_t |
IDs for persistence storage type. More... | |
typedef enum timeout_type_tag | timeout_type_t |
Timeout type. More... | |
Enumerations | |
enum | ps_type_tag { INTERN_EEPROM, EXTERN_EEPROM } |
IDs for persistence storage type. More... | |
enum | timeout_type_tag { TIMEOUT_RELATIVE, TIMEOUT_ABSOLUTE } |
Timeout type. More... | |
Functions | |
uint16_t | pal_generate_rand_seed (void) |
Generation of random seed for function srand() in case this is not supported by the transceiver (e.g. More... | |
void | pal_get_current_time (uint32_t *current_time) |
Gets current time. More... | |
bool | pal_is_timer_running (uint8_t timer_id) |
Checks if the timer of requested timer identifier is running. More... | |
retval_t | pal_ps_get (ps_type_t ps_type, uint16_t start_addr, uint16_t length, void *value) |
Get data from persistence storage. More... | |
retval_t | pal_ps_set (uint16_t start_addr, uint16_t length, void *value) |
Write data to persistence storage. More... | |
retval_t | pal_start_high_priority_timer (uint8_t timer_id, uint16_t timer_count, FUNC_PTR timer_cb, void *param_cb) |
Starts high priority timer. More... | |
retval_t | pal_stop_high_priority_timer (uint8_t timer_id) |
Stops a high priority timer. More... | |
void | pal_task (void) |
Services timer and sio handler. More... | |
retval_t | pal_timer_get_id (uint8_t *timer_id) |
retval_t | pal_timer_start (uint8_t timer_id, uint32_t timer_count, timeout_type_t timeout_type, FUNC_PTR timer_cb, void *param_cb) |
Start regular timer. More... | |
retval_t | pal_timer_stop (uint8_t timer_id) |
Stops a running timer. More... | |
typedef enum ps_type_tag ps_type_t |
IDs for persistence storage type.
typedef enum timeout_type_tag timeout_type_t |
Timeout type.
enum ps_type_tag |
enum timeout_type_tag |
uint16_t pal_generate_rand_seed | ( | void | ) |
Generation of random seed for function srand() in case this is not supported by the transceiver (e.g.
AT86RF230)
void pal_get_current_time | ( | uint32_t * | current_time | ) |
Gets current time.
This function returns the current time.
[out] | current_time | Returns current system time |
bool pal_is_timer_running | ( | uint8_t | timer_id | ) |
Checks if the timer of requested timer identifier is running.
This function checks if the timer of requested timer identifier is running.
timer_id | Timer identifier |
Get data from persistence storage.
[in] | ps_type | Persistence storage type |
[in] | start_addr | Start offset within EEPROM |
[in] | length | Number of bytes to read from EEPROM |
[out] | value | Data from persistence storage |
retval_t pal_ps_set | ( | uint16_t | start_addr, |
uint16_t | length, | ||
void * | value | ||
) |
Write data to persistence storage.
[in] | start_addr | Start address offset within EEPROM |
[in] | length | Number of bytes to be written to EEPROM |
[in] | value | Data to persistence storage |
retval_t pal_start_high_priority_timer | ( | uint8_t | timer_id, |
uint16_t | timer_count, | ||
FUNC_PTR | timer_cb, | ||
void * | param_cb | ||
) |
Starts high priority timer.
This function starts a high priority timer for the specified timeout.
timer_id | Timer identifier |
timer_count | Timeout in microseconds |
timer_cb | Callback handler invoked upon timer expiry |
param_cb | Argument for the callback handler |
retval_t pal_stop_high_priority_timer | ( | uint8_t | timer_id | ) |
Stops a high priority timer.
This function stops a high priority timer.
timer_id | Timer identifier |
void pal_task | ( | void | ) |
Services timer and sio handler.
This function calls sio & timer handling functions.
retval_t pal_timer_get_id | ( | uint8_t * | timer_id | ) |
retval_t pal_timer_start | ( | uint8_t | timer_id, |
uint32_t | timer_count, | ||
timeout_type_t | timeout_type, | ||
FUNC_PTR | timer_cb, | ||
void * | param_cb | ||
) |
Start regular timer.
This function starts a regular timer and installs the corresponding callback function handle the timeout event.
timer_id | Timer identifier |
timer_count | Timeout in microseconds |
timeout_type | TIMEOUT_RELATIVE or TIMEOUT_ABSOLUTE |
timer_cb | Callback handler invoked upon timer expiry |
param_cb | Argument for the callback handler |
retval_t pal_timer_stop | ( | uint8_t | timer_id | ) |
Stops a running timer.
This function stops a running timer with specified timer_id
timer_id | Timer identifier |