1 /******************************************************************************
2 *  Filename:       rf_common_cmd.h
3 *
4 *  Description:    CC13x2/CC26x2 API for common/generic 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 __COMMON_CMD_H
38 #define __COMMON_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 common_cmd
58 //! @{
59 
60 #include <stdint.h>
61 #include "rf_mailbox.h"
62 
63 typedef struct __RFC_STRUCT rfc_command_s rfc_command_t;
64 typedef struct __RFC_STRUCT rfc_radioOp_s rfc_radioOp_t;
65 typedef struct __RFC_STRUCT rfc_CMD_NOP_s rfc_CMD_NOP_t;
66 typedef struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_s rfc_CMD_RADIO_SETUP_t;
67 typedef struct __RFC_STRUCT rfc_CMD_FS_s rfc_CMD_FS_t;
68 typedef struct __RFC_STRUCT rfc_CMD_FS_OFF_s rfc_CMD_FS_OFF_t;
69 typedef struct __RFC_STRUCT rfc_CMD_RX_TEST_s rfc_CMD_RX_TEST_t;
70 typedef struct __RFC_STRUCT rfc_CMD_TX_TEST_s rfc_CMD_TX_TEST_t;
71 typedef struct __RFC_STRUCT rfc_CMD_SYNC_STOP_RAT_s rfc_CMD_SYNC_STOP_RAT_t;
72 typedef struct __RFC_STRUCT rfc_CMD_SYNC_START_RAT_s rfc_CMD_SYNC_START_RAT_t;
73 typedef struct __RFC_STRUCT rfc_CMD_RESYNC_RAT_s rfc_CMD_RESYNC_RAT_t;
74 typedef struct __RFC_STRUCT rfc_CMD_COUNT_s rfc_CMD_COUNT_t;
75 typedef struct __RFC_STRUCT rfc_CMD_FS_POWERUP_s rfc_CMD_FS_POWERUP_t;
76 typedef struct __RFC_STRUCT rfc_CMD_FS_POWERDOWN_s rfc_CMD_FS_POWERDOWN_t;
77 typedef struct __RFC_STRUCT rfc_CMD_SCH_IMM_s rfc_CMD_SCH_IMM_t;
78 typedef struct __RFC_STRUCT rfc_CMD_COUNT_BRANCH_s rfc_CMD_COUNT_BRANCH_t;
79 typedef struct __RFC_STRUCT rfc_CMD_PATTERN_CHECK_s rfc_CMD_PATTERN_CHECK_t;
80 typedef struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_PA_s rfc_CMD_RADIO_SETUP_PA_t;
81 typedef struct __RFC_STRUCT rfc_CMD_ABORT_s rfc_CMD_ABORT_t;
82 typedef struct __RFC_STRUCT rfc_CMD_STOP_s rfc_CMD_STOP_t;
83 typedef struct __RFC_STRUCT rfc_CMD_GET_RSSI_s rfc_CMD_GET_RSSI_t;
84 typedef struct __RFC_STRUCT rfc_CMD_UPDATE_RADIO_SETUP_s rfc_CMD_UPDATE_RADIO_SETUP_t;
85 typedef struct __RFC_STRUCT rfc_CMD_TRIGGER_s rfc_CMD_TRIGGER_t;
86 typedef struct __RFC_STRUCT rfc_CMD_GET_FW_INFO_s rfc_CMD_GET_FW_INFO_t;
87 typedef struct __RFC_STRUCT rfc_CMD_START_RAT_s rfc_CMD_START_RAT_t;
88 typedef struct __RFC_STRUCT rfc_CMD_PING_s rfc_CMD_PING_t;
89 typedef struct __RFC_STRUCT rfc_CMD_READ_RFREG_s rfc_CMD_READ_RFREG_t;
90 typedef struct __RFC_STRUCT rfc_CMD_ADD_DATA_ENTRY_s rfc_CMD_ADD_DATA_ENTRY_t;
91 typedef struct __RFC_STRUCT rfc_CMD_REMOVE_DATA_ENTRY_s rfc_CMD_REMOVE_DATA_ENTRY_t;
92 typedef struct __RFC_STRUCT rfc_CMD_FLUSH_QUEUE_s rfc_CMD_FLUSH_QUEUE_t;
93 typedef struct __RFC_STRUCT rfc_CMD_CLEAR_RX_s rfc_CMD_CLEAR_RX_t;
94 typedef struct __RFC_STRUCT rfc_CMD_REMOVE_PENDING_ENTRIES_s rfc_CMD_REMOVE_PENDING_ENTRIES_t;
95 typedef struct __RFC_STRUCT rfc_CMD_SET_RAT_CMP_s rfc_CMD_SET_RAT_CMP_t;
96 typedef struct __RFC_STRUCT rfc_CMD_SET_RAT_CPT_s rfc_CMD_SET_RAT_CPT_t;
97 typedef struct __RFC_STRUCT rfc_CMD_DISABLE_RAT_CH_s rfc_CMD_DISABLE_RAT_CH_t;
98 typedef struct __RFC_STRUCT rfc_CMD_SET_RAT_OUTPUT_s rfc_CMD_SET_RAT_OUTPUT_t;
99 typedef struct __RFC_STRUCT rfc_CMD_ARM_RAT_CH_s rfc_CMD_ARM_RAT_CH_t;
100 typedef struct __RFC_STRUCT rfc_CMD_DISARM_RAT_CH_s rfc_CMD_DISARM_RAT_CH_t;
101 typedef struct __RFC_STRUCT rfc_CMD_SET_TX_POWER_s rfc_CMD_SET_TX_POWER_t;
102 typedef struct __RFC_STRUCT rfc_CMD_SET_TX20_POWER_s rfc_CMD_SET_TX20_POWER_t;
103 typedef struct __RFC_STRUCT rfc_CMD_CHANGE_PA_s rfc_CMD_CHANGE_PA_t;
104 typedef struct __RFC_STRUCT rfc_CMD_UPDATE_HPOSC_FREQ_s rfc_CMD_UPDATE_HPOSC_FREQ_t;
105 typedef struct __RFC_STRUCT rfc_CMD_UPDATE_FS_s rfc_CMD_UPDATE_FS_t;
106 typedef struct __RFC_STRUCT rfc_CMD_MODIFY_FS_s rfc_CMD_MODIFY_FS_t;
107 typedef struct __RFC_STRUCT rfc_CMD_BUS_REQUEST_s rfc_CMD_BUS_REQUEST_t;
108 typedef struct __RFC_STRUCT rfc_CMD_SET_CMD_START_IRQ_s rfc_CMD_SET_CMD_START_IRQ_t;
109 
110 //! \addtogroup command
111 //! @{
112 struct __RFC_STRUCT rfc_command_s {
113    uint16_t commandNo;                  //!<        The command ID number
114 } __RFC_STRUCT_ATTR;
115 
116 //! @}
117 
118 //! \addtogroup radioOp
119 //! @{
120 //! Common definition for radio operation commands
121 
122 struct __RFC_STRUCT rfc_radioOp_s {
123    uint16_t commandNo;                  //!<        The command ID number
124    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
125                                         //!<        updated by the radio CPU during operation and may be read by the
126                                         //!<        system CPU at any time.
127    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
128    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
129    struct {
130       uint8_t triggerType:4;            //!<        The type of trigger
131       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
132                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
133       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
134       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
135                                         //!<        1: A trigger in the past is triggered as soon as possible
136    } startTrigger;                      //!<        Identification of the trigger that starts the operation
137    struct {
138       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
139       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
140    } condition;
141 } __RFC_STRUCT_ATTR;
142 
143 //! @}
144 
145 //! \addtogroup CMD_NOP
146 //! @{
147 #define CMD_NOP                                                 0x0801
148 //! No Operation Command
149 struct __RFC_STRUCT rfc_CMD_NOP_s {
150    uint16_t commandNo;                  //!<        The command ID number 0x0801
151    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
152                                         //!<        updated by the radio CPU during operation and may be read by the
153                                         //!<        system CPU at any time.
154    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
155    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
156    struct {
157       uint8_t triggerType:4;            //!<        The type of trigger
158       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
159                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
160       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
161       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
162                                         //!<        1: A trigger in the past is triggered as soon as possible
163    } startTrigger;                      //!<        Identification of the trigger that starts the operation
164    struct {
165       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
166       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
167    } condition;
168 } __RFC_STRUCT_ATTR;
169 
170 //! @}
171 
172 //! \addtogroup CMD_RADIO_SETUP
173 //! @{
174 #define CMD_RADIO_SETUP                                         0x0802
175 //! Radio Setup Command for Pre-Defined Schemes
176 struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_s {
177    uint16_t commandNo;                  //!<        The command ID number 0x0802
178    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
179                                         //!<        updated by the radio CPU during operation and may be read by the
180                                         //!<        system CPU at any time.
181    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
182    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
183    struct {
184       uint8_t triggerType:4;            //!<        The type of trigger
185       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
186                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
187       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
188       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
189                                         //!<        1: A trigger in the past is triggered as soon as possible
190    } startTrigger;                      //!<        Identification of the trigger that starts the operation
191    struct {
192       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
193       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
194    } condition;
195    uint8_t mode;                        //!< \brief The main mode to use<br>
196                                         //!<        0x00: BLE<br>
197                                         //!<        0x01: IEEE 802.15.4<br>
198                                         //!<        0x02: 2 Mbps GFSK<br>
199                                         //!<        0x05: 5 Mbps coded 8-FSK<br>
200                                         //!<        0xFF: Keep existing mode; update overrides only<br>
201                                         //!<        Others: <i>Reserved</i>
202    uint8_t loDivider;                   //!< \brief LO divider setting to use. Supported values: 0, 2, 4,
203                                         //!<        5, 6, 10, 12, 15, and 30.
204    struct {
205       uint16_t frontEndMode:3;          //!< \brief 0x00: Differential mode<br>
206                                         //!<        0x01: Single-ended mode RFP<br>
207                                         //!<        0x02: Single-ended mode RFN<br>
208                                         //!<        0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)<br>
209                                         //!<        0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)<br>
210                                         //!<        Others: <i>Reserved</i>
211       uint16_t biasMode:1;              //!< \brief 0: Internal bias<br>
212                                         //!<        1: External bias
213       uint16_t analogCfgMode:6;         //!< \brief 0x00: Write analog configuration.<br>
214                                         //!<        Required first time after boot and when changing frequency band
215                                         //!<        or front-end configuration<br>
216                                         //!<        0x2D: Keep analog configuration.<br>
217                                         //!<        May be used after standby or when changing mode with the same frequency
218                                         //!<        band and front-end configuration<br>
219                                         //!<        Others: <i>Reserved</i>
220       uint16_t bNoFsPowerUp:1;          //!< \brief 0: Power up frequency synth<br>
221                                         //!<        1: Do not power up frequency synth
222       uint16_t :1;
223       uint16_t bSynthNarrowBand:1;      //!< \brief 0: Normal synth mode<br>
224                                         //!<        1: Narrow-band synth mode
225    } config;                            //!<        Configuration options
226    uint16_t txPower;                    //!<        Transmit power
227    uint32_t* pRegOverride;              //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no
228                                         //!<        override is used.
229 } __RFC_STRUCT_ATTR;
230 
231 //! @}
232 
233 //! \addtogroup CMD_FS
234 //! @{
235 #define CMD_FS                                                  0x0803
236 //! Frequency Synthesizer Programming Command
237 struct __RFC_STRUCT rfc_CMD_FS_s {
238    uint16_t commandNo;                  //!<        The command ID number 0x0803
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    uint16_t frequency;                  //!<        The frequency in MHz to tune to
257    uint16_t fractFreq;                  //!<        Fractional part of the frequency to tune to
258    struct {
259       uint8_t bTxMode:1;                //!< \brief 0: Start synth in RX mode<br>
260                                         //!<        1: Start synth in TX mode
261       uint8_t refFreq:6;                //!< \brief 0: Use default reference frequency<br>
262                                         //!<        Others: Use reference frequency 48 MHz/<code>refFreq</code>
263    } synthConf;
264    uint8_t __dummy0;                    //!<        <i>Reserved</i>, always write 0
265    uint8_t __dummy1;                    //!<        <i>Reserved</i>
266    uint8_t __dummy2;                    //!<        <i>Reserved</i>
267    uint16_t __dummy3;                   //!<        <i>Reserved</i>
268 } __RFC_STRUCT_ATTR;
269 
270 //! @}
271 
272 //! \addtogroup CMD_FS_OFF
273 //! @{
274 #define CMD_FS_OFF                                              0x0804
275 //! Command for Turning off Frequency Synthesizer
276 struct __RFC_STRUCT rfc_CMD_FS_OFF_s {
277    uint16_t commandNo;                  //!<        The command ID number 0x0804
278    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
279                                         //!<        updated by the radio CPU during operation and may be read by the
280                                         //!<        system CPU at any time.
281    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
282    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
283    struct {
284       uint8_t triggerType:4;            //!<        The type of trigger
285       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
286                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
287       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
288       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
289                                         //!<        1: A trigger in the past is triggered as soon as possible
290    } startTrigger;                      //!<        Identification of the trigger that starts the operation
291    struct {
292       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
293       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
294    } condition;
295 } __RFC_STRUCT_ATTR;
296 
297 //! @}
298 
299 //! \addtogroup CMD_RX_TEST
300 //! @{
301 #define CMD_RX_TEST                                             0x0807
302 //! Receiver Test Command
303 struct __RFC_STRUCT rfc_CMD_RX_TEST_s {
304    uint16_t commandNo;                  //!<        The command ID number 0x0807
305    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
306                                         //!<        updated by the radio CPU during operation and may be read by the
307                                         //!<        system CPU at any time.
308    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
309    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
310    struct {
311       uint8_t triggerType:4;            //!<        The type of trigger
312       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
313                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
314       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
315       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
316                                         //!<        1: A trigger in the past is triggered as soon as possible
317    } startTrigger;                      //!<        Identification of the trigger that starts the operation
318    struct {
319       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
320       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
321    } condition;
322    struct {
323       uint8_t bEnaFifo:1;               //!< \brief 0: Do not enable FIFO in modem, so that received data is not available<br>
324                                         //!<        1: Enable FIFO in modem -- the data must be read out by the application
325       uint8_t bFsOff:1;                 //!< \brief 0: Keep frequency synth on after command<br>
326                                         //!<        1: Turn frequency synth off after command
327       uint8_t bNoSync:1;                //!< \brief 0: Run sync search as normal for the configured mode<br>
328                                         //!<        1: Write correlation thresholds to the maximum value to avoid getting sync
329    } config;
330    struct {
331       uint8_t triggerType:4;            //!<        The type of trigger
332       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
333                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
334       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
335       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
336                                         //!<        1: A trigger in the past is triggered as soon as possible
337    } endTrigger;                        //!<        Trigger classifier for ending the operation
338    uint32_t syncWord;                   //!<        Sync word to use for receiver
339    ratmr_t endTime;                     //!<        Time to end the operation
340 } __RFC_STRUCT_ATTR;
341 
342 //! @}
343 
344 //! \addtogroup CMD_TX_TEST
345 //! @{
346 #define CMD_TX_TEST                                             0x0808
347 //! Transmitter Test Command
348 struct __RFC_STRUCT rfc_CMD_TX_TEST_s {
349    uint16_t commandNo;                  //!<        The command ID number 0x0808
350    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
351                                         //!<        updated by the radio CPU during operation and may be read by the
352                                         //!<        system CPU at any time.
353    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
354    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
355    struct {
356       uint8_t triggerType:4;            //!<        The type of trigger
357       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
358                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
359       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
360       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
361                                         //!<        1: A trigger in the past is triggered as soon as possible
362    } startTrigger;                      //!<        Identification of the trigger that starts the operation
363    struct {
364       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
365       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
366    } condition;
367    struct {
368       uint8_t bUseCw:1;                 //!< \brief 0: Send modulated signal<br>
369                                         //!<        1: Send continuous wave
370       uint8_t bFsOff:1;                 //!< \brief 0: Keep frequency synth on after command<br>
371                                         //!<        1: Turn frequency synth off after command
372       uint8_t whitenMode:2;             //!< \brief 0: No whitening<br>
373                                         //!<        1: Default whitening<br>
374                                         //!<        2: PRBS-15<br>
375                                         //!<        3: PRBS-32
376    } config;
377    uint8_t __dummy0;
378    uint16_t txWord;                     //!<        Value to send to the modem before whitening
379    uint8_t __dummy1;
380    struct {
381       uint8_t triggerType:4;            //!<        The type of trigger
382       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
383                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
384       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
385       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
386                                         //!<        1: A trigger in the past is triggered as soon as possible
387    } endTrigger;                        //!<        Trigger classifier for ending the operation
388    uint32_t syncWord;                   //!<        Sync word to use for transmitter
389    ratmr_t endTime;                     //!<        Time to end the operation
390 } __RFC_STRUCT_ATTR;
391 
392 //! @}
393 
394 //! \addtogroup CMD_SYNC_STOP_RAT
395 //! @{
396 #define CMD_SYNC_STOP_RAT                                       0x0809
397 //! Synchronize and Stop Radio Timer Command
398 struct __RFC_STRUCT rfc_CMD_SYNC_STOP_RAT_s {
399    uint16_t commandNo;                  //!<        The command ID number 0x0809
400    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
401                                         //!<        updated by the radio CPU during operation and may be read by the
402                                         //!<        system CPU at any time.
403    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
404    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
405    struct {
406       uint8_t triggerType:4;            //!<        The type of trigger
407       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
408                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
409       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
410       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
411                                         //!<        1: A trigger in the past is triggered as soon as possible
412    } startTrigger;                      //!<        Identification of the trigger that starts the operation
413    struct {
414       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
415       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
416    } condition;
417    uint16_t __dummy0;
418    ratmr_t rat0;                        //!< \brief The returned RAT timer value corresponding to the value the RAT would have had when the
419                                         //!<        RTC was zero
420 } __RFC_STRUCT_ATTR;
421 
422 //! @}
423 
424 //! \addtogroup CMD_SYNC_START_RAT
425 //! @{
426 #define CMD_SYNC_START_RAT                                      0x080A
427 //! Synchrously Start Radio Timer Command
428 struct __RFC_STRUCT rfc_CMD_SYNC_START_RAT_s {
429    uint16_t commandNo;                  //!<        The command ID number 0x080A
430    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
431                                         //!<        updated by the radio CPU during operation and may be read by the
432                                         //!<        system CPU at any time.
433    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
434    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
435    struct {
436       uint8_t triggerType:4;            //!<        The type of trigger
437       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
438                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
439       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
440       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
441                                         //!<        1: A trigger in the past is triggered as soon as possible
442    } startTrigger;                      //!<        Identification of the trigger that starts the operation
443    struct {
444       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
445       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
446    } condition;
447    uint16_t __dummy0;
448    ratmr_t rat0;                        //!< \brief The desired RAT timer value corresponding to the value the RAT would have had when the
449                                         //!<        RTC was zero. This parameter is returned by CMD_SYNC_STOP_RAT
450 } __RFC_STRUCT_ATTR;
451 
452 //! @}
453 
454 //! \addtogroup CMD_RESYNC_RAT
455 //! @{
456 #define CMD_RESYNC_RAT                                          0x0816
457 //! Re-calculate rat0 value while RAT is running
458 struct __RFC_STRUCT rfc_CMD_RESYNC_RAT_s {
459    uint16_t commandNo;                  //!<        The command ID number 0x0816
460    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
461                                         //!<        updated by the radio CPU during operation and may be read by the
462                                         //!<        system CPU at any time.
463    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
464    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
465    struct {
466       uint8_t triggerType:4;            //!<        The type of trigger
467       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
468                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
469       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
470       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
471                                         //!<        1: A trigger in the past is triggered as soon as possible
472    } startTrigger;                      //!<        Identification of the trigger that starts the operation
473    struct {
474       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
475       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
476    } condition;
477    uint16_t __dummy0;
478    ratmr_t rat0;                        //!< \brief The desired RAT timer value corresponding to the value the RAT would have had when the
479                                         //!<        RTC was zero
480 } __RFC_STRUCT_ATTR;
481 
482 //! @}
483 
484 //! \addtogroup CMD_COUNT
485 //! @{
486 #define CMD_COUNT                                               0x080B
487 //! Counter Command
488 struct __RFC_STRUCT rfc_CMD_COUNT_s {
489    uint16_t commandNo;                  //!<        The command ID number 0x080B
490    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
491                                         //!<        updated by the radio CPU during operation and may be read by the
492                                         //!<        system CPU at any time.
493    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
494    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
495    struct {
496       uint8_t triggerType:4;            //!<        The type of trigger
497       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
498                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
499       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
500       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
501                                         //!<        1: A trigger in the past is triggered as soon as possible
502    } startTrigger;                      //!<        Identification of the trigger that starts the operation
503    struct {
504       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
505       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
506    } condition;
507    uint16_t counter;                    //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation
508                                         //!<        differs if the result is zero
509 } __RFC_STRUCT_ATTR;
510 
511 //! @}
512 
513 //! \addtogroup CMD_FS_POWERUP
514 //! @{
515 #define CMD_FS_POWERUP                                          0x080C
516 //! Power up Frequency Syntheszier Command
517 struct __RFC_STRUCT rfc_CMD_FS_POWERUP_s {
518    uint16_t commandNo;                  //!<        The command ID number 0x080C
519    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
520                                         //!<        updated by the radio CPU during operation and may be read by the
521                                         //!<        system CPU at any time.
522    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
523    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
524    struct {
525       uint8_t triggerType:4;            //!<        The type of trigger
526       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
527                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
528       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
529       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
530                                         //!<        1: A trigger in the past is triggered as soon as possible
531    } startTrigger;                      //!<        Identification of the trigger that starts the operation
532    struct {
533       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
534       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
535    } condition;
536    uint16_t __dummy0;
537    uint32_t* pRegOverride;              //!<        Pointer to a list of hardware and configuration registers to override. If NULL, no override is used.
538 } __RFC_STRUCT_ATTR;
539 
540 //! @}
541 
542 //! \addtogroup CMD_FS_POWERDOWN
543 //! @{
544 #define CMD_FS_POWERDOWN                                        0x080D
545 //! Power down Frequency Syntheszier Command
546 struct __RFC_STRUCT rfc_CMD_FS_POWERDOWN_s {
547    uint16_t commandNo;                  //!<        The command ID number 0x080D
548    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
549                                         //!<        updated by the radio CPU during operation and may be read by the
550                                         //!<        system CPU at any time.
551    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
552    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
553    struct {
554       uint8_t triggerType:4;            //!<        The type of trigger
555       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
556                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
557       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
558       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
559                                         //!<        1: A trigger in the past is triggered as soon as possible
560    } startTrigger;                      //!<        Identification of the trigger that starts the operation
561    struct {
562       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
563       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
564    } condition;
565 } __RFC_STRUCT_ATTR;
566 
567 //! @}
568 
569 //! \addtogroup CMD_SCH_IMM
570 //! @{
571 #define CMD_SCH_IMM                                             0x0810
572 //! Run Immidiate Command as Radio Operation Command
573 struct __RFC_STRUCT rfc_CMD_SCH_IMM_s {
574    uint16_t commandNo;                  //!<        The command ID number 0x0810
575    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
576                                         //!<        updated by the radio CPU during operation and may be read by the
577                                         //!<        system CPU at any time.
578    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
579    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
580    struct {
581       uint8_t triggerType:4;            //!<        The type of trigger
582       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
583                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
584       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
585       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
586                                         //!<        1: A trigger in the past is triggered as soon as possible
587    } startTrigger;                      //!<        Identification of the trigger that starts the operation
588    struct {
589       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
590       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
591    } condition;
592    uint16_t __dummy0;
593    uint32_t cmdrVal;                    //!<        Value as would be written to CMDR
594    uint32_t cmdstaVal;                  //!<        Value as would be returned in CMDSTA
595 } __RFC_STRUCT_ATTR;
596 
597 //! @}
598 
599 //! \addtogroup CMD_COUNT_BRANCH
600 //! @{
601 #define CMD_COUNT_BRANCH                                        0x0812
602 //! Counter Command with Branch of Command Chain
603 struct __RFC_STRUCT rfc_CMD_COUNT_BRANCH_s {
604    uint16_t commandNo;                  //!<        The command ID number 0x0812
605    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
606                                         //!<        updated by the radio CPU during operation and may be read by the
607                                         //!<        system CPU at any time.
608    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
609    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
610    struct {
611       uint8_t triggerType:4;            //!<        The type of trigger
612       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
613                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
614       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
615       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
616                                         //!<        1: A trigger in the past is triggered as soon as possible
617    } startTrigger;                      //!<        Identification of the trigger that starts the operation
618    struct {
619       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
620       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
621    } condition;
622    uint16_t counter;                    //!< \brief Counter. On start, the radio CPU decrements the value, and the end status of the operation
623                                         //!<        differs if the result is zero
624    rfc_radioOp_t *pNextOpIfOk;          //!<        Pointer to next operation if counter did not expire
625 } __RFC_STRUCT_ATTR;
626 
627 //! @}
628 
629 //! \addtogroup CMD_PATTERN_CHECK
630 //! @{
631 #define CMD_PATTERN_CHECK                                       0x0813
632 //! Command for Checking a Value in Memory aginst a Pattern
633 struct __RFC_STRUCT rfc_CMD_PATTERN_CHECK_s {
634    uint16_t commandNo;                  //!<        The command ID number 0x0813
635    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
636                                         //!<        updated by the radio CPU during operation and may be read by the
637                                         //!<        system CPU at any time.
638    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
639    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
640    struct {
641       uint8_t triggerType:4;            //!<        The type of trigger
642       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
643                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
644       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
645       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
646                                         //!<        1: A trigger in the past is triggered as soon as possible
647    } startTrigger;                      //!<        Identification of the trigger that starts the operation
648    struct {
649       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
650       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
651    } condition;
652    struct {
653       uint16_t operation:2;             //!< \brief Operation to perform<br>
654                                         //!<        0: True if value == <code>compareVal</code><br>
655                                         //!<        1: True if value < <code>compareVal</code><br>
656                                         //!<        2: True if value > <code>compareVal</code><br>
657                                         //!<        3: <i>Reserved</i>
658       uint16_t bByteRev:1;              //!< \brief If 1, interchange the four bytes of the value, so that they are read
659                                         //!<        most-significant-byte-first.
660       uint16_t bBitRev:1;               //!<        If 1, perform bit reversal of the value
661       uint16_t signExtend:5;            //!< \brief 0: Treat value and <code>compareVal</code> as unsigned<br>
662                                         //!<        1--31: Treat value and <code>compareVal</code> as signed, where the value
663                                         //!<        gives the number of the most significant bit in the signed number.
664       uint16_t bRxVal:1;                //!< \brief 0: Use <code>pValue</code> as a pointer<br>
665                                         //!<        1: Use <code>pValue</code> as a signed offset to the start of the last
666                                         //!<        committed RX entry element
667    } patternOpt;                        //!<        Options for comparison
668    rfc_radioOp_t *pNextOpIfOk;          //!<        Pointer to next operation if comparison result was true
669    uint8_t* pValue;                     //!<        Pointer to read from, or offset from last RX entry if <code>patternOpt.bRxVal</code> == 1
670    uint32_t mask;                       //!<        Bit mask to apply before comparison
671    uint32_t compareVal;                 //!<        Value to compare to
672 } __RFC_STRUCT_ATTR;
673 
674 //! @}
675 
676 //! \addtogroup CMD_RADIO_SETUP_PA
677 //! @{
678 //! Radio Setup Command for Pre-Defined Schemes with PA Switching Fields
679 struct __RFC_STRUCT rfc_CMD_RADIO_SETUP_PA_s {
680    uint16_t commandNo;                  //!<        The command ID number
681    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
682                                         //!<        updated by the radio CPU during operation and may be read by the
683                                         //!<        system CPU at any time.
684    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
685    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
686    struct {
687       uint8_t triggerType:4;            //!<        The type of trigger
688       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
689                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
690       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
691       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
692                                         //!<        1: A trigger in the past is triggered as soon as possible
693    } startTrigger;                      //!<        Identification of the trigger that starts the operation
694    struct {
695       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
696       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
697    } condition;
698    uint8_t mode;                        //!< \brief The main mode to use<br>
699                                         //!<        0x00: BLE<br>
700                                         //!<        0x01: IEEE 802.15.4<br>
701                                         //!<        0x02: 2 Mbps GFSK<br>
702                                         //!<        0x05: 5 Mbps coded 8-FSK<br>
703                                         //!<        0xFF: Keep existing mode; update overrides only<br>
704                                         //!<        Others: <i>Reserved</i>
705    uint8_t loDivider;                   //!< \brief LO divider setting to use. Supported values: 0, 2, 4,
706                                         //!<        5, 6, 10, 12, 15, and 30.
707    struct {
708       uint16_t frontEndMode:3;          //!< \brief 0x00: Differential mode<br>
709                                         //!<        0x01: Single-ended mode RFP<br>
710                                         //!<        0x02: Single-ended mode RFN<br>
711                                         //!<        0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)<br>
712                                         //!<        0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)<br>
713                                         //!<        Others: <i>Reserved</i>
714       uint16_t biasMode:1;              //!< \brief 0: Internal bias<br>
715                                         //!<        1: External bias
716       uint16_t analogCfgMode:6;         //!< \brief 0x00: Write analog configuration.<br>
717                                         //!<        Required first time after boot and when changing frequency band
718                                         //!<        or front-end configuration<br>
719                                         //!<        0x2D: Keep analog configuration.<br>
720                                         //!<        May be used after standby or when changing mode with the same frequency
721                                         //!<        band and front-end configuration<br>
722                                         //!<        Others: <i>Reserved</i>
723       uint16_t bNoFsPowerUp:1;          //!< \brief 0: Power up frequency synth<br>
724                                         //!<        1: Do not power up frequency synth
725       uint16_t :1;
726       uint16_t bSynthNarrowBand:1;      //!< \brief 0: Normal synth mode<br>
727                                         //!<        1: Narrow-band synth mode
728    } config;                            //!<        Configuration options
729    uint16_t txPower;                    //!<        Transmit power
730    uint32_t* pRegOverride;              //!< \brief Pointer to a list of hardware and configuration registers to override. If NULL, no
731                                         //!<        override is used.
732    uint32_t* pRegOverrideTxStd;         //!< \brief Pointer to a list of hardware and configuration registers to override when switching to
733                                         //!<        standard PA. Used by RF driver only, not radio CPU.
734    uint32_t* pRegOverrideTx20;          //!< \brief Pointer to a list of hardware and configuration registers to override when switching to
735                                         //!<        20-dBm PA. Used by RF driver only, not radio CPU.
736 } __RFC_STRUCT_ATTR;
737 
738 //! @}
739 
740 //! \addtogroup CMD_ABORT
741 //! @{
742 #define CMD_ABORT                                               0x0401
743 //! Abort Running Radio Operation Command
744 struct __RFC_STRUCT rfc_CMD_ABORT_s {
745    uint16_t commandNo;                  //!<        The command ID number 0x0401
746 } __RFC_STRUCT_ATTR;
747 
748 //! @}
749 
750 //! \addtogroup CMD_STOP
751 //! @{
752 #define CMD_STOP                                                0x0402
753 //! Stop Running Radio Operation Command Gracefully
754 struct __RFC_STRUCT rfc_CMD_STOP_s {
755    uint16_t commandNo;                  //!<        The command ID number 0x0402
756 } __RFC_STRUCT_ATTR;
757 
758 //! @}
759 
760 //! \addtogroup CMD_GET_RSSI
761 //! @{
762 #define CMD_GET_RSSI                                            0x0403
763 //! Read RSSI Command
764 struct __RFC_STRUCT rfc_CMD_GET_RSSI_s {
765    uint16_t commandNo;                  //!<        The command ID number 0x0403
766 } __RFC_STRUCT_ATTR;
767 
768 //! @}
769 
770 //! \addtogroup CMD_UPDATE_RADIO_SETUP
771 //! @{
772 #define CMD_UPDATE_RADIO_SETUP                                  0x0001
773 //! Update Radio Settings Command
774 struct __RFC_STRUCT rfc_CMD_UPDATE_RADIO_SETUP_s {
775    uint16_t commandNo;                  //!<        The command ID number 0x0001
776    uint16_t __dummy0;
777    uint32_t* pRegOverride;              //!<        Pointer to a list of hardware and configuration registers to override
778 } __RFC_STRUCT_ATTR;
779 
780 //! @}
781 
782 //! \addtogroup CMD_TRIGGER
783 //! @{
784 #define CMD_TRIGGER                                             0x0404
785 //! Generate Command Trigger
786 struct __RFC_STRUCT rfc_CMD_TRIGGER_s {
787    uint16_t commandNo;                  //!<        The command ID number 0x0404
788    uint8_t triggerNo;                   //!<        Command trigger number
789 } __RFC_STRUCT_ATTR;
790 
791 //! @}
792 
793 //! \addtogroup CMD_GET_FW_INFO
794 //! @{
795 #define CMD_GET_FW_INFO                                         0x0002
796 //! Request Information on the RF Core ROM Firmware
797 struct __RFC_STRUCT rfc_CMD_GET_FW_INFO_s {
798    uint16_t commandNo;                  //!<        The command ID number 0x0002
799    uint16_t versionNo;                  //!<        Firmware version number
800    uint16_t startOffset;                //!<        The start of free RAM
801    uint16_t freeRamSz;                  //!<        The size of free RAM
802    uint16_t availRatCh;                 //!<        Bitmap of available RAT channels
803 } __RFC_STRUCT_ATTR;
804 
805 //! @}
806 
807 //! \addtogroup CMD_START_RAT
808 //! @{
809 #define CMD_START_RAT                                           0x0405
810 //! Asynchronously Start Radio Timer Command
811 struct __RFC_STRUCT rfc_CMD_START_RAT_s {
812    uint16_t commandNo;                  //!<        The command ID number 0x0405
813 } __RFC_STRUCT_ATTR;
814 
815 //! @}
816 
817 //! \addtogroup CMD_PING
818 //! @{
819 #define CMD_PING                                                0x0406
820 //! Respond with Command ACK Only
821 struct __RFC_STRUCT rfc_CMD_PING_s {
822    uint16_t commandNo;                  //!<        The command ID number 0x0406
823 } __RFC_STRUCT_ATTR;
824 
825 //! @}
826 
827 //! \addtogroup CMD_READ_RFREG
828 //! @{
829 #define CMD_READ_RFREG                                          0x0601
830 //! Read RF Core Hardware Register
831 struct __RFC_STRUCT rfc_CMD_READ_RFREG_s {
832    uint16_t commandNo;                  //!<        The command ID number 0x0601
833    uint16_t address;                    //!<        The offset from the start of the RF core HW register bank (0x40040000)
834    uint32_t value;                      //!<        Returned value of the register
835 } __RFC_STRUCT_ATTR;
836 
837 //! @}
838 
839 //! \addtogroup CMD_ADD_DATA_ENTRY
840 //! @{
841 #define CMD_ADD_DATA_ENTRY                                      0x0005
842 //! Add Data Entry to Queue
843 struct __RFC_STRUCT rfc_CMD_ADD_DATA_ENTRY_s {
844    uint16_t commandNo;                  //!<        The command ID number 0x0005
845    uint16_t __dummy0;
846    dataQueue_t* pQueue;                 //!<        Pointer to the queue structure to which the entry will be added
847    uint8_t* pEntry;                     //!<        Pointer to the entry
848 } __RFC_STRUCT_ATTR;
849 
850 //! @}
851 
852 //! \addtogroup CMD_REMOVE_DATA_ENTRY
853 //! @{
854 #define CMD_REMOVE_DATA_ENTRY                                   0x0006
855 //! Remove First Data Entry from Queue
856 struct __RFC_STRUCT rfc_CMD_REMOVE_DATA_ENTRY_s {
857    uint16_t commandNo;                  //!<        The command ID number 0x0006
858    uint16_t __dummy0;
859    dataQueue_t* pQueue;                 //!<        Pointer to the queue structure from which the entry will be removed
860    uint8_t* pEntry;                     //!<        Pointer to the entry that was removed
861 } __RFC_STRUCT_ATTR;
862 
863 //! @}
864 
865 //! \addtogroup CMD_FLUSH_QUEUE
866 //! @{
867 #define CMD_FLUSH_QUEUE                                         0x0007
868 //! Flush Data Queue
869 struct __RFC_STRUCT rfc_CMD_FLUSH_QUEUE_s {
870    uint16_t commandNo;                  //!<        The command ID number 0x0007
871    uint16_t __dummy0;
872    dataQueue_t* pQueue;                 //!<        Pointer to the queue structure to be flushed
873    uint8_t* pFirstEntry;                //!<        Pointer to the first entry that was removed
874 } __RFC_STRUCT_ATTR;
875 
876 //! @}
877 
878 //! \addtogroup CMD_CLEAR_RX
879 //! @{
880 #define CMD_CLEAR_RX                                            0x0008
881 //! Clear all RX Queue Entries
882 struct __RFC_STRUCT rfc_CMD_CLEAR_RX_s {
883    uint16_t commandNo;                  //!<        The command ID number 0x0008
884    uint16_t __dummy0;
885    dataQueue_t* pQueue;                 //!<        Pointer to the queue structure to be cleared
886 } __RFC_STRUCT_ATTR;
887 
888 //! @}
889 
890 //! \addtogroup CMD_REMOVE_PENDING_ENTRIES
891 //! @{
892 #define CMD_REMOVE_PENDING_ENTRIES                              0x0009
893 //! Remove Pending Entries from Queue
894 struct __RFC_STRUCT rfc_CMD_REMOVE_PENDING_ENTRIES_s {
895    uint16_t commandNo;                  //!<        The command ID number 0x0009
896    uint16_t __dummy0;
897    dataQueue_t* pQueue;                 //!<        Pointer to the queue structure to be flushed
898    uint8_t* pFirstEntry;                //!<        Pointer to the first entry that was removed
899 } __RFC_STRUCT_ATTR;
900 
901 //! @}
902 
903 //! \addtogroup CMD_SET_RAT_CMP
904 //! @{
905 #define CMD_SET_RAT_CMP                                         0x000A
906 //! Set Radio Timer Channel in Compare Mode
907 struct __RFC_STRUCT rfc_CMD_SET_RAT_CMP_s {
908    uint16_t commandNo;                  //!<        The command ID number 0x000A
909    uint8_t ratCh;                       //!<        The radio timer channel number
910    uint8_t __dummy0;
911    ratmr_t compareTime;                 //!<        The time at which the compare occurs
912 } __RFC_STRUCT_ATTR;
913 
914 //! @}
915 
916 //! \addtogroup CMD_SET_RAT_CPT
917 //! @{
918 #define CMD_SET_RAT_CPT                                         0x0603
919 //! Set Radio Timer Channel in Capture Mode
920 struct __RFC_STRUCT rfc_CMD_SET_RAT_CPT_s {
921    uint16_t commandNo;                  //!<        The command ID number 0x0603
922    struct {
923       uint16_t :3;
924       uint16_t inputSrc:5;              //!<        Input source indicator
925       uint16_t ratCh:4;                 //!<        The radio timer channel number
926       uint16_t bRepeated:1;             //!< \brief 0: Single capture mode<br>
927                                         //!<        1: Repeated capture mode
928       uint16_t inputMode:2;             //!< \brief Input mode:<br>
929                                         //!<        0: Capture on rising edge<br>
930                                         //!<        1: Capture on falling edge<br>
931                                         //!<        2: Capture on both edges<br>
932                                         //!<        3: <i>Reserved</i>
933    } config;
934 } __RFC_STRUCT_ATTR;
935 
936 //! @}
937 
938 //! \addtogroup CMD_DISABLE_RAT_CH
939 //! @{
940 #define CMD_DISABLE_RAT_CH                                      0x0408
941 //! Disable Radio Timer Channel
942 struct __RFC_STRUCT rfc_CMD_DISABLE_RAT_CH_s {
943    uint16_t commandNo;                  //!<        The command ID number 0x0408
944    uint8_t ratCh;                       //!<        The radio timer channel number
945 } __RFC_STRUCT_ATTR;
946 
947 //! @}
948 
949 //! \addtogroup CMD_SET_RAT_OUTPUT
950 //! @{
951 #define CMD_SET_RAT_OUTPUT                                      0x0604
952 //! Set Radio Timer Output to a Specified Mode
953 struct __RFC_STRUCT rfc_CMD_SET_RAT_OUTPUT_s {
954    uint16_t commandNo;                  //!<        The command ID number 0x0604
955    struct {
956       uint16_t :2;
957       uint16_t outputSel:3;             //!<        Output event indicator
958       uint16_t outputMode:3;            //!< \brief 0: Set output line low as default; and pulse on event. Duration of pulse is one RF Core clock period (ca. 41.67 ns).<br>
959                                         //!<        1: Set output line high on event<br>
960                                         //!<        2: Set output line low on event<br>
961                                         //!<        3: Toggle (invert) output line state on event<br>
962                                         //!<        4: Immediately set output line to low (does not change upon event)<br>
963                                         //!<        5: Immediately set output line to high (does not change upon event)<br>
964                                         //!<        Others: <i>Reserved</i>
965       uint16_t ratCh:4;                 //!<        The radio timer channel number
966    } config;
967 } __RFC_STRUCT_ATTR;
968 
969 //! @}
970 
971 //! \addtogroup CMD_ARM_RAT_CH
972 //! @{
973 #define CMD_ARM_RAT_CH                                          0x0409
974 //! Arm Radio Timer Channel
975 struct __RFC_STRUCT rfc_CMD_ARM_RAT_CH_s {
976    uint16_t commandNo;                  //!<        The command ID number 0x0409
977    uint8_t ratCh;                       //!<        The radio timer channel number
978 } __RFC_STRUCT_ATTR;
979 
980 //! @}
981 
982 //! \addtogroup CMD_DISARM_RAT_CH
983 //! @{
984 #define CMD_DISARM_RAT_CH                                       0x040A
985 //! Disarm Radio Timer Channel
986 struct __RFC_STRUCT rfc_CMD_DISARM_RAT_CH_s {
987    uint16_t commandNo;                  //!<        The command ID number 0x040A
988    uint8_t ratCh;                       //!<        The radio timer channel number
989 } __RFC_STRUCT_ATTR;
990 
991 //! @}
992 
993 //! \addtogroup CMD_SET_TX_POWER
994 //! @{
995 #define CMD_SET_TX_POWER                                        0x0010
996 //! Set Transmit Power
997 struct __RFC_STRUCT rfc_CMD_SET_TX_POWER_s {
998    uint16_t commandNo;                  //!<        The command ID number 0x0010
999    uint16_t txPower;                    //!<        New TX power setting
1000 } __RFC_STRUCT_ATTR;
1001 
1002 //! @}
1003 
1004 //! \addtogroup CMD_SET_TX20_POWER
1005 //! @{
1006 #define CMD_SET_TX20_POWER                                      0x0014
1007 //! Set Transmit Power for 20-dBm PA
1008 struct __RFC_STRUCT rfc_CMD_SET_TX20_POWER_s {
1009    uint16_t commandNo;                  //!<        The command ID number 0x0014
1010    uint16_t __dummy0;
1011    uint32_t tx20Power;                  //!<        New TX power setting
1012 } __RFC_STRUCT_ATTR;
1013 
1014 //! @}
1015 
1016 //! \addtogroup CMD_CHANGE_PA
1017 //! @{
1018 #define CMD_CHANGE_PA                                           0x0015
1019 //! Set TX power with possibility to switch between PAs
1020 struct __RFC_STRUCT rfc_CMD_CHANGE_PA_s {
1021    uint16_t commandNo;                  //!<        The command ID number 0x0015
1022    uint16_t __dummy0;
1023    uint32_t* pRegOverride;              //!< \brief Pointer to a list of hardware and configuration registers to override as part of the
1024                                         //!<        change, including new TX power
1025 } __RFC_STRUCT_ATTR;
1026 
1027 //! @}
1028 
1029 //! \addtogroup CMD_UPDATE_HPOSC_FREQ
1030 //! @{
1031 #define CMD_UPDATE_HPOSC_FREQ                                   0x0608
1032 //! Set New Frequency Offset for HPOSC
1033 struct __RFC_STRUCT rfc_CMD_UPDATE_HPOSC_FREQ_s {
1034    uint16_t commandNo;                  //!<        The command ID number 0x0608
1035    int16_t freqOffset;                  //!<        Relative frequency offset, signed, scaled by 2<sup>-22</sup>
1036 } __RFC_STRUCT_ATTR;
1037 
1038 //! @}
1039 
1040 //! \addtogroup CMD_UPDATE_FS
1041 //! @{
1042 #define CMD_UPDATE_FS                                           0x0011
1043 //! Set New Synthesizer Frequency without Recalibration (Deprecated; use CMD_MODIFY_FS)
1044 struct __RFC_STRUCT rfc_CMD_UPDATE_FS_s {
1045    uint16_t commandNo;                  //!<        The command ID number 0x0011
1046    uint16_t __dummy0;
1047    uint32_t __dummy1;
1048    uint32_t __dummy2;
1049    uint16_t __dummy3;
1050    uint16_t frequency;                  //!<        The frequency in MHz to tune to
1051    uint16_t fractFreq;                  //!<        Fractional part of the frequency to tune to
1052 } __RFC_STRUCT_ATTR;
1053 
1054 //! @}
1055 
1056 //! \addtogroup CMD_MODIFY_FS
1057 //! @{
1058 #define CMD_MODIFY_FS                                           0x0013
1059 //! Set New Synthesizer Frequency without Recalibration
1060 struct __RFC_STRUCT rfc_CMD_MODIFY_FS_s {
1061    uint16_t commandNo;                  //!<        The command ID number 0x0013
1062    uint16_t frequency;                  //!<        The frequency in MHz to tune to
1063    uint16_t fractFreq;                  //!<        Fractional part of the frequency to tune to
1064 } __RFC_STRUCT_ATTR;
1065 
1066 //! @}
1067 
1068 //! \addtogroup CMD_BUS_REQUEST
1069 //! @{
1070 #define CMD_BUS_REQUEST                                         0x040E
1071 //! Request System Bus to be Availbale
1072 struct __RFC_STRUCT rfc_CMD_BUS_REQUEST_s {
1073    uint16_t commandNo;                  //!<        The command ID number 0x040E
1074    uint8_t bSysBusNeeded;               //!< \brief 0: System bus may sleep<br>
1075                                         //!<        1: System bus access needed
1076 } __RFC_STRUCT_ATTR;
1077 
1078 //! @}
1079 
1080 //! \addtogroup CMD_SET_CMD_START_IRQ
1081 //! @{
1082 #define CMD_SET_CMD_START_IRQ                                   0x0411
1083 //! Enable or disable generation of IRQ when a radio operation command starts
1084 struct __RFC_STRUCT rfc_CMD_SET_CMD_START_IRQ_s {
1085    uint16_t commandNo;                  //!<        The command ID number 0x0411
1086    uint8_t bEna;                        //!<        1 to enable interrupt generation; 0 to disable it
1087 } __RFC_STRUCT_ATTR;
1088 
1089 //! @}
1090 
1091 //! @}
1092 //! @}
1093 #endif
1094