1 /******************************************************************************
2 *  Filename:       rf_prop_cmd.h
3 *
4 *  Description:    CC13x2/CC26x2 API for Proprietary mode commands
5 *
6 *  Copyright (c) 2015 - 2020, Texas Instruments Incorporated
7 *  All rights reserved.
8 *
9 *  Redistribution and use in source and binary forms, with or without
10 *  modification, are permitted provided that the following conditions are met:
11 *
12 *  1) Redistributions of source code must retain the above copyright notice,
13 *     this list of conditions and the following disclaimer.
14 *
15 *  2) Redistributions in binary form must reproduce the above copyright notice,
16 *     this list of conditions and the following disclaimer in the documentation
17 *     and/or other materials provided with the distribution.
18 *
19 *  3) Neither the name of the ORGANIZATION nor the names of its contributors may
20 *     be used to endorse or promote products derived from this software without
21 *     specific prior written permission.
22 *
23 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27 *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 *  POSSIBILITY OF SUCH DAMAGE.
34 *
35 ******************************************************************************/
36 
37 #ifndef __PROP_CMD_H
38 #define __PROP_CMD_H
39 
40 #ifndef __RFC_STRUCT
41 #define __RFC_STRUCT
42 #endif
43 
44 #ifndef __RFC_STRUCT_ATTR
45 #if defined(__GNUC__)
46 #define __RFC_STRUCT_ATTR __attribute__ ((aligned (4)))
47 #elif defined(__TI_ARM__)
48 #define __RFC_STRUCT_ATTR __attribute__ ((__packed__,aligned (4)))
49 #else
50 #define __RFC_STRUCT_ATTR
51 #endif
52 #endif
53 
54 //! \addtogroup rfc
55 //! @{
56 
57 //! \addtogroup prop_cmd
58 //! @{
59 
60 #include <stdint.h>
61 #include "rf_mailbox.h"
62 #include "rf_common_cmd.h"
63 
64 typedef struct __RFC_STRUCT rfc_carrierSense_s rfc_carrierSense_t;
65 typedef struct __RFC_STRUCT rfc_CMD_PROP_TX_s rfc_CMD_PROP_TX_t;
66 typedef struct __RFC_STRUCT rfc_CMD_PROP_RX_s rfc_CMD_PROP_RX_t;
67 typedef struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s rfc_CMD_PROP_TX_ADV_t;
68 typedef struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s rfc_CMD_PROP_RX_ADV_t;
69 typedef struct __RFC_STRUCT rfc_CMD_PROP_CS_s rfc_CMD_PROP_CS_t;
70 typedef struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s rfc_CMD_PROP_RADIO_SETUP_t;
71 typedef struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_s rfc_CMD_PROP_RADIO_DIV_SETUP_t;
72 typedef struct __RFC_STRUCT rfc_CMD_PROP_RX_SNIFF_s rfc_CMD_PROP_RX_SNIFF_t;
73 typedef struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_SNIFF_s rfc_CMD_PROP_RX_ADV_SNIFF_t;
74 typedef struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_PA_s rfc_CMD_PROP_RADIO_SETUP_PA_t;
75 typedef struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_PA_s rfc_CMD_PROP_RADIO_DIV_SETUP_PA_t;
76 typedef struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s rfc_CMD_PROP_SET_LEN_t;
77 typedef struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s rfc_CMD_PROP_RESTART_RX_t;
78 typedef struct __RFC_STRUCT rfc_propRxOutput_s rfc_propRxOutput_t;
79 typedef struct __RFC_STRUCT rfc_propRxStatus_s rfc_propRxStatus_t;
80 
81 //! \addtogroup carrierSense
82 //! @{
83 struct __RFC_STRUCT rfc_carrierSense_s {
84    struct {
85       uint8_t bEnaRssi:1;               //!<        If 1, enable RSSI as a criterion
86       uint8_t bEnaCorr:1;               //!<        If 1, enable correlation as a criterion
87       uint8_t operation:1;              //!< \brief 0: Busy if either RSSI or correlation indicates Busy<br>
88                                         //!<        1: Busy if both RSSI and correlation indicates Busy
89       uint8_t busyOp:1;                 //!< \brief 0: Continue carrier sense on channel Busy<br>
90                                         //!<        1: End carrier sense on channel Busy<br>
91                                         //!<        For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle
92       uint8_t idleOp:1;                 //!< \brief 0: Continue on channel Idle<br>
93                                         //!<        1: End on channel Idle
94       uint8_t timeoutRes:1;             //!< \brief 0: Timeout with channel state Invalid treated as Busy<br>
95                                         //!<        1: Timeout with channel state Invalid treated as Idle
96    } csConf;
97    int8_t rssiThr;                      //!<        RSSI threshold
98    uint8_t numRssiIdle;                 //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is
99                                         //!<        declared Idle
100    uint8_t numRssiBusy;                 //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is
101                                         //!<        declared Busy
102    uint16_t corrPeriod;                 //!<        Number of RAT ticks for a correlation observation periods
103    struct {
104       uint8_t numCorrInv:4;             //!< \brief Number of subsequent correlation tops with maximum <code>corrPeriod</code> RAT
105                                         //!<        ticks between them needed to go from Idle to Invalid
106       uint8_t numCorrBusy:4;            //!< \brief Number of subsequent correlation tops with maximum <code>corrPeriod</code> RAT
107                                         //!<        ticks between them needed to go from Invalid to Busy
108    } corrConfig;
109    struct {
110       uint8_t triggerType:4;            //!<        The type of trigger
111       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
112                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
113       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
114       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
115                                         //!<        1: A trigger in the past is triggered as soon as possible
116    } csEndTrigger;                      //!<        Trigger classifier for ending the carrier sense
117    ratmr_t csEndTime;                   //!<        Time used together with <code>csEndTrigger</code> for ending the operation
118 } __RFC_STRUCT_ATTR;
119 
120 //! @}
121 
122 //! \addtogroup CMD_PROP_TX
123 //! @{
124 #define CMD_PROP_TX                                             0x3801
125 //! Proprietary Mode Transmit Command
126 struct __RFC_STRUCT rfc_CMD_PROP_TX_s {
127    uint16_t commandNo;                  //!<        The command ID number 0x3801
128    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
129                                         //!<        updated by the radio CPU during operation and may be read by the
130                                         //!<        system CPU at any time.
131    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
132    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
133    struct {
134       uint8_t triggerType:4;            //!<        The type of trigger
135       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
136                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
137       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
138       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
139                                         //!<        1: A trigger in the past is triggered as soon as possible
140    } startTrigger;                      //!<        Identification of the trigger that starts the operation
141    struct {
142       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
143       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
144    } condition;
145    struct {
146       uint8_t bFsOff:1;                 //!< \brief 0: Keep frequency synth on after command<br>
147                                         //!<        1: Turn frequency synth off after command
148       uint8_t :2;
149       uint8_t bUseCrc:1;                //!< \brief 0: Do not append CRC<br>
150                                         //!<        1: Append CRC
151       uint8_t bVarLen:1;                //!< \brief 0: Fixed length<br>
152                                         //!<        1: Transmit length as first byte
153    } pktConf;
154    uint8_t pktLen;                      //!<        Packet length
155    uint32_t syncWord;                   //!<        Sync word to transmit
156    uint8_t* pPkt;                       //!<        Pointer to packet
157 } __RFC_STRUCT_ATTR;
158 
159 //! @}
160 
161 //! \addtogroup CMD_PROP_RX
162 //! @{
163 #define CMD_PROP_RX                                             0x3802
164 //! Proprietary Mode Receive Command
165 struct __RFC_STRUCT rfc_CMD_PROP_RX_s {
166    uint16_t commandNo;                  //!<        The command ID number 0x3802
167    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
168                                         //!<        updated by the radio CPU during operation and may be read by the
169                                         //!<        system CPU at any time.
170    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
171    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
172    struct {
173       uint8_t triggerType:4;            //!<        The type of trigger
174       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
175                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
176       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
177       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
178                                         //!<        1: A trigger in the past is triggered as soon as possible
179    } startTrigger;                      //!<        Identification of the trigger that starts the operation
180    struct {
181       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
182       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
183    } condition;
184    struct {
185       uint8_t bFsOff:1;                 //!< \brief 0: Keep frequency synth on after command<br>
186                                         //!<        1: Turn frequency synth off after command
187       uint8_t bRepeatOk:1;              //!< \brief 0: End operation after receiving a packet correctly<br>
188                                         //!<        1: Go back to sync search after receiving a packet correctly
189       uint8_t bRepeatNok:1;             //!< \brief 0: End operation after receiving a packet with CRC error<br>
190                                         //!<        1: Go back to sync search after receiving a packet with CRC error
191       uint8_t bUseCrc:1;                //!< \brief 0: Do not check CRC<br>
192                                         //!<        1: Check CRC
193       uint8_t bVarLen:1;                //!< \brief 0: Fixed length<br>
194                                         //!<        1: Receive length as first byte
195       uint8_t bChkAddress:1;            //!< \brief 0: No address check<br>
196                                         //!<        1: Check address
197       uint8_t endType:1;                //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained<br>
198                                         //!<        1: Packet reception is stopped if end trigger happens
199       uint8_t filterOp:1;               //!< \brief 0: Stop receiver and restart sync search on address mismatch<br>
200                                         //!<        1: Receive packet and mark it as ignored on address mismatch
201    } pktConf;
202    struct {
203       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically discard ignored packets from RX queue
204       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically discard packets with CRC error from RX queue
205       uint8_t :1;
206       uint8_t bIncludeHdr:1;            //!<        If 1, include the received header or length byte in the stored packet; otherwise discard it
207       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
208       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the RX queue
209       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the RX queue
210       uint8_t bAppendStatus:1;          //!<        If 1, append a status byte to the packet in the RX queue
211    } rxConf;                            //!<        RX configuration
212    uint32_t syncWord;                   //!<        Sync word to listen for
213    uint8_t maxPktLen;                   //!< \brief Packet length for fixed length, maximum packet length for variable length<br>
214                                         //!<        0: Unlimited or unknown length
215    uint8_t address0;                    //!<        Address
216    uint8_t address1;                    //!< \brief Address (set equal to <code>address0</code> to accept only one address. If 0xFF, accept
217                                         //!<        0x00 as well)
218    struct {
219       uint8_t triggerType:4;            //!<        The type of trigger
220       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
221                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
222       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
223       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
224                                         //!<        1: A trigger in the past is triggered as soon as possible
225    } endTrigger;                        //!<        Trigger classifier for ending the operation
226    ratmr_t endTime;                     //!<        Time used together with <code>endTrigger</code> for ending the operation
227    dataQueue_t* pQueue;                 //!<        Pointer to receive queue
228    uint8_t* pOutput;                    //!<        Pointer to output structure
229 } __RFC_STRUCT_ATTR;
230 
231 //! @}
232 
233 //! \addtogroup CMD_PROP_TX_ADV
234 //! @{
235 #define CMD_PROP_TX_ADV                                         0x3803
236 //! Proprietary Mode Advanced Transmit Command
237 struct __RFC_STRUCT rfc_CMD_PROP_TX_ADV_s {
238    uint16_t commandNo;                  //!<        The command ID number 0x3803
239    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
240                                         //!<        updated by the radio CPU during operation and may be read by the
241                                         //!<        system CPU at any time.
242    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
243    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
244    struct {
245       uint8_t triggerType:4;            //!<        The type of trigger
246       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
247                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
248       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
249       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
250                                         //!<        1: A trigger in the past is triggered as soon as possible
251    } startTrigger;                      //!<        Identification of the trigger that starts the operation
252    struct {
253       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
254       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
255    } condition;
256    struct {
257       uint8_t bFsOff:1;                 //!< \brief 0: Keep frequency synth on after command<br>
258                                         //!<        1: Turn frequency synth off after command
259       uint8_t :2;
260       uint8_t bUseCrc:1;                //!< \brief 0: Do not append CRC<br>
261                                         //!<        1: Append CRC
262       uint8_t bCrcIncSw:1;              //!< \brief 0:Do not include sync word in CRC calculation<br>
263                                         //!<        1: Include sync word in CRC calculation
264       uint8_t bCrcIncHdr:1;             //!< \brief 0: Do not include header in CRC calculation<br>
265                                         //!<        1: Include header in CRC calculation
266    } pktConf;
267    uint8_t numHdrBits;                  //!<        Number of bits in header (0--32)
268    uint16_t pktLen;                     //!<        Packet length. 0: Unlimited
269    struct {
270       uint8_t bExtTxTrig:1;             //!< \brief 0: Start packet on a fixed time from the command start trigger<br>
271                                         //!<        1: Start packet on an external trigger (input event to RAT)
272       uint8_t inputMode:2;              //!< \brief Input mode if external trigger is used for TX start<br>
273                                         //!<        0: Rising edge<br>
274                                         //!<        1: Falling edge<br>
275                                         //!<        2: Both edges<br>
276                                         //!<        3: <i>Reserved</i>
277       uint8_t source:5;                 //!<        RAT input event number used for capture if external trigger is used for TX start
278    } startConf;
279    struct {
280       uint8_t triggerType:4;            //!<        The type of trigger
281       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
282                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
283       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
284       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
285                                         //!<        1: A trigger in the past is triggered as soon as possible
286    } preTrigger;                        //!<        Trigger for transition from preamble to sync word
287    ratmr_t preTime;                     //!< \brief Time used together with <code>preTrigger</code> for transition from preamble to sync
288                                         //!<        word. If <code>preTrigger.triggerType</code> is set to "now", one preamble as
289                                         //!<        configured in the setup will be sent. Otherwise, the preamble will be repeated until
290                                         //!<        this trigger is observed.
291    uint32_t syncWord;                   //!<        Sync word to transmit
292    uint8_t* pPkt;                       //!<        Pointer to packet, or TX queue for unlimited length
293 } __RFC_STRUCT_ATTR;
294 
295 //! @}
296 
297 //! \addtogroup CMD_PROP_RX_ADV
298 //! @{
299 #define CMD_PROP_RX_ADV                                         0x3804
300 //! Proprietary Mode Advanced Receive Command
301 struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_s {
302    uint16_t commandNo;                  //!<        The command ID number 0x3804
303    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
304                                         //!<        updated by the radio CPU during operation and may be read by the
305                                         //!<        system CPU at any time.
306    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
307    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
308    struct {
309       uint8_t triggerType:4;            //!<        The type of trigger
310       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
311                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
312       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
313       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
314                                         //!<        1: A trigger in the past is triggered as soon as possible
315    } startTrigger;                      //!<        Identification of the trigger that starts the operation
316    struct {
317       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
318       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
319    } condition;
320    struct {
321       uint8_t bFsOff:1;                 //!< \brief 0: Keep frequency synth on after command<br>
322                                         //!<        1: Turn frequency synth off after command
323       uint8_t bRepeatOk:1;              //!< \brief 0: End operation after receiving a packet correctly<br>
324                                         //!<        1: Go back to sync search after receiving a packet correctly
325       uint8_t bRepeatNok:1;             //!< \brief 0: End operation after receiving a packet with CRC error<br>
326                                         //!<        1: Go back to sync search after receiving a packet with CRC error
327       uint8_t bUseCrc:1;                //!< \brief 0: Do not check CRC<br>
328                                         //!<        1: Check CRC
329       uint8_t bCrcIncSw:1;              //!< \brief 0: Do not include sync word in CRC calculation<br>
330                                         //!<        1: Include sync word in CRC calculation
331       uint8_t bCrcIncHdr:1;             //!< \brief 0: Do not include header in CRC calculation <br>
332                                         //!<        1: Include header in CRC calculation
333       uint8_t endType:1;                //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained<br>
334                                         //!<        1: Packet reception is stopped if end trigger happens
335       uint8_t filterOp:1;               //!< \brief 0: Stop receiver and restart sync search on address mismatch<br>
336                                         //!<        1: Receive packet and mark it as ignored on address mismatch
337    } pktConf;
338    struct {
339       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically discard ignored packets from RX queue
340       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically discard packets with CRC error from RX queue
341       uint8_t :1;
342       uint8_t bIncludeHdr:1;            //!<        If 1, include the received header or length byte in the stored packet; otherwise discard it
343       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
344       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the RX queue
345       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the RX queue
346       uint8_t bAppendStatus:1;          //!<        If 1, append a status byte to the packet in the RX queue
347    } rxConf;                            //!<        RX configuration
348    uint32_t syncWord0;                  //!<        Sync word to listen for
349    uint32_t syncWord1;                  //!<        Alternative sync word if non-zero
350    uint16_t maxPktLen;                  //!< \brief Packet length for fixed length, maximum packet length for variable length<br>
351                                         //!<        0: Unlimited or unknown length
352    struct {
353       uint16_t numHdrBits:6;            //!<        Number of bits in header (0--32)
354       uint16_t lenPos:5;                //!<        Position of length field in header (0--31)
355       uint16_t numLenBits:5;            //!<        Number of bits in length field (0--16)
356    } hdrConf;
357    struct {
358       uint16_t addrType:1;              //!< \brief 0: Address after header<br>
359                                         //!<        1: Address in header
360       uint16_t addrSize:5;              //!< \brief If <code>addrType</code> = 0: Address size in bytes<br>
361                                         //!<        If <code>addrType</code> = 1: Address size in bits
362       uint16_t addrPos:5;               //!< \brief If <code>addrType</code> = 1: Bit position of address in header<br>
363                                         //!<        If <code>addrType</code> = 0: Non-zero to extend address with sync word identifier
364       uint16_t numAddr:5;               //!<        Number of addresses in address list
365    } addrConf;
366    int8_t lenOffset;                    //!<        Signed value to add to length field
367    struct {
368       uint8_t triggerType:4;            //!<        The type of trigger
369       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
370                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
371       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
372       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
373                                         //!<        1: A trigger in the past is triggered as soon as possible
374    } endTrigger;                        //!<        Trigger classifier for ending the operation
375    ratmr_t endTime;                     //!<        Time used together with <code>endTrigger</code> for ending the operation
376    uint8_t* pAddr;                      //!<        Pointer to address list
377    dataQueue_t* pQueue;                 //!<        Pointer to receive queue
378    uint8_t* pOutput;                    //!<        Pointer to output structure
379 } __RFC_STRUCT_ATTR;
380 
381 //! @}
382 
383 //! \addtogroup CMD_PROP_CS
384 //! @{
385 #define CMD_PROP_CS                                             0x3805
386 //! Carrier Sense Command
387 struct __RFC_STRUCT rfc_CMD_PROP_CS_s {
388    uint16_t commandNo;                  //!<        The command ID number 0x3805
389    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
390                                         //!<        updated by the radio CPU during operation and may be read by the
391                                         //!<        system CPU at any time.
392    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
393    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
394    struct {
395       uint8_t triggerType:4;            //!<        The type of trigger
396       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
397                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
398       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
399       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
400                                         //!<        1: A trigger in the past is triggered as soon as possible
401    } startTrigger;                      //!<        Identification of the trigger that starts the operation
402    struct {
403       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
404       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
405    } condition;
406    struct {
407       uint8_t bFsOffIdle:1;             //!< \brief 0: Keep synth running if command ends with channel Idle<br>
408                                         //!<        1: Turn off synth if command ends with channel Idle
409       uint8_t bFsOffBusy:1;             //!< \brief 0: Keep synth running if command ends with channel Busy<br>
410                                         //!<        1: Turn off synth if command ends with channel Busy
411    } csFsConf;
412    uint8_t __dummy0;
413    struct {
414       uint8_t bEnaRssi:1;               //!<        If 1, enable RSSI as a criterion
415       uint8_t bEnaCorr:1;               //!<        If 1, enable correlation as a criterion
416       uint8_t operation:1;              //!< \brief 0: Busy if either RSSI or correlation indicates Busy<br>
417                                         //!<        1: Busy if both RSSI and correlation indicates Busy
418       uint8_t busyOp:1;                 //!< \brief 0: Continue carrier sense on channel Busy<br>
419                                         //!<        1: End carrier sense on channel Busy<br>
420                                         //!<        For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle
421       uint8_t idleOp:1;                 //!< \brief 0: Continue on channel Idle<br>
422                                         //!<        1: End on channel Idle
423       uint8_t timeoutRes:1;             //!< \brief 0: Timeout with channel state Invalid treated as Busy<br>
424                                         //!<        1: Timeout with channel state Invalid treated as Idle
425    } csConf;
426    int8_t rssiThr;                      //!<        RSSI threshold
427    uint8_t numRssiIdle;                 //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is
428                                         //!<        declared Idle
429    uint8_t numRssiBusy;                 //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is
430                                         //!<        declared Busy
431    uint16_t corrPeriod;                 //!<        Number of RAT ticks for a correlation observation periods
432    struct {
433       uint8_t numCorrInv:4;             //!< \brief Number of subsequent correlation tops with maximum <code>corrPeriod</code> RAT
434                                         //!<        ticks between them needed to go from Idle to Invalid
435       uint8_t numCorrBusy:4;            //!< \brief Number of subsequent correlation tops with maximum <code>corrPeriod</code> RAT
436                                         //!<        ticks between them needed to go from Invalid to Busy
437    } corrConfig;
438    struct {
439       uint8_t triggerType:4;            //!<        The type of trigger
440       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
441                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
442       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
443       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
444                                         //!<        1: A trigger in the past is triggered as soon as possible
445    } csEndTrigger;                      //!<        Trigger classifier for ending the carrier sense
446    ratmr_t csEndTime;                   //!<        Time used together with <code>csEndTrigger</code> for ending the operation
447 } __RFC_STRUCT_ATTR;
448 
449 //! @}
450 
451 //! \addtogroup CMD_PROP_RADIO_SETUP
452 //! @{
453 #define CMD_PROP_RADIO_SETUP                                    0x3806
454 //! Proprietary Mode Radio Setup Command for 2.4 GHz
455 struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_s {
456    uint16_t commandNo;                  //!<        The command ID number 0x3806
457    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
458                                         //!<        updated by the radio CPU during operation and may be read by the
459                                         //!<        system CPU at any time.
460    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
461    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
462    struct {
463       uint8_t triggerType:4;            //!<        The type of trigger
464       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
465                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
466       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
467       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
468                                         //!<        1: A trigger in the past is triggered as soon as possible
469    } startTrigger;                      //!<        Identification of the trigger that starts the operation
470    struct {
471       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
472       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
473    } condition;
474    struct {
475       uint16_t modType:3;               //!< \brief 0: FSK<br>
476                                         //!<        1: GFSK<br>
477                                         //!<        2: OOK<br>
478                                         //!<        Others: <i>Reserved</i>
479       uint16_t deviation:11;            //!<        Deviation (specified in number of steps, with step size given by <code>deviationStepSz</code>)
480       uint16_t deviationStepSz:2;       //!< \brief Deviation step size<br>
481                                         //!<        0: 250 Hz<br>
482                                         //!<        1: 1000 Hz<br>
483                                         //!<        2: 15.625 Hz<br>
484                                         //!<        3: 62.5 Hz
485    } modulation;
486    struct {
487       uint32_t preScale:8;              //!<        Prescaler value
488       uint32_t rateWord:21;             //!<        Rate word
489       uint32_t decimMode:3;             //!< \brief 0: Use automatic PDIF decimation<br>
490                                         //!<        1: Force PDIF decimation to 0<br>
491                                         //!<        3: Force PDIF decimation to 1<br>
492                                         //!<        5: Force PDIF decimation to 2<br>
493                                         //!<        Others: <i>Reserved</i>
494    } symbolRate;                        //!<        Symbol rate setting
495    uint8_t rxBw;                        //!<        Receiver bandwidth
496    struct {
497       uint8_t nPreamBytes:6;            //!< \brief 0: 1 preamble bit<br>
498                                         //!<        1--16: Number of preamble bytes<br>
499                                         //!<        18, 20, ..., 30: Number of preamble bytes<br>
500                                         //!<        31: 4 preamble bits<br>
501                                         //!<        32: 32 preamble bytes<br>
502                                         //!<        Others: <i>Reserved</i>
503       uint8_t preamMode:2;              //!< \brief 0: Send 0 as the first preamble bit<br>
504                                         //!<        1: Send 1 as the first preamble bit<br>
505                                         //!<        2: Send same first bit in preamble and sync word<br>
506                                         //!<        3: Send different first bit in preamble and sync word
507    } preamConf;
508    struct {
509       uint16_t nSwBits:6;               //!<        Number of sync word bits (8--32)
510       uint16_t bBitReversal:1;          //!< \brief 0: Use positive deviation for 1<br>
511                                         //!<        1: Use positive deviation for 0
512       uint16_t bMsbFirst:1;             //!< \brief 0: Least significant bit transmitted first<br>
513                                         //!<        1: Most significant bit transmitted first
514       uint16_t fecMode:4;               //!< \brief Select coding<br>
515                                         //!<        0: Uncoded binary modulation<br>
516                                         //!<        10: Manchester coded binary modulation<br>
517                                         //!<        Others: <i>Reserved</i>
518       uint16_t :1;
519       uint16_t whitenMode:3;            //!< \brief 0: No whitening<br>
520                                         //!<        1: CC1101/CC2500 compatible whitening<br>
521                                         //!<        2: PN9 whitening without byte reversal<br>
522                                         //!<        3: <i>Reserved</i><br>
523                                         //!<        4: No whitener, 32-bit IEEE 802.15.4g compatible CRC<br>
524                                         //!<        5: IEEE 802.15.4g compatible whitener and 32-bit CRC<br>
525                                         //!<        6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC<br>
526                                         //!<        7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC
527    } formatConf;
528    struct {
529       uint16_t frontEndMode:3;          //!< \brief 0x00: Differential mode<br>
530                                         //!<        0x01: Single-ended mode RFP<br>
531                                         //!<        0x02: Single-ended mode RFN<br>
532                                         //!<        0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)<br>
533                                         //!<        0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)<br>
534                                         //!<        Others: <i>Reserved</i>
535       uint16_t biasMode:1;              //!< \brief 0: Internal bias<br>
536                                         //!<        1: External bias
537       uint16_t analogCfgMode:6;         //!< \brief 0x00: Write analog configuration.<br>
538                                         //!<        Required first time after boot and when changing frequency band
539                                         //!<        or front-end configuration<br>
540                                         //!<        0x2D: Keep analog configuration.<br>
541                                         //!<        May be used after standby or when changing mode with the same frequency
542                                         //!<        band and front-end configuration<br>
543                                         //!<        Others: <i>Reserved</i>
544       uint16_t bNoFsPowerUp:1;          //!< \brief 0: Power up frequency synth<br>
545                                         //!<        1: Do not power up frequency synth
546       uint16_t :1;
547       uint16_t bSynthNarrowBand:1;      //!< \brief 0: Normal synth mode<br>
548                                         //!<        1: Narrow-band synth mode
549    } config;                            //!<        Configuration options
550    uint16_t txPower;                    //!<        Transmit power
551    uint32_t* pRegOverride;              //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no
552                                         //!<        override is used.
553 } __RFC_STRUCT_ATTR;
554 
555 //! @}
556 
557 //! \addtogroup CMD_PROP_RADIO_DIV_SETUP
558 //! @{
559 #define CMD_PROP_RADIO_DIV_SETUP                                0x3807
560 //! Proprietary Mode Radio Setup Command for All Frequency Bands
561 struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_s {
562    uint16_t commandNo;                  //!<        The command ID number 0x3807
563    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
564                                         //!<        updated by the radio CPU during operation and may be read by the
565                                         //!<        system CPU at any time.
566    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
567    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
568    struct {
569       uint8_t triggerType:4;            //!<        The type of trigger
570       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
571                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
572       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
573       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
574                                         //!<        1: A trigger in the past is triggered as soon as possible
575    } startTrigger;                      //!<        Identification of the trigger that starts the operation
576    struct {
577       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
578       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
579    } condition;
580    struct {
581       uint16_t modType:3;               //!< \brief 0: FSK<br>
582                                         //!<        1: GFSK<br>
583                                         //!<        2: OOK<br>
584                                         //!<        Others: <i>Reserved</i>
585       uint16_t deviation:11;            //!<        Deviation (specified in number of steps, with step size given by <code>deviationStepSz</code>)
586       uint16_t deviationStepSz:2;       //!< \brief Deviation step size<br>
587                                         //!<        0: 250 Hz<br>
588                                         //!<        1: 1000 Hz<br>
589                                         //!<        2: 15.625 Hz<br>
590                                         //!<        3: 62.5 Hz
591    } modulation;
592    struct {
593       uint32_t preScale:8;              //!<        Prescaler value
594       uint32_t rateWord:21;             //!<        Rate word
595       uint32_t decimMode:3;             //!< \brief 0: Use automatic PDIF decimation<br>
596                                         //!<        1: Force PDIF decimation to 0<br>
597                                         //!<        3: Force PDIF decimation to 1<br>
598                                         //!<        5: Force PDIF decimation to 2<br>
599                                         //!<        Others: <i>Reserved</i>
600    } symbolRate;                        //!<        Symbol rate setting
601    uint8_t rxBw;                        //!<        Receiver bandwidth
602    struct {
603       uint8_t nPreamBytes:6;            //!< \brief 0: 1 preamble bit<br>
604                                         //!<        1--16: Number of preamble bytes<br>
605                                         //!<        18, 20, ..., 30: Number of preamble bytes<br>
606                                         //!<        31: 4 preamble bits<br>
607                                         //!<        32: 32 preamble bytes<br>
608                                         //!<        Others: <i>Reserved</i>
609       uint8_t preamMode:2;              //!< \brief 0: Send 0 as the first preamble bit<br>
610                                         //!<        1: Send 1 as the first preamble bit<br>
611                                         //!<        2: Send same first bit in preamble and sync word<br>
612                                         //!<        3: Send different first bit in preamble and sync word
613    } preamConf;
614    struct {
615       uint16_t nSwBits:6;               //!<        Number of sync word bits (8--32)
616       uint16_t bBitReversal:1;          //!< \brief 0: Use positive deviation for 1<br>
617                                         //!<        1: Use positive deviation for 0
618       uint16_t bMsbFirst:1;             //!< \brief 0: Least significant bit transmitted first<br>
619                                         //!<        1: Most significant bit transmitted first
620       uint16_t fecMode:4;               //!< \brief Select coding<br>
621                                         //!<        0: Uncoded binary modulation<br>
622                                         //!<        10: Manchester coded binary modulation<br>
623                                         //!<        Others: <i>Reserved</i>
624       uint16_t :1;
625       uint16_t whitenMode:3;            //!< \brief 0: No whitening<br>
626                                         //!<        1: CC1101/CC2500 compatible whitening<br>
627                                         //!<        2: PN9 whitening without byte reversal<br>
628                                         //!<        3: <i>Reserved</i><br>
629                                         //!<        4: No whitener, 32-bit IEEE 802.15.4g compatible CRC<br>
630                                         //!<        5: IEEE 802.15.4g compatible whitener and 32-bit CRC<br>
631                                         //!<        6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC<br>
632                                         //!<        7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC
633    } formatConf;
634    struct {
635       uint16_t frontEndMode:3;          //!< \brief 0x00: Differential mode<br>
636                                         //!<        0x01: Single-ended mode RFP<br>
637                                         //!<        0x02: Single-ended mode RFN<br>
638                                         //!<        0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)<br>
639                                         //!<        0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)<br>
640                                         //!<        Others: <i>Reserved</i>
641       uint16_t biasMode:1;              //!< \brief 0: Internal bias<br>
642                                         //!<        1: External bias
643       uint16_t analogCfgMode:6;         //!< \brief 0x00: Write analog configuration.<br>
644                                         //!<        Required first time after boot and when changing frequency band
645                                         //!<        or front-end configuration<br>
646                                         //!<        0x2D: Keep analog configuration.<br>
647                                         //!<        May be used after standby or when changing mode with the same frequency
648                                         //!<        band and front-end configuration<br>
649                                         //!<        Others: <i>Reserved</i>
650       uint16_t bNoFsPowerUp:1;          //!< \brief 0: Power up frequency synth<br>
651                                         //!<        1: Do not power up frequency synth
652       uint16_t :1;
653       uint16_t bSynthNarrowBand:1;      //!< \brief 0: Normal synth mode<br>
654                                         //!<        1: Narrow-band synth mode
655    } config;                            //!<        Configuration options
656    uint16_t txPower;                    //!<        Transmit power
657    uint32_t* pRegOverride;              //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no
658                                         //!<        override is used.
659    uint16_t centerFreq;                 //!< \brief Center frequency of the frequency band used, in MHz; used for calculating some internal TX and RX parameters.
660                                         //!<        For a single channel RF system, this should be set equal to the RF frequency used.
661                                         //!<        For a multi channel RF system (e.g. frequency hopping spread spectrum), this should be set equal
662                                         //!<        to the center frequency of the frequency band used.
663    int16_t intFreq;                     //!< \brief Intermediate frequency to use for RX, in MHz on 4.12 signed format. TX will use same
664                                         //!<        intermediate frequency if supported, otherwise 0.<br>
665                                         //!<        0x8000: Use default.
666    uint8_t loDivider;                   //!<        LO frequency divider setting to use. Supported values: 0, 2, 4, 5, 6, 10, 12, 15, and 30
667 } __RFC_STRUCT_ATTR;
668 
669 //! @}
670 
671 //! \addtogroup CMD_PROP_RX_SNIFF
672 //! @{
673 #define CMD_PROP_RX_SNIFF                                       0x3808
674 //! Proprietary Mode Receive Command with Sniff Mode
675 struct __RFC_STRUCT rfc_CMD_PROP_RX_SNIFF_s {
676    uint16_t commandNo;                  //!<        The command ID number 0x3808
677    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
678                                         //!<        updated by the radio CPU during operation and may be read by the
679                                         //!<        system CPU at any time.
680    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
681    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
682    struct {
683       uint8_t triggerType:4;            //!<        The type of trigger
684       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
685                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
686       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
687       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
688                                         //!<        1: A trigger in the past is triggered as soon as possible
689    } startTrigger;                      //!<        Identification of the trigger that starts the operation
690    struct {
691       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
692       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
693    } condition;
694    struct {
695       uint8_t bFsOff:1;                 //!< \brief 0: Keep frequency synth on after command<br>
696                                         //!<        1: Turn frequency synth off after command
697       uint8_t bRepeatOk:1;              //!< \brief 0: End operation after receiving a packet correctly<br>
698                                         //!<        1: Go back to sync search after receiving a packet correctly
699       uint8_t bRepeatNok:1;             //!< \brief 0: End operation after receiving a packet with CRC error<br>
700                                         //!<        1: Go back to sync search after receiving a packet with CRC error
701       uint8_t bUseCrc:1;                //!< \brief 0: Do not check CRC<br>
702                                         //!<        1: Check CRC
703       uint8_t bVarLen:1;                //!< \brief 0: Fixed length<br>
704                                         //!<        1: Receive length as first byte
705       uint8_t bChkAddress:1;            //!< \brief 0: No address check<br>
706                                         //!<        1: Check address
707       uint8_t endType:1;                //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained<br>
708                                         //!<        1: Packet reception is stopped if end trigger happens
709       uint8_t filterOp:1;               //!< \brief 0: Stop receiver and restart sync search on address mismatch<br>
710                                         //!<        1: Receive packet and mark it as ignored on address mismatch
711    } pktConf;
712    struct {
713       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically discard ignored packets from RX queue
714       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically discard packets with CRC error from RX queue
715       uint8_t :1;
716       uint8_t bIncludeHdr:1;            //!<        If 1, include the received header or length byte in the stored packet; otherwise discard it
717       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
718       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the RX queue
719       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the RX queue
720       uint8_t bAppendStatus:1;          //!<        If 1, append a status byte to the packet in the RX queue
721    } rxConf;                            //!<        RX configuration
722    uint32_t syncWord;                   //!<        Sync word to listen for
723    uint8_t maxPktLen;                   //!< \brief Packet length for fixed length, maximum packet length for variable length<br>
724                                         //!<        0: Unlimited or unknown length
725    uint8_t address0;                    //!<        Address
726    uint8_t address1;                    //!< \brief Address (set equal to <code>address0</code> to accept only one address. If 0xFF, accept
727                                         //!<        0x00 as well)
728    struct {
729       uint8_t triggerType:4;            //!<        The type of trigger
730       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
731                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
732       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
733       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
734                                         //!<        1: A trigger in the past is triggered as soon as possible
735    } endTrigger;                        //!<        Trigger classifier for ending the operation
736    ratmr_t endTime;                     //!<        Time used together with <code>endTrigger</code> for ending the operation
737    dataQueue_t* pQueue;                 //!<        Pointer to receive queue
738    uint8_t* pOutput;                    //!<        Pointer to output structure
739    struct {
740       uint8_t bEnaRssi:1;               //!<        If 1, enable RSSI as a criterion
741       uint8_t bEnaCorr:1;               //!<        If 1, enable correlation as a criterion
742       uint8_t operation:1;              //!< \brief 0: Busy if either RSSI or correlation indicates Busy<br>
743                                         //!<        1: Busy if both RSSI and correlation indicates Busy
744       uint8_t busyOp:1;                 //!< \brief 0: Continue carrier sense on channel Busy<br>
745                                         //!<        1: End carrier sense on channel Busy<br>
746                                         //!<        For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle
747       uint8_t idleOp:1;                 //!< \brief 0: Continue on channel Idle<br>
748                                         //!<        1: End on channel Idle
749       uint8_t timeoutRes:1;             //!< \brief 0: Timeout with channel state Invalid treated as Busy<br>
750                                         //!<        1: Timeout with channel state Invalid treated as Idle
751    } csConf;
752    int8_t rssiThr;                      //!<        RSSI threshold
753    uint8_t numRssiIdle;                 //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is
754                                         //!<        declared Idle
755    uint8_t numRssiBusy;                 //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is
756                                         //!<        declared Busy
757    uint16_t corrPeriod;                 //!<        Number of RAT ticks for a correlation observation periods
758    struct {
759       uint8_t numCorrInv:4;             //!< \brief Number of subsequent correlation tops with maximum <code>corrPeriod</code> RAT
760                                         //!<        ticks between them needed to go from Idle to Invalid
761       uint8_t numCorrBusy:4;            //!< \brief Number of subsequent correlation tops with maximum <code>corrPeriod</code> RAT
762                                         //!<        ticks between them needed to go from Invalid to Busy
763    } corrConfig;
764    struct {
765       uint8_t triggerType:4;            //!<        The type of trigger
766       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
767                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
768       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
769       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
770                                         //!<        1: A trigger in the past is triggered as soon as possible
771    } csEndTrigger;                      //!<        Trigger classifier for ending the carrier sense
772    ratmr_t csEndTime;                   //!<        Time used together with <code>csEndTrigger</code> for ending the operation
773 } __RFC_STRUCT_ATTR;
774 
775 //! @}
776 
777 //! \addtogroup CMD_PROP_RX_ADV_SNIFF
778 //! @{
779 #define CMD_PROP_RX_ADV_SNIFF                                   0x3809
780 //! Proprietary Mode Advanced Receive Command with Sniff Mode
781 struct __RFC_STRUCT rfc_CMD_PROP_RX_ADV_SNIFF_s {
782    uint16_t commandNo;                  //!<        The command ID number 0x3809
783    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
784                                         //!<        updated by the radio CPU during operation and may be read by the
785                                         //!<        system CPU at any time.
786    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
787    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
788    struct {
789       uint8_t triggerType:4;            //!<        The type of trigger
790       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
791                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
792       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
793       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
794                                         //!<        1: A trigger in the past is triggered as soon as possible
795    } startTrigger;                      //!<        Identification of the trigger that starts the operation
796    struct {
797       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
798       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
799    } condition;
800    struct {
801       uint8_t bFsOff:1;                 //!< \brief 0: Keep frequency synth on after command<br>
802                                         //!<        1: Turn frequency synth off after command
803       uint8_t bRepeatOk:1;              //!< \brief 0: End operation after receiving a packet correctly<br>
804                                         //!<        1: Go back to sync search after receiving a packet correctly
805       uint8_t bRepeatNok:1;             //!< \brief 0: End operation after receiving a packet with CRC error<br>
806                                         //!<        1: Go back to sync search after receiving a packet with CRC error
807       uint8_t bUseCrc:1;                //!< \brief 0: Do not check CRC<br>
808                                         //!<        1: Check CRC
809       uint8_t bCrcIncSw:1;              //!< \brief 0: Do not include sync word in CRC calculation<br>
810                                         //!<        1: Include sync word in CRC calculation
811       uint8_t bCrcIncHdr:1;             //!< \brief 0: Do not include header in CRC calculation <br>
812                                         //!<        1: Include header in CRC calculation
813       uint8_t endType:1;                //!< \brief 0: Packet is received to the end if end trigger happens after sync is obtained<br>
814                                         //!<        1: Packet reception is stopped if end trigger happens
815       uint8_t filterOp:1;               //!< \brief 0: Stop receiver and restart sync search on address mismatch<br>
816                                         //!<        1: Receive packet and mark it as ignored on address mismatch
817    } pktConf;
818    struct {
819       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically discard ignored packets from RX queue
820       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically discard packets with CRC error from RX queue
821       uint8_t :1;
822       uint8_t bIncludeHdr:1;            //!<        If 1, include the received header or length byte in the stored packet; otherwise discard it
823       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
824       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the RX queue
825       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the RX queue
826       uint8_t bAppendStatus:1;          //!<        If 1, append a status byte to the packet in the RX queue
827    } rxConf;                            //!<        RX configuration
828    uint32_t syncWord0;                  //!<        Sync word to listen for
829    uint32_t syncWord1;                  //!<        Alternative sync word if non-zero
830    uint16_t maxPktLen;                  //!< \brief Packet length for fixed length, maximum packet length for variable length<br>
831                                         //!<        0: Unlimited or unknown length
832    struct {
833       uint16_t numHdrBits:6;            //!<        Number of bits in header (0--32)
834       uint16_t lenPos:5;                //!<        Position of length field in header (0--31)
835       uint16_t numLenBits:5;            //!<        Number of bits in length field (0--16)
836    } hdrConf;
837    struct {
838       uint16_t addrType:1;              //!< \brief 0: Address after header<br>
839                                         //!<        1: Address in header
840       uint16_t addrSize:5;              //!< \brief If <code>addrType</code> = 0: Address size in bytes<br>
841                                         //!<        If <code>addrType</code> = 1: Address size in bits
842       uint16_t addrPos:5;               //!< \brief If <code>addrType</code> = 1: Bit position of address in header<br>
843                                         //!<        If <code>addrType</code> = 0: Non-zero to extend address with sync word identifier
844       uint16_t numAddr:5;               //!<        Number of addresses in address list
845    } addrConf;
846    int8_t lenOffset;                    //!<        Signed value to add to length field
847    struct {
848       uint8_t triggerType:4;            //!<        The type of trigger
849       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
850                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
851       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
852       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
853                                         //!<        1: A trigger in the past is triggered as soon as possible
854    } endTrigger;                        //!<        Trigger classifier for ending the operation
855    ratmr_t endTime;                     //!<        Time used together with <code>endTrigger</code> for ending the operation
856    uint8_t* pAddr;                      //!<        Pointer to address list
857    dataQueue_t* pQueue;                 //!<        Pointer to receive queue
858    uint8_t* pOutput;                    //!<        Pointer to output structure
859    struct {
860       uint8_t bEnaRssi:1;               //!<        If 1, enable RSSI as a criterion
861       uint8_t bEnaCorr:1;               //!<        If 1, enable correlation as a criterion
862       uint8_t operation:1;              //!< \brief 0: Busy if either RSSI or correlation indicates Busy<br>
863                                         //!<        1: Busy if both RSSI and correlation indicates Busy
864       uint8_t busyOp:1;                 //!< \brief 0: Continue carrier sense on channel Busy<br>
865                                         //!<        1: End carrier sense on channel Busy<br>
866                                         //!<        For an RX command, the receiver will continue when carrier sense ends, but it will then not end if channel goes Idle
867       uint8_t idleOp:1;                 //!< \brief 0: Continue on channel Idle<br>
868                                         //!<        1: End on channel Idle
869       uint8_t timeoutRes:1;             //!< \brief 0: Timeout with channel state Invalid treated as Busy<br>
870                                         //!<        1: Timeout with channel state Invalid treated as Idle
871    } csConf;
872    int8_t rssiThr;                      //!<        RSSI threshold
873    uint8_t numRssiIdle;                 //!< \brief Number of consecutive RSSI measurements below the threshold needed before the channel is
874                                         //!<        declared Idle
875    uint8_t numRssiBusy;                 //!< \brief Number of consecutive RSSI measurements above the threshold needed before the channel is
876                                         //!<        declared Busy
877    uint16_t corrPeriod;                 //!<        Number of RAT ticks for a correlation observation periods
878    struct {
879       uint8_t numCorrInv:4;             //!< \brief Number of subsequent correlation tops with maximum <code>corrPeriod</code> RAT
880                                         //!<        ticks between them needed to go from Idle to Invalid
881       uint8_t numCorrBusy:4;            //!< \brief Number of subsequent correlation tops with maximum <code>corrPeriod</code> RAT
882                                         //!<        ticks between them needed to go from Invalid to Busy
883    } corrConfig;
884    struct {
885       uint8_t triggerType:4;            //!<        The type of trigger
886       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
887                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
888       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
889       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
890                                         //!<        1: A trigger in the past is triggered as soon as possible
891    } csEndTrigger;                      //!<        Trigger classifier for ending the carrier sense
892    ratmr_t csEndTime;                   //!<        Time used together with <code>csEndTrigger</code> for ending the operation
893 } __RFC_STRUCT_ATTR;
894 
895 //! @}
896 
897 //! \addtogroup CMD_PROP_RADIO_SETUP_PA
898 //! @{
899 //! Proprietary Mode Radio Setup Command for 2.4 GHz with PA Switching Fields
900 struct __RFC_STRUCT rfc_CMD_PROP_RADIO_SETUP_PA_s {
901    uint16_t commandNo;                  //!<        The command ID number
902    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
903                                         //!<        updated by the radio CPU during operation and may be read by the
904                                         //!<        system CPU at any time.
905    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
906    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
907    struct {
908       uint8_t triggerType:4;            //!<        The type of trigger
909       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
910                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
911       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
912       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
913                                         //!<        1: A trigger in the past is triggered as soon as possible
914    } startTrigger;                      //!<        Identification of the trigger that starts the operation
915    struct {
916       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
917       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
918    } condition;
919    struct {
920       uint16_t modType:3;               //!< \brief 0: FSK<br>
921                                         //!<        1: GFSK<br>
922                                         //!<        2: OOK<br>
923                                         //!<        Others: <i>Reserved</i>
924       uint16_t deviation:11;            //!<        Deviation (specified in number of steps, with step size given by <code>deviationStepSz</code>)
925       uint16_t deviationStepSz:2;       //!< \brief Deviation step size<br>
926                                         //!<        0: 250 Hz<br>
927                                         //!<        1: 1000 Hz<br>
928                                         //!<        2: 15.625 Hz<br>
929                                         //!<        3: 62.5 Hz
930    } modulation;
931    struct {
932       uint32_t preScale:8;              //!<        Prescaler value
933       uint32_t rateWord:21;             //!<        Rate word
934       uint32_t decimMode:3;             //!< \brief 0: Use automatic PDIF decimation<br>
935                                         //!<        1: Force PDIF decimation to 0<br>
936                                         //!<        3: Force PDIF decimation to 1<br>
937                                         //!<        5: Force PDIF decimation to 2<br>
938                                         //!<        Others: <i>Reserved</i>
939    } symbolRate;                        //!<        Symbol rate setting
940    uint8_t rxBw;                        //!<        Receiver bandwidth
941    struct {
942       uint8_t nPreamBytes:6;            //!< \brief 0: 1 preamble bit<br>
943                                         //!<        1--16: Number of preamble bytes<br>
944                                         //!<        18, 20, ..., 30: Number of preamble bytes<br>
945                                         //!<        31: 4 preamble bits<br>
946                                         //!<        32: 32 preamble bytes<br>
947                                         //!<        Others: <i>Reserved</i>
948       uint8_t preamMode:2;              //!< \brief 0: Send 0 as the first preamble bit<br>
949                                         //!<        1: Send 1 as the first preamble bit<br>
950                                         //!<        2: Send same first bit in preamble and sync word<br>
951                                         //!<        3: Send different first bit in preamble and sync word
952    } preamConf;
953    struct {
954       uint16_t nSwBits:6;               //!<        Number of sync word bits (8--32)
955       uint16_t bBitReversal:1;          //!< \brief 0: Use positive deviation for 1<br>
956                                         //!<        1: Use positive deviation for 0
957       uint16_t bMsbFirst:1;             //!< \brief 0: Least significant bit transmitted first<br>
958                                         //!<        1: Most significant bit transmitted first
959       uint16_t fecMode:4;               //!< \brief Select coding<br>
960                                         //!<        0: Uncoded binary modulation<br>
961                                         //!<        10: Manchester coded binary modulation<br>
962                                         //!<        Others: <i>Reserved</i>
963       uint16_t :1;
964       uint16_t whitenMode:3;            //!< \brief 0: No whitening<br>
965                                         //!<        1: CC1101/CC2500 compatible whitening<br>
966                                         //!<        2: PN9 whitening without byte reversal<br>
967                                         //!<        3: <i>Reserved</i><br>
968                                         //!<        4: No whitener, 32-bit IEEE 802.15.4g compatible CRC<br>
969                                         //!<        5: IEEE 802.15.4g compatible whitener and 32-bit CRC<br>
970                                         //!<        6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC<br>
971                                         //!<        7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC
972    } formatConf;
973    struct {
974       uint16_t frontEndMode:3;          //!< \brief 0x00: Differential mode<br>
975                                         //!<        0x01: Single-ended mode RFP<br>
976                                         //!<        0x02: Single-ended mode RFN<br>
977                                         //!<        0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)<br>
978                                         //!<        0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)<br>
979                                         //!<        Others: <i>Reserved</i>
980       uint16_t biasMode:1;              //!< \brief 0: Internal bias<br>
981                                         //!<        1: External bias
982       uint16_t analogCfgMode:6;         //!< \brief 0x00: Write analog configuration.<br>
983                                         //!<        Required first time after boot and when changing frequency band
984                                         //!<        or front-end configuration<br>
985                                         //!<        0x2D: Keep analog configuration.<br>
986                                         //!<        May be used after standby or when changing mode with the same frequency
987                                         //!<        band and front-end configuration<br>
988                                         //!<        Others: <i>Reserved</i>
989       uint16_t bNoFsPowerUp:1;          //!< \brief 0: Power up frequency synth<br>
990                                         //!<        1: Do not power up frequency synth
991       uint16_t :1;
992       uint16_t bSynthNarrowBand:1;      //!< \brief 0: Normal synth mode<br>
993                                         //!<        1: Narrow-band synth mode
994    } config;                            //!<        Configuration options
995    uint16_t txPower;                    //!<        Transmit power
996    uint32_t* pRegOverride;              //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no
997                                         //!<        override is used.
998    uint32_t* pRegOverrideTxStd;         //!< \brief Pointer to a list of hardware and configuration registers to override when switching to
999                                         //!<        standard PA. Used by RF driver only, not radio CPU.
1000    uint32_t* pRegOverrideTx20;          //!< \brief Pointer to a list of hardware and configuration registers to override when switching to
1001                                         //!<        20-dBm PA. Used by RF driver only, not radio CPU.
1002 } __RFC_STRUCT_ATTR;
1003 
1004 //! @}
1005 
1006 //! \addtogroup CMD_PROP_RADIO_DIV_SETUP_PA
1007 //! @{
1008 //! Proprietary Mode Radio Setup Command for All Frequency Bands with PA Switching Fields
1009 struct __RFC_STRUCT rfc_CMD_PROP_RADIO_DIV_SETUP_PA_s {
1010    uint16_t commandNo;                  //!<        The command ID number
1011    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
1012                                         //!<        updated by the radio CPU during operation and may be read by the
1013                                         //!<        system CPU at any time.
1014    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
1015    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
1016    struct {
1017       uint8_t triggerType:4;            //!<        The type of trigger
1018       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1019                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1020       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1021       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1022                                         //!<        1: A trigger in the past is triggered as soon as possible
1023    } startTrigger;                      //!<        Identification of the trigger that starts the operation
1024    struct {
1025       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
1026       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
1027    } condition;
1028    struct {
1029       uint16_t modType:3;               //!< \brief 0: FSK<br>
1030                                         //!<        1: GFSK<br>
1031                                         //!<        2: OOK<br>
1032                                         //!<        Others: <i>Reserved</i>
1033       uint16_t deviation:11;            //!<        Deviation (specified in number of steps, with step size given by <code>deviationStepSz</code>)
1034       uint16_t deviationStepSz:2;       //!< \brief Deviation step size<br>
1035                                         //!<        0: 250 Hz<br>
1036                                         //!<        1: 1000 Hz<br>
1037                                         //!<        2: 15.625 Hz<br>
1038                                         //!<        3: 62.5 Hz
1039    } modulation;
1040    struct {
1041       uint32_t preScale:8;              //!<        Prescaler value
1042       uint32_t rateWord:21;             //!<        Rate word
1043       uint32_t decimMode:3;             //!< \brief 0: Use automatic PDIF decimation<br>
1044                                         //!<        1: Force PDIF decimation to 0<br>
1045                                         //!<        3: Force PDIF decimation to 1<br>
1046                                         //!<        5: Force PDIF decimation to 2<br>
1047                                         //!<        Others: <i>Reserved</i>
1048    } symbolRate;                        //!<        Symbol rate setting
1049    uint8_t rxBw;                        //!<        Receiver bandwidth
1050    struct {
1051       uint8_t nPreamBytes:6;            //!< \brief 0: 1 preamble bit<br>
1052                                         //!<        1--16: Number of preamble bytes<br>
1053                                         //!<        18, 20, ..., 30: Number of preamble bytes<br>
1054                                         //!<        31: 4 preamble bits<br>
1055                                         //!<        32: 32 preamble bytes<br>
1056                                         //!<        Others: <i>Reserved</i>
1057       uint8_t preamMode:2;              //!< \brief 0: Send 0 as the first preamble bit<br>
1058                                         //!<        1: Send 1 as the first preamble bit<br>
1059                                         //!<        2: Send same first bit in preamble and sync word<br>
1060                                         //!<        3: Send different first bit in preamble and sync word
1061    } preamConf;
1062    struct {
1063       uint16_t nSwBits:6;               //!<        Number of sync word bits (8--32)
1064       uint16_t bBitReversal:1;          //!< \brief 0: Use positive deviation for 1<br>
1065                                         //!<        1: Use positive deviation for 0
1066       uint16_t bMsbFirst:1;             //!< \brief 0: Least significant bit transmitted first<br>
1067                                         //!<        1: Most significant bit transmitted first
1068       uint16_t fecMode:4;               //!< \brief Select coding<br>
1069                                         //!<        0: Uncoded binary modulation<br>
1070                                         //!<        10: Manchester coded binary modulation<br>
1071                                         //!<        Others: <i>Reserved</i>
1072       uint16_t :1;
1073       uint16_t whitenMode:3;            //!< \brief 0: No whitening<br>
1074                                         //!<        1: CC1101/CC2500 compatible whitening<br>
1075                                         //!<        2: PN9 whitening without byte reversal<br>
1076                                         //!<        3: <i>Reserved</i><br>
1077                                         //!<        4: No whitener, 32-bit IEEE 802.15.4g compatible CRC<br>
1078                                         //!<        5: IEEE 802.15.4g compatible whitener and 32-bit CRC<br>
1079                                         //!<        6: No whitener, dynamically IEEE 802.15.4g compatible 16-bit or 32-bit CRC<br>
1080                                         //!<        7: Dynamically IEEE 802.15.4g compatible whitener and 16-bit or 32-bit CRC
1081    } formatConf;
1082    struct {
1083       uint16_t frontEndMode:3;          //!< \brief 0x00: Differential mode<br>
1084                                         //!<        0x01: Single-ended mode RFP<br>
1085                                         //!<        0x02: Single-ended mode RFN<br>
1086                                         //!<        0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)<br>
1087                                         //!<        0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)<br>
1088                                         //!<        Others: <i>Reserved</i>
1089       uint16_t biasMode:1;              //!< \brief 0: Internal bias<br>
1090                                         //!<        1: External bias
1091       uint16_t analogCfgMode:6;         //!< \brief 0x00: Write analog configuration.<br>
1092                                         //!<        Required first time after boot and when changing frequency band
1093                                         //!<        or front-end configuration<br>
1094                                         //!<        0x2D: Keep analog configuration.<br>
1095                                         //!<        May be used after standby or when changing mode with the same frequency
1096                                         //!<        band and front-end configuration<br>
1097                                         //!<        Others: <i>Reserved</i>
1098       uint16_t bNoFsPowerUp:1;          //!< \brief 0: Power up frequency synth<br>
1099                                         //!<        1: Do not power up frequency synth
1100       uint16_t :1;
1101       uint16_t bSynthNarrowBand:1;      //!< \brief 0: Normal synth mode<br>
1102                                         //!<        1: Narrow-band synth mode
1103    } config;                            //!<        Configuration options
1104    uint16_t txPower;                    //!<        Transmit power
1105    uint32_t* pRegOverride;              //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no
1106                                         //!<        override is used.
1107    uint16_t centerFreq;                 //!< \brief Center frequency of the frequency band used, in MHz; used for calculating some internal TX and RX parameters.
1108                                         //!<        For a single channel RF system, this should be set equal to the RF frequency used.
1109                                         //!<        For a multi channel RF system (e.g. frequency hopping spread spectrum), this should be set equal
1110                                         //!<        to the center frequency of the frequency band used.
1111    int16_t intFreq;                     //!< \brief Intermediate frequency to use for RX, in MHz on 4.12 signed format. TX will use same
1112                                         //!<        intermediate frequency if supported, otherwise 0.<br>
1113                                         //!<        0x8000: Use default.
1114    uint8_t loDivider;                   //!<        LO frequency divider setting to use. Supported values: 0, 2, 4, 5, 6, 10, 12, 15, and 30
1115    uint8_t __dummy0;
1116    uint16_t __dummy1;
1117    uint32_t* pRegOverrideTxStd;         //!< \brief Pointer to a list of hardware and configuration registers to override when switching to
1118                                         //!<        standard PA. Used by RF driver only, not radio CPU.
1119    uint32_t* pRegOverrideTx20;          //!< \brief Pointer to a list of hardware and configuration registers to override when switching to
1120                                         //!<        20-dBm PA. Used by RF driver only, not radio CPU.
1121 } __RFC_STRUCT_ATTR;
1122 
1123 //! @}
1124 
1125 //! \addtogroup CMD_PROP_SET_LEN
1126 //! @{
1127 #define CMD_PROP_SET_LEN                                        0x3401
1128 //! Set Packet Length Command
1129 struct __RFC_STRUCT rfc_CMD_PROP_SET_LEN_s {
1130    uint16_t commandNo;                  //!<        The command ID number 0x3401
1131    uint16_t rxLen;                      //!<        Payload length to use
1132 } __RFC_STRUCT_ATTR;
1133 
1134 //! @}
1135 
1136 //! \addtogroup CMD_PROP_RESTART_RX
1137 //! @{
1138 #define CMD_PROP_RESTART_RX                                     0x3402
1139 //! Restart Packet  Command
1140 struct __RFC_STRUCT rfc_CMD_PROP_RESTART_RX_s {
1141    uint16_t commandNo;                  //!<        The command ID number 0x3402
1142 } __RFC_STRUCT_ATTR;
1143 
1144 //! @}
1145 
1146 //! \addtogroup propRxOutput
1147 //! @{
1148 //! Output structure for RX operations
1149 
1150 struct __RFC_STRUCT rfc_propRxOutput_s {
1151    uint16_t nRxOk;                      //!<        Number of packets that have been received with payload, CRC OK and not ignored
1152    uint16_t nRxNok;                     //!<        Number of packets that have been received with CRC error
1153    uint8_t nRxIgnored;                  //!<        Number of packets that have been received with CRC OK and ignored due to address mismatch
1154    uint8_t nRxStopped;                  //!<        Number of packets not received due to illegal length or address mismatch with pktConf.filterOp = 1
1155    uint8_t nRxBufFull;                  //!<        Number of packets that have been received and discarded due to lack of buffer space
1156    int8_t lastRssi;                     //!<        RSSI of last received packet
1157    ratmr_t timeStamp;                   //!<        Time stamp of last received packet
1158 } __RFC_STRUCT_ATTR;
1159 
1160 //! @}
1161 
1162 //! \addtogroup propRxStatus
1163 //! @{
1164 //! Receive status byte that may be appended to message in receive buffer
1165 
1166 struct __RFC_STRUCT rfc_propRxStatus_s {
1167    struct {
1168       uint8_t addressInd:5;             //!<        Index of address found (0 if not applicable)
1169       uint8_t syncWordId:1;             //!<        0 for primary sync word, 1 for alternate sync word
1170       uint8_t result:2;                 //!< \brief 0: Packet received correctly, not ignored<br>
1171                                         //!<        1: Packet received with CRC error<br>
1172                                         //!<        2: Packet received correctly, but can be ignored<br>
1173                                         //!<        3: Packet reception was aborted
1174    } status;
1175 } __RFC_STRUCT_ATTR;
1176 
1177 //! @}
1178 
1179 //! @}
1180 //! @}
1181 #endif
1182