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

Driver for TD1207R SigFox modem. More...

Typedefs

typedef struct bc_td1207r_t bc_td1207r_t
 TD1207R instance.
 

Enumerations

enum  bc_td1207r_event_t {
  BC_TD1207R_EVENT_READY = 0,
  BC_TD1207R_EVENT_ERROR = 1,
  BC_TD1207R_EVENT_SEND_RF_FRAME_START = 2,
  BC_TD1207R_EVENT_SEND_RF_FRAME_DONE = 3
}
 Callback events. More...
 

Functions

void bc_td1207r_init (bc_td1207r_t *self, bc_gpio_channel_t reset_signal, bc_uart_channel_t uart_channel)
 Initialize TD1207R. More...
 
void bc_td1207r_set_event_handler (bc_td1207r_t *self, void(*event_handler)(bc_td1207r_t *, bc_td1207r_event_t, void *), void *event_param)
 Set callback function. More...
 
bool bc_td1207r_is_ready (bc_td1207r_t *self)
 Check if modem is ready for commands. More...
 
bool bc_td1207r_send_rf_frame (bc_td1207r_t *self, const void *buffer, size_t length)
 Send RF frame command. More...
 

Detailed Description

Driver for TD1207R SigFox modem.

Enumeration Type Documentation

Callback events.

Enumerator
BC_TD1207R_EVENT_READY 

Ready event.

BC_TD1207R_EVENT_ERROR 

Error event.

BC_TD1207R_EVENT_SEND_RF_FRAME_START 

RF frame transmission started event.

BC_TD1207R_EVENT_SEND_RF_FRAME_DONE 

RF frame transmission finished event.

Definition at line 21 of file bc_td1207r.h.

Function Documentation

void bc_td1207r_init ( bc_td1207r_t self,
bc_gpio_channel_t  reset_signal,
bc_uart_channel_t  uart_channel 
)

Initialize TD1207R.

Parameters
[in]selfInstance
[in]reset_signalGPIO channel where RST signal is connected
[in]uart_channelUART channel where TX and RX signals are connected

Definition at line 13 of file bc_td1207r.c.

Referenced by bc_module_sigfox_init().

Here is the call graph for this function:

Here is the caller graph for this function:

bool bc_td1207r_is_ready ( bc_td1207r_t self)

Check if modem is ready for commands.

Parameters
[in]selfInstance
Returns
true If ready
false If not ready

Definition at line 42 of file bc_td1207r.c.

Referenced by bc_module_sigfox_is_ready(), and bc_td1207r_send_rf_frame().

Here is the caller graph for this function:

bool bc_td1207r_send_rf_frame ( bc_td1207r_t self,
const void *  buffer,
size_t  length 
)

Send RF frame command.

Parameters
[in]selfInstance
[in]bufferPointer to data to be transmitted
[in]lengthLength of data to be transmitted in bytes (must be from 1 to 12 bytes)
Returns
true If command was accepted for processing
false If command was denied for processing

Definition at line 47 of file bc_td1207r.c.

Referenced by bc_module_sigfox_send_rf_frame().

Here is the call graph for this function:

Here is the caller graph for this function:

void bc_td1207r_set_event_handler ( bc_td1207r_t self,
void(*)(bc_td1207r_t *, bc_td1207r_event_t, void *)  event_handler,
void *  event_param 
)

Set callback function.

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

Definition at line 36 of file bc_td1207r.c.

Referenced by bc_module_sigfox_init().

Here is the caller graph for this function: