Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_module_sigfox.h
1 #ifndef _BC_MODULE_SIGFOX_H
2 #define _BC_MODULE_SIGFOX_H
3 
4 #include <bc_td1207r.h>
5 #include <bc_wssfm10r1at.h>
6 
10 
12 
13 typedef enum
14 {
17 
20 
22 
24 
25 typedef enum
26 {
29 
32 
35 
38 
41 
44 
46 
48 
49 typedef struct bc_module_sigfox_t bc_module_sigfox_t;
50 
51 struct bc_module_sigfox_t
52 {
54  void (*_event_handler)(bc_module_sigfox_t *, bc_module_sigfox_event_t, void *);
55  void *_event_param;
56  union
57  {
58  bc_td1207r_t td1207r;
59  bc_wssfm10r1at_t wssfm10r1at;
60  } _modem;
61 };
62 
64 
67 
68 void bc_module_sigfox_init(bc_module_sigfox_t *self, bc_module_sigfox_revision_t revision);
69 
74 
75 void bc_module_sigfox_set_event_handler(bc_module_sigfox_t *self, void (*event_handler)(bc_module_sigfox_t *, bc_module_sigfox_event_t, void *), void *event_param);
76 
81 
82 bool bc_module_sigfox_is_ready(bc_module_sigfox_t *self);
83 
90 
91 bool bc_module_sigfox_send_rf_frame(bc_module_sigfox_t *self, const void *buffer, size_t length);
92 
97 
98 bool bc_module_sigfox_read_device_id(bc_module_sigfox_t *self);
99 
106 
107 bool bc_module_sigfox_get_device_id(bc_module_sigfox_t *self, char *buffer, size_t buffer_size);
108 
113 
114 bool bc_module_sigfox_read_device_pac(bc_module_sigfox_t *self);
115 
122 
123 bool bc_module_sigfox_get_device_pac(bc_module_sigfox_t *self, char *buffer, size_t buffer_size);
124 
129 
130 bool bc_module_sigfox_continuous_wave(bc_module_sigfox_t *self);
131 
133 
134 #endif // _BC_MODULE_SIGFOX_H
RF frame transmission started event.
Device ID has been read event.
bc_module_sigfox_revision_t
SigFox Module hardware revision.
bool bc_module_sigfox_read_device_id(bc_module_sigfox_t *self)
Read device ID command.
struct bc_wssfm10r1at_t bc_wssfm10r1at_t
WSSFM10R1AT instance.
bc_module_sigfox_event_t
Callback events.
bool bc_module_sigfox_get_device_pac(bc_module_sigfox_t *self, char *buffer, size_t buffer_size)
Get device PAC (can be called only in BC_WSSFM10R1AT_EVENT_READ_DEVICE_ID event)
RF frame transmission finished event.
bool bc_module_sigfox_get_device_id(bc_module_sigfox_t *self, char *buffer, size_t buffer_size)
Get device ID (can be called only in BC_WSSFM10R1AT_EVENT_READ_DEVICE_ID event)
struct bc_td1207r_t bc_td1207r_t
TD1207R instance.
Definition: bc_td1207r.h:39
void bc_module_sigfox_init(bc_module_sigfox_t *self, bc_module_sigfox_revision_t revision)
Initialize BigClown SigFox Module.
Hardware revision R1.
bool bc_module_sigfox_read_device_pac(bc_module_sigfox_t *self)
Read device PAC command.
bool bc_module_sigfox_is_ready(bc_module_sigfox_t *self)
Check if modem is ready for commands.
void bc_module_sigfox_set_event_handler(bc_module_sigfox_t *self, void(*event_handler)(bc_module_sigfox_t *, bc_module_sigfox_event_t, void *), void *event_param)
Set callback function.
Device PAC has been read event.
bool bc_module_sigfox_continuous_wave(bc_module_sigfox_t *self)
Generate continuous wave command.
bool bc_module_sigfox_send_rf_frame(bc_module_sigfox_t *self, const void *buffer, size_t length)
Send RF frame command.
Hardware revision R2.