Firmware SDK
|
Driver for TD1207R SigFox modem. More...
Typedefs | |
typedef struct twr_td1207r_t | twr_td1207r_t |
TD1207R instance. | |
Enumerations | |
enum | twr_td1207r_event_t { TWR_TD1207R_EVENT_READY = 0 , TWR_TD1207R_EVENT_ERROR = 1 , TWR_TD1207R_EVENT_SEND_RF_FRAME_START = 2 , TWR_TD1207R_EVENT_SEND_RF_FRAME_DONE = 3 } |
Callback events. More... | |
Functions | |
void | twr_td1207r_init (twr_td1207r_t *self, twr_gpio_channel_t reset_signal, twr_uart_channel_t uart_channel) |
Initialize TD1207R. More... | |
void | twr_td1207r_set_event_handler (twr_td1207r_t *self, void(*event_handler)(twr_td1207r_t *, twr_td1207r_event_t, void *), void *event_param) |
Set callback function. More... | |
bool | twr_td1207r_is_ready (twr_td1207r_t *self) |
Check if modem is ready for commands. More... | |
bool | twr_td1207r_send_rf_frame (twr_td1207r_t *self, const void *buffer, size_t length) |
Send RF frame command. More... | |
Driver for TD1207R SigFox modem.
enum twr_td1207r_event_t |
Callback events.
Definition at line 21 of file twr_td1207r.h.
void twr_td1207r_init | ( | twr_td1207r_t * | self, |
twr_gpio_channel_t | reset_signal, | ||
twr_uart_channel_t | uart_channel | ||
) |
Initialize TD1207R.
[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 13 of file twr_td1207r.c.
Referenced by twr_module_sigfox_init().
bool twr_td1207r_is_ready | ( | twr_td1207r_t * | self | ) |
Check if modem is ready for commands.
[in] | self | Instance |
Definition at line 42 of file twr_td1207r.c.
Referenced by twr_module_sigfox_is_ready(), and twr_td1207r_send_rf_frame().
bool twr_td1207r_send_rf_frame | ( | twr_td1207r_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 47 of file twr_td1207r.c.
Referenced by twr_module_sigfox_send_rf_frame().
void twr_td1207r_set_event_handler | ( | twr_td1207r_t * | self, |
void(*)(twr_td1207r_t *, twr_td1207r_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 36 of file twr_td1207r.c.
Referenced by twr_module_sigfox_init().