Contiki 3.x
rf-core.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015, Texas Instruments Incorporated - http://www.ti.com/
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the copyright holder nor the names of its
14  * contributors may be used to endorse or promote products derived
15  * from this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28  * OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 /*---------------------------------------------------------------------------*/
31 /**
32  * \addtogroup cc26xx
33  * @{
34  *
35  * \defgroup rf-core CC13xx/CC26xx RF core
36  *
37  * Different flavours of chips of the CC13xx/CC26xx family have different
38  * radio capability. For example, the CC2650 can operate in IEEE 802.15.4 mode
39  * at 2.4GHz, but it can also operate in BLE mode. The CC1310 only supports
40  * sub-ghz mode.
41  *
42  * However, there are many radio functionalities that are identical across
43  * all chips. The rf-core driver provides support for this common functionality
44  *
45  * @{
46  *
47  * \file
48  * Header file for the CC13xx/CC26xx RF core driver
49  */
50 /*---------------------------------------------------------------------------*/
51 #ifndef RF_CORE_H_
52 #define RF_CORE_H_
53 /*---------------------------------------------------------------------------*/
54 #include "contiki-conf.h"
55 #include "rf-core/api/common_cmd.h"
56 
57 #include <stdint.h>
58 #include <stdbool.h>
59 /*---------------------------------------------------------------------------*/
60 /* The channel to use in IEEE or prop mode. */
61 #ifdef RF_CORE_CONF_CHANNEL
62 #define RF_CORE_CHANNEL RF_CORE_CONF_CHANNEL
63 #else
64 #define RF_CORE_CHANNEL 25
65 #endif /* RF_CORE_CONF_IEEE_MODE_CHANNEL */
66 /*---------------------------------------------------------------------------*/
67 #define RF_CORE_CMD_ERROR 0
68 #define RF_CORE_CMD_OK 1
69 /*---------------------------------------------------------------------------*/
70 /**
71  * \brief A data strcuture representing the radio's primary mode of operation
72  *
73  * The CC13xx / CC26xx radio supports up to potentially 3 modes: IEEE, Prop and
74  * BLE. Within Contiki, we assume that the radio is by default in one of IEEE
75  * or Prop in order to support standard 6LoWPAN / .15.4 operation. The BLE
76  * mode interrupts this so called "primary" mode in order to send BLE adv
77  * messages. Once BLE is done advertising, we need to be able to restore the
78  * previous .15.4 mode. Unfortunately, the only way this can be done with
79  * NETSTACK_RADIO API is by fully power-cycling the radio, which is something
80  * we do not want to do.
81  *
82  * Thus, we declare a secondary data structure for primary mode drivers (IEEE
83  * or Prop). We use this data structure to issue "soft off" and "back on"
84  * commands. Soft off in this context means stopping RX (e.g. the respective
85  * IEEE RX operation), but without shutting down the RF core (which is what
86  * NETSTACK_RADIO.off() would have done). We then remember what mode we were
87  * using in order to be able to re-enter RX mode for this mode.
88  *
89  * A NETSTACK_RADIO driver will declare those two functions somewhere within
90  * its module of implementation. During its init() routine, it will notify
91  * the RF core module so that the latter can abort and restore operations.
92  */
93 typedef struct rf_core_primary_mode_s {
94  /**
95  * \brief A pointer to a function used to abort the current radio op
96  */
97  void (*abort)(void);
98 
99  /**
100  * \brief A pointer to a function that will restore the previous radio op
101  * \return RF_CORE_CMD_OK or RF_CORE_CMD_ERROR
102  */
103  uint8_t (*restore)(void);
105 /*---------------------------------------------------------------------------*/
106 /* RF Command status constants - Correspond to values in the CMDSTA register */
107 #define RF_CORE_CMDSTA_PENDING 0x00
108 #define RF_CORE_CMDSTA_DONE 0x01
109 #define RF_CORE_CMDSTA_ILLEGAL_PTR 0x81
110 #define RF_CORE_CMDSTA_UNKNOWN_CMD 0x82
111 #define RF_CORE_CMDSTA_UNKNOWN_DIR_CMD 0x83
112 #define RF_CORE_CMDSTA_CONTEXT_ERR 0x85
113 #define RF_CORE_CMDSTA_SCHEDULING_ERR 0x86
114 #define RF_CORE_CMDSTA_PAR_ERR 0x87
115 #define RF_CORE_CMDSTA_QUEUE_ERR 0x88
116 #define RF_CORE_CMDSTA_QUEUE_BUSY 0x89
117 
118 /* Status values starting with 0x8 correspond to errors */
119 #define RF_CORE_CMDSTA_ERR_MASK 0x80
120 
121 /* CMDSTA is 32-bits. Return value in bits 7:0 */
122 #define RF_CORE_CMDSTA_RESULT_MASK 0xFF
123 
124 #define RF_CORE_RADIO_OP_STATUS_IDLE 0x0000
125 /*---------------------------------------------------------------------------*/
126 #define RF_CORE_NOT_ACCESSIBLE 0x00
127 #define RF_CORE_ACCESSIBLE 0x01
128 /*---------------------------------------------------------------------------*/
129 /* RF Radio Op status constants. Field 'status' in Radio Op command struct */
130 #define RF_CORE_RADIO_OP_STATUS_IDLE 0x0000
131 #define RF_CORE_RADIO_OP_STATUS_PENDING 0x0001
132 #define RF_CORE_RADIO_OP_STATUS_ACTIVE 0x0002
133 #define RF_CORE_RADIO_OP_STATUS_SKIPPED 0x0003
134 #define RF_CORE_RADIO_OP_STATUS_DONE_OK 0x0400
135 #define RF_CORE_RADIO_OP_STATUS_DONE_COUNTDOWN 0x0401
136 #define RF_CORE_RADIO_OP_STATUS_DONE_RXERR 0x0402
137 #define RF_CORE_RADIO_OP_STATUS_DONE_TIMEOUT 0x0403
138 #define RF_CORE_RADIO_OP_STATUS_DONE_STOPPED 0x0404
139 #define RF_CORE_RADIO_OP_STATUS_DONE_ABORT 0x0405
140 #define RF_CORE_RADIO_OP_STATUS_ERROR_PAST_START 0x0800
141 #define RF_CORE_RADIO_OP_STATUS_ERROR_START_TRIG 0x0801
142 #define RF_CORE_RADIO_OP_STATUS_ERROR_CONDITION 0x0802
143 #define RF_CORE_RADIO_OP_STATUS_ERROR_PAR 0x0803
144 #define RF_CORE_RADIO_OP_STATUS_ERROR_POINTER 0x0804
145 #define RF_CORE_RADIO_OP_STATUS_ERROR_CMDID 0x0805
146 #define RF_CORE_RADIO_OP_STATUS_ERROR_NO_SETUP 0x0807
147 #define RF_CORE_RADIO_OP_STATUS_ERROR_NO_FS 0x0808
148 #define RF_CORE_RADIO_OP_STATUS_ERROR_SYNTH_PROG 0x0809
149 
150 /* Additional Op status values for IEEE mode */
151 #define RF_CORE_RADIO_OP_STATUS_IEEE_SUSPENDED 0x2001
152 #define RF_CORE_RADIO_OP_STATUS_IEEE_DONE_OK 0x2400
153 #define RF_CORE_RADIO_OP_STATUS_IEEE_DONE_BUSY 0x2401
154 #define RF_CORE_RADIO_OP_STATUS_IEEE_DONE_STOPPED 0x2402
155 #define RF_CORE_RADIO_OP_STATUS_IEEE_DONE_ACK 0x2403
156 #define RF_CORE_RADIO_OP_STATUS_IEEE_DONE_ACKPEND 0x2404
157 #define RF_CORE_RADIO_OP_STATUS_IEEE_DONE_TIMEOUT 0x2405
158 #define RF_CORE_RADIO_OP_STATUS_IEEE_DONE_BGEND 0x2406
159 #define RF_CORE_RADIO_OP_STATUS_IEEE_DONE_ABORT 0x2407
160 #define RF_CORE_RADIO_OP_STATUS_ERROR_WRONG_BG 0x0806
161 #define RF_CORE_RADIO_OP_STATUS_IEEE_ERROR_PAR 0x2800
162 #define RF_CORE_RADIO_OP_STATUS_IEEE_ERROR_NO_SETUP 0x2801
163 #define RF_CORE_RADIO_OP_STATUS_IEEE_ERROR_NO_FS 0x2802
164 #define RF_CORE_RADIO_OP_STATUS_IEEE_ERROR_SYNTH_PROG 0x2803
165 #define RF_CORE_RADIO_OP_STATUS_IEEE_ERROR_RXOVF 0x2804
166 #define RF_CORE_RADIO_OP_STATUS_IEEE_ERROR_TXUNF 0x2805
167 
168 /* Op status values for BLE mode */
169 #define RF_CORE_RADIO_OP_STATUS_BLE_DONE_OK 0x1400
170 #define RF_CORE_RADIO_OP_STATUS_BLE_DONE_RXTIMEOUT 0x1401
171 #define RF_CORE_RADIO_OP_STATUS_BLE_DONE_NOSYNC 0x1402
172 #define RF_CORE_RADIO_OP_STATUS_BLE_DONE_RXERR 0x1403
173 #define RF_CORE_RADIO_OP_STATUS_BLE_DONE_CONNECT 0x1404
174 #define RF_CORE_RADIO_OP_STATUS_BLE_DONE_MAXNACK 0x1405
175 #define RF_CORE_RADIO_OP_STATUS_BLE_DONE_ENDED 0x1406
176 #define RF_CORE_RADIO_OP_STATUS_BLE_DONE_ABORT 0x1407
177 #define RF_CORE_RADIO_OP_STATUS_BLE_DONE_STOPPED 0x1408
178 #define RF_CORE_RADIO_OP_STATUS_BLE_ERROR_PAR 0x1800
179 #define RF_CORE_RADIO_OP_STATUS_BLE_ERROR_RXBUF 0x1801
180 #define RF_CORE_RADIO_OP_STATUS_BLE_ERROR_NO_SETUP 0x1802
181 #define RF_CORE_RADIO_OP_STATUS_BLE_ERROR_NO_FS 0x1803
182 #define RF_CORE_RADIO_OP_STATUS_BLE_ERROR_SYNTH_PROG 0x1804
183 #define RF_CORE_RADIO_OP_STATUS_BLE_ERROR_RXOVF 0x1805
184 #define RF_CORE_RADIO_OP_STATUS_BLE_ERROR_TXUNF 0x1806
185 
186 /* Op status values for proprietary mode */
187 #define RF_CORE_RADIO_OP_STATUS_PROP_DONE_OK 0x3400
188 #define RF_CORE_RADIO_OP_STATUS_PROP_DONE_RXTIMEOUT 0x3401
189 #define RF_CORE_RADIO_OP_STATUS_PROP_DONE_BREAK 0x3402
190 #define RF_CORE_RADIO_OP_STATUS_PROP_DONE_ENDED 0x3403
191 #define RF_CORE_RADIO_OP_STATUS_PROP_DONE_STOPPED 0x3404
192 #define RF_CORE_RADIO_OP_STATUS_PROP_DONE_ABORT 0x3405
193 #define RF_CORE_RADIO_OP_STATUS_PROP_DONE_RXERR 0x3406
194 #define RF_CORE_RADIO_OP_STATUS_PROP_DONE_IDLE 0x3407
195 #define RF_CORE_RADIO_OP_STATUS_PROP_DONE_BUSY 0x3408
196 #define RF_CORE_RADIO_OP_STATUS_PROP_DONE_IDLETIMEOUT 0x3409
197 #define RF_CORE_RADIO_OP_STATUS_PROP_DONE_BUSYTIMEOUT 0x340A
198 #define RF_CORE_RADIO_OP_STATUS_PROP_ERROR_PAR 0x3800
199 #define RF_CORE_RADIO_OP_STATUS_PROP_ERROR_RXBUF 0x3801
200 #define RF_CORE_RADIO_OP_STATUS_PROP_ERROR_RXFULL 0x3802
201 #define RF_CORE_RADIO_OP_STATUS_PROP_ERROR_NO_SETUP 0x3803
202 #define RF_CORE_RADIO_OP_STATUS_PROP_ERROR_NO_FS 0x3804
203 #define RF_CORE_RADIO_OP_STATUS_PROP_ERROR_RXOVF 0x3805
204 #define RF_CORE_RADIO_OP_STATUS_PROP_ERROR_TXUNF 0x3806
205 
206 /* Bits 15:12 signify the protocol */
207 #define RF_CORE_RADIO_OP_STATUS_PROTO_MASK 0xF000
208 #define RF_CORE_RADIO_OP_STATUS_PROTO_GENERIC 0x0000
209 #define RF_CORE_RADIO_OP_STATUS_PROTO_BLE 0x1000
210 #define RF_CORE_RADIO_OP_STATUS_PROTO_IEEE 0x2000
211 #define RF_CORE_RADIO_OP_STATUS_PROTO_PROP 0x3000
212 
213 /* Bits 11:10 signify Running / Done OK / Done with error */
214 #define RF_CORE_RADIO_OP_MASKED_STATUS 0x0C00
215 #define RF_CORE_RADIO_OP_MASKED_STATUS_RUNNING 0x0000
216 #define RF_CORE_RADIO_OP_MASKED_STATUS_DONE 0x0400
217 #define RF_CORE_RADIO_OP_MASKED_STATUS_ERROR 0x0800
218 /*---------------------------------------------------------------------------*/
219 /* Command Types */
220 #define RF_CORE_COMMAND_TYPE_MASK 0x0C00
221 #define RF_CORE_COMMAND_TYPE_RADIO_OP 0x0800
222 #define RF_CORE_COMMAND_TYPE_IEEE_BG_RADIO_OP 0x0800
223 #define RF_CORE_COMMAND_TYPE_IEEE_FG_RADIO_OP 0x0C00
224 
225 #define RF_CORE_COMMAND_PROTOCOL_MASK 0x3000
226 #define RF_CORE_COMMAND_PROTOCOL_COMMON 0x0000
227 #define RF_CORE_COMMAND_PROTOCOL_BLE 0x1000
228 #define RF_CORE_COMMAND_PROTOCOL_IEEE 0x2000
229 #define RF_CORE_COMMAND_PROTOCOL_PROP 0x3000
230 /*---------------------------------------------------------------------------*/
231 /* Make the main driver process visible to mode drivers */
232 PROCESS_NAME(rf_core_process);
233 /*---------------------------------------------------------------------------*/
234 /**
235  * \brief Check whether the RF core is accessible
236  * \retval RF_CORE_ACCESSIBLE The core is powered and ready for access
237  * \retval RF_CORE_NOT_ACCESSIBLE The core is not ready
238  *
239  * If this function returns RF_CORE_NOT_ACCESSIBLE, rf_core_power_up() must be
240  * called before any attempt to access the core.
241  */
242 uint8_t rf_core_is_accessible(void);
243 
244 /**
245  * \brief Sends a command to the RF core.
246  *
247  * \param cmd The command value or a pointer to a command buffer
248  * \param status A pointer to a variable which will hold the status
249  * \return RF_CORE_CMD_OK or RF_CORE_CMD_ERROR
250  *
251  * This function supports all three types of command (Radio OP, immediate and
252  * direct)
253  *
254  * For immediate and Radio OPs, cmd is a pointer to the data structure
255  * containing the command and its parameters. This data structure must be
256  * 4-byte aligned.
257  *
258  * For direct commands, cmd contains the value of the command alongside its
259  * parameters. This value will be written to CMDSTA verbatim, so the command
260  * ID must be in the 16 high bits, and the 2 LS bits must be set to 01 by the
261  * caller.
262  *
263  * The caller is responsible of allocating and populating cmd for Radio OP and
264  * immediate commands
265  *
266  * The caller is responsible for allocating status
267  *
268  * For immediate commands and radio Ops, this function will set the command's
269  * status field to RF_CORE_RADIO_OP_STATUS_IDLE before sending it to the RF
270  */
271 uint_fast8_t rf_core_send_cmd(uint32_t cmd, uint32_t *status);
272 
273 /**
274  * \brief Block and wait for a Radio op to complete
275  * \param cmd A pointer to any command's structure
276  * \retval RF_CORE_CMD_OK the command completed with status _DONE_OK
277  * \retval RF_CORE_CMD_ERROR Timeout exceeded or the command completed with
278  * status _DONE_xxx (e.g. RF_CORE_RADIO_OP_STATUS_DONE_TIMEOUT)
279  */
280 uint_fast8_t rf_core_wait_cmd_done(void *cmd);
281 
282 /**
283  * \brief Turn on power to the RFC and boot it.
284  * \return RF_CORE_CMD_OK or RF_CORE_CMD_ERROR
285  */
286 int rf_core_power_up(void);
287 
288 /**
289  * \brief Disable RFCORE clock domain in the MCU VD and turn off the RFCORE PD
290  */
291 void rf_core_power_down(void);
292 
293 /**
294  * \brief Initialise RF APIs in the RF core
295  * \return RF_CORE_CMD_OK or RF_CORE_CMD_ERROR
296  *
297  * Depending on chip family and capability, this function will set the correct
298  * value to PRCM.RFCMODESEL
299  */
300 uint8_t rf_core_set_modesel(void);
301 
302 /**
303  * \brief Start the CM0 RAT
304  * \return RF_CORE_CMD_OK or RF_CORE_CMD_ERROR
305  *
306  * This function must be called each time the CM0 boots. The boot sequence
307  * can be performed automatically by calling rf_core_boot() if patches are not
308  * required. If patches are required then the patches must be applied after
309  * power up and before calling this function.
310  */
311 uint8_t rf_core_start_rat(void);
312 
313 /**
314  * \brief Boot the RF Core
315  * \return RF_CORE_CMD_OK or RF_CORE_CMD_ERROR
316  *
317  * This function will perform the CM0 boot sequence. It will first power it up
318  * and then start the RAT. If a patch is required, then the mode driver must
319  * not call this function and perform the sequence manually, applying patches
320  * after boot and before calling rf_core_start_rat().
321  *
322  * The function will return RF_CORE_CMD_ERROR if any of those steps fails. If
323  * the boot sequence fails to complete, the RF Core will be powered down.
324  */
325 uint8_t rf_core_boot(void);
326 
327 /**
328  * \brief Setup RF core interrupts
329  */
330 void rf_core_setup_interrupts(void);
331 
332 /**
333  * \brief Enable interrupt on command done.
334  * \param fg set true to enable irq on foreground command done and false for
335  * background commands or if not in ieee mode.
336  *
337  * This is used within TX routines in order to be able to sleep the CM3 and
338  * wake up after TX has finished
339  *
340  * \sa rf_core_cmd_done_dis()
341  */
342 void rf_core_cmd_done_en(bool fg);
343 
344 /**
345  * \brief Disable the LAST_CMD_DONE and LAST_FG_CMD_DONE interrupts.
346  *
347  * This is used within TX routines after TX has completed
348  *
349  * \sa rf_core_cmd_done_en()
350  */
351 void rf_core_cmd_done_dis(void);
352 
353 /**
354  * \brief Returns a pointer to the most recent proto-dependent Radio Op
355  * \return The pointer
356  *
357  * The RF Core driver will remember the most recent proto-dependent Radio OP
358  * issued, so that other modules can inspect its type and state at a subsequent
359  * stage. The assumption is that those commands will be issued by a function
360  * that will then return. The following commands will be "remembered"
361  *
362  * - All BLE Radio Ops (0x18nn)
363  * - All Prop Radio Ops (0x38nn)
364  * - IEEE BG Radio Ops (0x28nn)
365  *
366  * The following commands are assumed to be executed synchronously and will
367  * thus not be remembered by the core and not returned by this function:
368  *
369  * - Direct commands
370  * - Proto-independent commands (including Radio Ops and Immediate ones)
371  * - IEEE FG Radio Ops (0x2Cxx)
372  *
373  * This assumes that all commands will be sent to the radio using
374  * rf_core_send_cmd()
375  */
376 rfc_radioOp_t *rf_core_get_last_radio_op(void);
377 
378 /**
379  * \brief Prepare a buffer to host a Radio Op
380  * \param buf A pointer to the buffer that will host the Radio Op
381  * \param len The buffer's length
382  * \param command The command ID
383  *
384  * The caller is responsible to allocate the buffer
385  *
386  * This function will not check whether the buffer is large enough to hold the
387  * command. This is the caller's responsibility
388  *
389  * This function will wipe out the buffer's contents.
390  */
391 void rf_core_init_radio_op(rfc_radioOp_t *buf, uint16_t len, uint16_t command);
392 
393 /**
394  * \brief Register a primary mode for radio operation
395  * \param mode A pointer to the struct representing the mode
396  *
397  * A normal NESTACK_RADIO driver will normally register itself by calling
398  * this function during its own init().
399  *
400  * \sa rf_core_primary_mode_t
401  */
403 
404 /**
405  * \brief Abort the currently running primary radio op
406  */
407 void rf_core_primary_mode_abort(void);
408 
409 /**
410  * \brief Abort the currently running primary radio op
411  */
412 uint8_t rf_core_primary_mode_restore(void);
413 /*---------------------------------------------------------------------------*/
414 #endif /* RF_CORE_H_ */
415 /*---------------------------------------------------------------------------*/
416 /**
417  * @}
418  * @}
419  */
void rf_core_power_down()
Disable RFCORE clock domain in the MCU VD and turn off the RFCORE PD.
Definition: rf-core.c:269
uint8_t(* restore)(void)
A pointer to a function that will restore the previous radio op.
Definition: rf-core.h:103
void rf_core_primary_mode_abort()
Abort the currently running primary radio op.
Definition: rf-core.c:439
void rf_core_setup_interrupts()
Setup RF core interrupts.
Definition: rf-core.c:370
PROCESS_NAME(sample_process)
Process the sampler runs as.
uint8_t rf_core_is_accessible()
Check whether the RF core is accessible.
Definition: rf-core.c:110
uint8_t rf_core_set_modesel()
Initialise RF APIs in the RF core.
Definition: rf-core.c:303
void rf_core_cmd_done_en(bool fg)
Enable interrupt on command done.
Definition: rf-core.c:403
uint8_t rf_core_boot()
Boot the RF Core.
Definition: rf-core.c:348
void(* abort)(void)
A pointer to a function used to abort the current radio op.
Definition: rf-core.h:97
int rf_core_power_up()
Turn on power to the RFC and boot it.
Definition: rf-core.c:228
void rf_core_primary_mode_register(const rf_core_primary_mode_t *mode)
Register a primary mode for radio operation.
Definition: rf-core.c:433
struct rf_core_primary_mode_s rf_core_primary_mode_t
A data strcuture representing the radio's primary mode of operation.
uint_fast8_t rf_core_send_cmd(uint32_t cmd, uint32_t *status)
Sends a command to the RF core.
Definition: rf-core.c:119
rfc_radioOp_t * rf_core_get_last_radio_op()
Returns a pointer to the most recent proto-dependent Radio Op.
Definition: rf-core.c:418
uint8_t rf_core_primary_mode_restore()
Abort the currently running primary radio op.
Definition: rf-core.c:449
uint8_t rf_core_start_rat()
Start the CM0 RAT.
Definition: rf-core.c:332
void rf_core_init_radio_op(rfc_radioOp_t *op, uint16_t len, uint16_t command)
Prepare a buffer to host a Radio Op.
Definition: rf-core.c:424
void rf_core_cmd_done_dis()
Disable the LAST_CMD_DONE and LAST_FG_CMD_DONE interrupts.
Definition: rf-core.c:412
A data strcuture representing the radio's primary mode of operation.
Definition: rf-core.h:93
uint_fast8_t rf_core_wait_cmd_done(void *cmd)
Block and wait for a Radio op to complete.
Definition: rf-core.c:185