Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_spirit1.h
1 #ifndef _BC_SPIRIT1_H
2 #define _BC_SPIRIT1_H
3 
4 #include <bc_tick.h>
5 
9 
11 
12 #define BC_SPIRIT1_MAX_PACKET_SIZE 64
13 
15 
17 
18 typedef enum
19 {
22 
25 
28 
30 
34 
35 bool bc_spirit1_init(void);
36 
40 
41 bool bc_spirit1_deinit(void);
42 
46 
47 void bc_spirit1_set_event_handler(void (*event_handler)(bc_spirit1_event_t, void *), void *event_param);
48 
51 
52 void *bc_spirit1_get_tx_buffer(void);
53 
56 
57 void bc_spirit1_set_tx_length(size_t length);
58 
61 
62 size_t bc_spirit1_get_tx_length(void);
63 
66 
67 void *bc_spirit1_get_rx_buffer(void);
68 
71 
72 size_t bc_spirit1_get_rx_length(void);
73 
76 
77 int bc_spirit1_get_rx_rssi(void);
78 
81 
83 
85 
86 void bc_spirit1_tx(void);
87 
89 
90 void bc_spirit1_rx(void);
91 
93 
94 void bc_spirit1_sleep(void);
95 
97 
98 #endif // _BC_SPIRIT1_H
bool bc_spirit1_deinit(void)
Deitialize.
Definition: bc_spirit1.c:150
void * bc_spirit1_get_tx_buffer(void)
Get TX buffer.
Definition: bc_spirit1.c:176
uint64_t bc_tick_t
Timestamp data type.
Definition: bc_tick.h:16
bool bc_spirit1_init(void)
Initialize.
Definition: bc_spirit1.c:98
void bc_spirit1_tx(void)
Enter TX state.
Definition: bc_spirit1.c:228
void bc_spirit1_rx(void)
Enter RX state.
Definition: bc_spirit1.c:238
size_t bc_spirit1_get_tx_length(void)
Get TX buffer length.
Definition: bc_spirit1.c:186
void bc_spirit1_sleep(void)
Enter sleep state.
Definition: bc_spirit1.c:248
void bc_spirit1_set_event_handler(void(*event_handler)(bc_spirit1_event_t, void *), void *event_param)
Set callback function.
Definition: bc_spirit1.c:170
Event is RX timeout.
Definition: bc_spirit1.h:27
size_t bc_spirit1_get_rx_length(void)
Get RX buffer length.
Definition: bc_spirit1.c:196
Event is RX done.
Definition: bc_spirit1.h:24
void bc_spirit1_set_rx_timeout(bc_tick_t timeout)
Set TX timeout.
Definition: bc_spirit1.c:206
void * bc_spirit1_get_rx_buffer(void)
Get RX buffer.
Definition: bc_spirit1.c:191
Event is TX done.
Definition: bc_spirit1.h:21
void bc_spirit1_set_tx_length(size_t length)
Set TX buffer length.
Definition: bc_spirit1.c:181
int bc_spirit1_get_rx_rssi(void)
Get RSSI.
Definition: bc_spirit1.c:201
bc_spirit1_event_t
Callback events.
Definition: bc_spirit1.h:18