Firmware SDK
|
Driver for WSSFM10R1AT SigFox modem. More...
Typedefs | |
typedef struct twr_wssfm10r1at_t | twr_wssfm10r1at_t |
WSSFM10R1AT instance. | |
Enumerations | |
enum | twr_wssfm10r1at_event_t { TWR_WSSFM10R1AT_EVENT_READY = 0 , TWR_WSSFM10R1AT_EVENT_ERROR = 1 , TWR_WSSFM10R1AT_EVENT_SEND_RF_FRAME_START = 2 , TWR_WSSFM10R1AT_EVENT_SEND_RF_FRAME_DONE = 3 , TWR_WSSFM10R1AT_EVENT_READ_DEVICE_ID = 4 , TWR_WSSFM10R1AT_EVENT_READ_DEVICE_PAC = 5 } |
Callback events. More... | |
Functions | |
void | twr_wssfm10r1at_init (twr_wssfm10r1at_t *self, twr_gpio_channel_t reset_signal, twr_uart_channel_t uart_channel) |
Initialize WSSFM10R1AT. More... | |
void | twr_wssfm10r1at_set_event_handler (twr_wssfm10r1at_t *self, void(*event_handler)(twr_wssfm10r1at_t *, twr_wssfm10r1at_event_t, void *), void *event_param) |
Set callback function. More... | |
bool | twr_wssfm10r1at_is_ready (twr_wssfm10r1at_t *self) |
Check if modem is ready for commands. More... | |
bool | twr_wssfm10r1at_send_rf_frame (twr_wssfm10r1at_t *self, const void *buffer, size_t length) |
Send RF frame command. More... | |
bool | twr_wssfm10r1at_read_device_id (twr_wssfm10r1at_t *self) |
Read device ID command. More... | |
bool | twr_wssfm10r1at_get_device_id (twr_wssfm10r1at_t *self, char *buffer, size_t buffer_size) |
Get device ID (can be called only in TWR_WSSFM10R1AT_EVENT_READ_DEVICE_ID event) More... | |
bool | twr_wssfm10r1at_read_device_pac (twr_wssfm10r1at_t *self) |
Read device PAC command. More... | |
bool | twr_wssfm10r1at_get_device_pac (twr_wssfm10r1at_t *self, char *buffer, size_t buffer_size) |
Get device PAC (can be called only in TWR_WSSFM10R1AT_EVENT_READ_DEVICE_PAC event) More... | |
bool | twr_wssfm10r1at_continuous_wave (twr_wssfm10r1at_t *self) |
Generate continuous wave command. More... | |
Driver for WSSFM10R1AT SigFox modem.
Callback events.
Definition at line 21 of file twr_wssfm10r1at.h.
bool twr_wssfm10r1at_continuous_wave | ( | twr_wssfm10r1at_t * | self | ) |
Generate continuous wave command.
[in] | self | Instance |
Definition at line 152 of file twr_wssfm10r1at.c.
Referenced by twr_module_sigfox_continuous_wave().
bool twr_wssfm10r1at_get_device_id | ( | twr_wssfm10r1at_t * | self, |
char * | buffer, | ||
size_t | buffer_size | ||
) |
Get device ID (can be called only in TWR_WSSFM10R1AT_EVENT_READ_DEVICE_ID event)
[in] | self | Instance |
[out] | buffer | Pointer to destination buffer |
[in] | buffer_size | Size of destination buffer |
Definition at line 92 of file twr_wssfm10r1at.c.
Referenced by twr_module_sigfox_get_device_id().
bool twr_wssfm10r1at_get_device_pac | ( | twr_wssfm10r1at_t * | self, |
char * | buffer, | ||
size_t | buffer_size | ||
) |
Get device PAC (can be called only in TWR_WSSFM10R1AT_EVENT_READ_DEVICE_PAC event)
[in] | self | Instance |
[out] | buffer | Pointer to destination buffer |
[in] | buffer_size | Size of destination buffer |
Definition at line 128 of file twr_wssfm10r1at.c.
Referenced by twr_module_sigfox_get_device_pac().
void twr_wssfm10r1at_init | ( | twr_wssfm10r1at_t * | self, |
twr_gpio_channel_t | reset_signal, | ||
twr_uart_channel_t | uart_channel | ||
) |
Initialize WSSFM10R1AT.
[in] | self | Instance |
[in] | reset_signal | GPIO channel where RST signal is connected |
[in] | uart_channel | UART channel where TX and RX signals are connected |
Definition at line 20 of file twr_wssfm10r1at.c.
Referenced by twr_module_sigfox_init().
bool twr_wssfm10r1at_is_ready | ( | twr_wssfm10r1at_t * | self | ) |
Check if modem is ready for commands.
[in] | self | Instance |
Definition at line 49 of file twr_wssfm10r1at.c.
Referenced by twr_module_sigfox_is_ready(), twr_wssfm10r1at_continuous_wave(), twr_wssfm10r1at_read_device_id(), twr_wssfm10r1at_read_device_pac(), and twr_wssfm10r1at_send_rf_frame().
bool twr_wssfm10r1at_read_device_id | ( | twr_wssfm10r1at_t * | self | ) |
Read device ID command.
[in] | self | Instance |
Definition at line 80 of file twr_wssfm10r1at.c.
Referenced by twr_module_sigfox_read_device_id().
bool twr_wssfm10r1at_read_device_pac | ( | twr_wssfm10r1at_t * | self | ) |
Read device PAC command.
[in] | self | Instance |
Definition at line 116 of file twr_wssfm10r1at.c.
Referenced by twr_module_sigfox_read_device_pac().
bool twr_wssfm10r1at_send_rf_frame | ( | twr_wssfm10r1at_t * | self, |
const void * | buffer, | ||
size_t | length | ||
) |
Send RF frame command.
[in] | self | Instance |
[in] | buffer | Pointer to data to be transmitted |
[in] | length | Length of data to be transmitted in bytes (must be from 1 to 12 bytes) |
Definition at line 64 of file twr_wssfm10r1at.c.
Referenced by twr_module_sigfox_send_rf_frame().
void twr_wssfm10r1at_set_event_handler | ( | twr_wssfm10r1at_t * | self, |
void(*)(twr_wssfm10r1at_t *, twr_wssfm10r1at_event_t, void *) | event_handler, | ||
void * | event_param | ||
) |
Set callback function.
[in] | self | Instance |
[in] | event_handler | Function address |
[in] | event_param | Optional event parameter (can be NULL) |
Definition at line 43 of file twr_wssfm10r1at.c.
Referenced by twr_module_sigfox_init().