Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_spirit

Driver for spirit RF transceiver module. More...

Enumerations

enum  bc_spirit1_event_t {
  BC_SPIRIT1_EVENT_TX_DONE = 0,
  BC_SPIRIT1_EVENT_RX_DONE = 1,
  BC_SPIRIT1_EVENT_RX_TIMEOUT = 2
}
 Callback events. More...
 

Functions

bool bc_spirit1_init (void)
 Initialize. More...
 
bool bc_spirit1_deinit (void)
 Deitialize. More...
 
void bc_spirit1_set_event_handler (void(*event_handler)(bc_spirit1_event_t, void *), void *event_param)
 Set callback function. More...
 
void * bc_spirit1_get_tx_buffer (void)
 Get TX buffer. More...
 
void bc_spirit1_set_tx_length (size_t length)
 Set TX buffer length. More...
 
size_t bc_spirit1_get_tx_length (void)
 Get TX buffer length. More...
 
void * bc_spirit1_get_rx_buffer (void)
 Get RX buffer. More...
 
size_t bc_spirit1_get_rx_length (void)
 Get RX buffer length. More...
 
int bc_spirit1_get_rx_rssi (void)
 Get RSSI. More...
 
void bc_spirit1_set_rx_timeout (bc_tick_t timeout)
 Set TX timeout. More...
 
void bc_spirit1_tx (void)
 Enter TX state.
 
void bc_spirit1_rx (void)
 Enter RX state.
 
void bc_spirit1_sleep (void)
 Enter sleep state.
 

Detailed Description

Driver for spirit RF transceiver module.

Enumeration Type Documentation

Callback events.

Enumerator
BC_SPIRIT1_EVENT_TX_DONE 

Event is TX done.

BC_SPIRIT1_EVENT_RX_DONE 

Event is RX done.

BC_SPIRIT1_EVENT_RX_TIMEOUT 

Event is RX timeout.

Definition at line 18 of file bc_spirit1.h.

Function Documentation

bool bc_spirit1_deinit ( void  )

Deitialize.

Returns
true On success
false On failure

Definition at line 150 of file bc_spirit1.c.

Here is the call graph for this function:

void* bc_spirit1_get_rx_buffer ( void  )

Get RX buffer.

Returns
Pointer to buffer

Definition at line 191 of file bc_spirit1.c.

size_t bc_spirit1_get_rx_length ( void  )

Get RX buffer length.

Returns
Size of buffer

Definition at line 196 of file bc_spirit1.c.

int bc_spirit1_get_rx_rssi ( void  )

Get RSSI.

Returns
RSSI

Definition at line 201 of file bc_spirit1.c.

void* bc_spirit1_get_tx_buffer ( void  )

Get TX buffer.

Returns
Pointer to buffer

Definition at line 176 of file bc_spirit1.c.

size_t bc_spirit1_get_tx_length ( void  )

Get TX buffer length.

Returns
Size of buffer

Definition at line 186 of file bc_spirit1.c.

bool bc_spirit1_init ( void  )

Initialize.

Returns
true On success
false On failure

Definition at line 98 of file bc_spirit1.c.

Referenced by bc_radio_init().

Here is the call graph for this function:

Here is the caller graph for this function:

void bc_spirit1_set_event_handler ( void(*)(bc_spirit1_event_t, void *)  event_handler,
void *  event_param 
)

Set callback function.

Parameters
[in]event_handlerFunction address
[in]event_paramOptional event parameter (can be NULL)

Definition at line 170 of file bc_spirit1.c.

Referenced by bc_radio_init().

Here is the caller graph for this function:

void bc_spirit1_set_rx_timeout ( bc_tick_t  timeout)

Set TX timeout.

Parameters
[in]timeoutMaximum timeout for receiving

Definition at line 206 of file bc_spirit1.c.

Here is the call graph for this function:

void bc_spirit1_set_tx_length ( size_t  length)

Set TX buffer length.

Parameters
[in]lengthTX buffer length

Definition at line 181 of file bc_spirit1.c.