Firmware SDK
|
Driver for spirit RF transceiver module. More...
Enumerations | |
enum | twr_spirit1_event_t { TWR_SPIRIT1_EVENT_TX_DONE = 0 , TWR_SPIRIT1_EVENT_RX_DONE = 1 , TWR_SPIRIT1_EVENT_RX_TIMEOUT = 2 } |
Callback events. More... | |
Functions | |
bool | twr_spirit1_init (void) |
Initialize. More... | |
bool | twr_spirit1_deinit (void) |
Deitialize. More... | |
void | twr_spirit1_set_event_handler (void(*event_handler)(twr_spirit1_event_t, void *), void *event_param) |
Set callback function. More... | |
void * | twr_spirit1_get_tx_buffer (void) |
Get TX buffer. More... | |
void | twr_spirit1_set_tx_length (size_t length) |
Set TX buffer length. More... | |
size_t | twr_spirit1_get_tx_length (void) |
Get TX buffer length. More... | |
void * | twr_spirit1_get_rx_buffer (void) |
Get RX buffer. More... | |
size_t | twr_spirit1_get_rx_length (void) |
Get RX buffer length. More... | |
int | twr_spirit1_get_rx_rssi (void) |
Get RSSI. More... | |
void | twr_spirit1_set_rx_timeout (twr_tick_t timeout) |
Set TX timeout. More... | |
void | twr_spirit1_tx (void) |
Enter TX state. | |
void | twr_spirit1_rx (void) |
Enter RX state. | |
void | twr_spirit1_sleep (void) |
Enter sleep state. | |
Driver for spirit RF transceiver module.
enum twr_spirit1_event_t |
Callback events.
Enumerator | |
---|---|
TWR_SPIRIT1_EVENT_TX_DONE | Event is TX done. |
TWR_SPIRIT1_EVENT_RX_DONE | Event is RX done. |
TWR_SPIRIT1_EVENT_RX_TIMEOUT | Event is RX timeout. |
Definition at line 18 of file twr_spirit1.h.
bool twr_spirit1_deinit | ( | void | ) |
Deitialize.
Definition at line 150 of file twr_spirit1.c.
void* twr_spirit1_get_rx_buffer | ( | void | ) |
size_t twr_spirit1_get_rx_length | ( | void | ) |
int twr_spirit1_get_rx_rssi | ( | void | ) |
void* twr_spirit1_get_tx_buffer | ( | void | ) |
size_t twr_spirit1_get_tx_length | ( | void | ) |
bool twr_spirit1_init | ( | void | ) |
Initialize.
Definition at line 98 of file twr_spirit1.c.
Referenced by twr_radio_init().
void twr_spirit1_set_event_handler | ( | void(*)(twr_spirit1_event_t, void *) | event_handler, |
void * | event_param | ||
) |
Set callback function.
[in] | event_handler | Function address |
[in] | event_param | Optional event parameter (can be NULL) |
Definition at line 170 of file twr_spirit1.c.
Referenced by twr_radio_init().
void twr_spirit1_set_rx_timeout | ( | twr_tick_t | timeout | ) |
Set TX timeout.
[in] | timeout | Maximum timeout for receiving |
Definition at line 206 of file twr_spirit1.c.
void twr_spirit1_set_tx_length | ( | size_t | length | ) |
Set TX buffer length.
[in] | length | TX buffer length |
Definition at line 181 of file twr_spirit1.c.