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

Driver for WSSFM10R1AT SigFox modem. More...

Typedefs

typedef struct bc_wssfm10r1at_t bc_wssfm10r1at_t
 WSSFM10R1AT instance.
 

Enumerations

enum  bc_wssfm10r1at_event_t {
  BC_WSSFM10R1AT_EVENT_READY = 0,
  BC_WSSFM10R1AT_EVENT_ERROR = 1,
  BC_WSSFM10R1AT_EVENT_SEND_RF_FRAME_START = 2,
  BC_WSSFM10R1AT_EVENT_SEND_RF_FRAME_DONE = 3,
  BC_WSSFM10R1AT_EVENT_READ_DEVICE_ID = 4,
  BC_WSSFM10R1AT_EVENT_READ_DEVICE_PAC = 5
}
 Callback events. More...
 

Functions

void bc_wssfm10r1at_init (bc_wssfm10r1at_t *self, bc_gpio_channel_t reset_signal, bc_uart_channel_t uart_channel)
 Initialize WSSFM10R1AT. More...
 
void bc_wssfm10r1at_set_event_handler (bc_wssfm10r1at_t *self, void(*event_handler)(bc_wssfm10r1at_t *, bc_wssfm10r1at_event_t, void *), void *event_param)
 Set callback function. More...
 
bool bc_wssfm10r1at_is_ready (bc_wssfm10r1at_t *self)
 Check if modem is ready for commands. More...
 
bool bc_wssfm10r1at_send_rf_frame (bc_wssfm10r1at_t *self, const void *buffer, size_t length)
 Send RF frame command. More...
 
bool bc_wssfm10r1at_read_device_id (bc_wssfm10r1at_t *self)
 Read device ID command. More...
 
bool bc_wssfm10r1at_get_device_id (bc_wssfm10r1at_t *self, char *buffer, size_t buffer_size)
 Get device ID (can be called only in BC_WSSFM10R1AT_EVENT_READ_DEVICE_ID event) More...
 
bool bc_wssfm10r1at_read_device_pac (bc_wssfm10r1at_t *self)
 Read device PAC command. More...
 
bool bc_wssfm10r1at_get_device_pac (bc_wssfm10r1at_t *self, char *buffer, size_t buffer_size)
 Get device PAC (can be called only in BC_WSSFM10R1AT_EVENT_READ_DEVICE_PAC event) More...
 
bool bc_wssfm10r1at_continuous_wave (bc_wssfm10r1at_t *self)
 Generate continuous wave command. More...
 

Detailed Description

Driver for WSSFM10R1AT SigFox modem.

Enumeration Type Documentation

Callback events.

Enumerator
BC_WSSFM10R1AT_EVENT_READY 

Ready event.

BC_WSSFM10R1AT_EVENT_ERROR 

Error event.

BC_WSSFM10R1AT_EVENT_SEND_RF_FRAME_START 

RF frame transmission started event.

BC_WSSFM10R1AT_EVENT_SEND_RF_FRAME_DONE 

RF frame transmission finished event.

BC_WSSFM10R1AT_EVENT_READ_DEVICE_ID 

Device ID has been read event.

BC_WSSFM10R1AT_EVENT_READ_DEVICE_PAC 

Device PAC has been read event.

Definition at line 21 of file bc_wssfm10r1at.h.

Function Documentation

bool bc_wssfm10r1at_continuous_wave ( bc_wssfm10r1at_t self)

Generate continuous wave command.

Parameters
[in]selfInstance
Returns
true If command was accepted for processing
false If command was denied for processing

Definition at line 152 of file bc_wssfm10r1at.c.

Referenced by bc_module_sigfox_continuous_wave().

Here is the call graph for this function:

Here is the caller graph for this function:

bool bc_wssfm10r1at_get_device_id ( bc_wssfm10r1at_t self,
char *  buffer,
size_t  buffer_size 
)

Get device ID (can be called only in BC_WSSFM10R1AT_EVENT_READ_DEVICE_ID event)

Parameters
[in]selfInstance
[out]bufferPointer to destination buffer
[in]buffer_sizeSize of destination buffer
Returns
true If device ID was retrieved
false If device ID could not be retrieved

Definition at line 92 of file bc_wssfm10r1at.c.

Referenced by bc_module_sigfox_get_device_id().

Here is the caller graph for this function:

bool bc_wssfm10r1at_get_device_pac ( bc_wssfm10r1at_t self,
char *  buffer,
size_t  buffer_size 
)

Get device PAC (can be called only in BC_WSSFM10R1AT_EVENT_READ_DEVICE_PAC event)

Parameters
[in]selfInstance
[out]bufferPointer to destination buffer
[in]buffer_sizeSize of destination buffer
Returns
true If device PAC was retrieved
false If device PAC could not be retrieved

Definition at line 128 of file bc_wssfm10r1at.c.

Referenced by bc_module_sigfox_get_device_pac().

Here is the caller graph for this function:

void bc_wssfm10r1at_init ( bc_wssfm10r1at_t self,
bc_gpio_channel_t  reset_signal,
bc_uart_channel_t  uart_channel 
)

Initialize WSSFM10R1AT.

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 20 of file bc_wssfm10r1at.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_wssfm10r1at_is_ready ( bc_wssfm10r1at_t self)

Check if modem is ready for commands.

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

Definition at line 49 of file bc_wssfm10r1at.c.

Referenced by bc_module_sigfox_is_ready(), bc_wssfm10r1at_continuous_wave(), bc_wssfm10r1at_read_device_id(), bc_wssfm10r1at_read_device_pac(), and bc_wssfm10r1at_send_rf_frame().

Here is the caller graph for this function:

bool bc_wssfm10r1at_read_device_id ( bc_wssfm10r1at_t self)

Read device ID command.

Parameters
[in]selfInstance
Returns
true If command was accepted for processing
false If command was denied for processing

Definition at line 80 of file bc_wssfm10r1at.c.

Referenced by bc_module_sigfox_read_device_id().

Here is the call graph for this function:

Here is the caller graph for this function:

bool bc_wssfm10r1at_read_device_pac ( bc_wssfm10r1at_t self)

Read device PAC command.

Parameters
[in]selfInstance
Returns
true If command was accepted for processing
false If command was denied for processing

Definition at line 116 of file bc_wssfm10r1at.c.

Referenced by bc_module_sigfox_read_device_pac().

Here is the call graph for this function:

Here is the caller graph for this function:

bool bc_wssfm10r1at_send_rf_frame ( bc_wssfm10r1at_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 64 of file bc_wssfm10r1at.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_wssfm10r1at_set_event_handler ( bc_wssfm10r1at_t self,
void(*)(bc_wssfm10r1at_t *, bc_wssfm10r1at_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 43 of file bc_wssfm10r1at.c.

Referenced by bc_module_sigfox_init().

Here is the caller graph for this function: