1 /******************************************************************************
2 *  Filename:       rf_ble_cmd.h
3 *
4 *  Description:    CC13x2/CC26x2 API for Bluetooth Low Energy 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 __BLE_CMD_H
38 #define __BLE_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 ble_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_bleRadioOp_s rfc_bleRadioOp_t;
65 typedef struct __RFC_STRUCT rfc_ble5RadioOp_s rfc_ble5RadioOp_t;
66 typedef struct __RFC_STRUCT rfc_ble5Tx20RadioOp_s rfc_ble5Tx20RadioOp_t;
67 typedef struct __RFC_STRUCT rfc_CMD_BLE_SLAVE_s rfc_CMD_BLE_SLAVE_t;
68 typedef struct __RFC_STRUCT rfc_CMD_BLE_MASTER_s rfc_CMD_BLE_MASTER_t;
69 typedef struct __RFC_STRUCT rfc_CMD_BLE_ADV_s rfc_CMD_BLE_ADV_t;
70 typedef struct __RFC_STRUCT rfc_CMD_BLE_ADV_DIR_s rfc_CMD_BLE_ADV_DIR_t;
71 typedef struct __RFC_STRUCT rfc_CMD_BLE_ADV_NC_s rfc_CMD_BLE_ADV_NC_t;
72 typedef struct __RFC_STRUCT rfc_CMD_BLE_ADV_SCAN_s rfc_CMD_BLE_ADV_SCAN_t;
73 typedef struct __RFC_STRUCT rfc_CMD_BLE_SCANNER_s rfc_CMD_BLE_SCANNER_t;
74 typedef struct __RFC_STRUCT rfc_CMD_BLE_INITIATOR_s rfc_CMD_BLE_INITIATOR_t;
75 typedef struct __RFC_STRUCT rfc_CMD_BLE_GENERIC_RX_s rfc_CMD_BLE_GENERIC_RX_t;
76 typedef struct __RFC_STRUCT rfc_CMD_BLE_TX_TEST_s rfc_CMD_BLE_TX_TEST_t;
77 typedef struct __RFC_STRUCT rfc_CMD_BLE_ADV_PAYLOAD_s rfc_CMD_BLE_ADV_PAYLOAD_t;
78 typedef struct __RFC_STRUCT rfc_CMD_BLE5_RADIO_SETUP_s rfc_CMD_BLE5_RADIO_SETUP_t;
79 typedef struct __RFC_STRUCT rfc_CMD_BLE5_SLAVE_s rfc_CMD_BLE5_SLAVE_t;
80 typedef struct __RFC_STRUCT rfc_CMD_BLE5_MASTER_s rfc_CMD_BLE5_MASTER_t;
81 typedef struct __RFC_STRUCT rfc_CMD_BLE5_ADV_EXT_s rfc_CMD_BLE5_ADV_EXT_t;
82 typedef struct __RFC_STRUCT rfc_CMD_BLE5_ADV_AUX_s rfc_CMD_BLE5_ADV_AUX_t;
83 typedef struct __RFC_STRUCT rfc_CMD_BLE5_ADV_PER_s rfc_CMD_BLE5_ADV_PER_t;
84 typedef struct __RFC_STRUCT rfc_CMD_BLE5_SCANNER_PER_s rfc_CMD_BLE5_SCANNER_PER_t;
85 typedef struct __RFC_STRUCT rfc_CMD_BLE5_SCANNER_s rfc_CMD_BLE5_SCANNER_t;
86 typedef struct __RFC_STRUCT rfc_CMD_BLE5_INITIATOR_s rfc_CMD_BLE5_INITIATOR_t;
87 typedef struct __RFC_STRUCT rfc_CMD_BLE5_GENERIC_RX_s rfc_CMD_BLE5_GENERIC_RX_t;
88 typedef struct __RFC_STRUCT rfc_CMD_BLE5_TX_TEST_s rfc_CMD_BLE5_TX_TEST_t;
89 typedef struct __RFC_STRUCT rfc_CMD_BLE5_ADV_s rfc_CMD_BLE5_ADV_t;
90 typedef struct __RFC_STRUCT rfc_CMD_BLE5_ADV_DIR_s rfc_CMD_BLE5_ADV_DIR_t;
91 typedef struct __RFC_STRUCT rfc_CMD_BLE5_ADV_NC_s rfc_CMD_BLE5_ADV_NC_t;
92 typedef struct __RFC_STRUCT rfc_CMD_BLE5_ADV_SCAN_s rfc_CMD_BLE5_ADV_SCAN_t;
93 typedef struct __RFC_STRUCT rfc_CMD_BLE5_RADIO_SETUP_PA_s rfc_CMD_BLE5_RADIO_SETUP_PA_t;
94 typedef struct __RFC_STRUCT rfc_bleMasterSlavePar_s rfc_bleMasterSlavePar_t;
95 typedef struct __RFC_STRUCT rfc_bleSlavePar_s rfc_bleSlavePar_t;
96 typedef struct __RFC_STRUCT rfc_bleMasterPar_s rfc_bleMasterPar_t;
97 typedef struct __RFC_STRUCT rfc_bleAdvPar_s rfc_bleAdvPar_t;
98 typedef struct __RFC_STRUCT rfc_bleScannerPar_s rfc_bleScannerPar_t;
99 typedef struct __RFC_STRUCT rfc_bleInitiatorPar_s rfc_bleInitiatorPar_t;
100 typedef struct __RFC_STRUCT rfc_bleGenericRxPar_s rfc_bleGenericRxPar_t;
101 typedef struct __RFC_STRUCT rfc_bleTxTestPar_s rfc_bleTxTestPar_t;
102 typedef struct __RFC_STRUCT rfc_ble5SlavePar_s rfc_ble5SlavePar_t;
103 typedef struct __RFC_STRUCT rfc_ble5MasterPar_s rfc_ble5MasterPar_t;
104 typedef struct __RFC_STRUCT rfc_ble5AdvExtPar_s rfc_ble5AdvExtPar_t;
105 typedef struct __RFC_STRUCT rfc_ble5AdvAuxPar_s rfc_ble5AdvAuxPar_t;
106 typedef struct __RFC_STRUCT rfc_ble5AdvPerPar_s rfc_ble5AdvPerPar_t;
107 typedef struct __RFC_STRUCT rfc_ble5AuxChRes_s rfc_ble5AuxChRes_t;
108 typedef struct __RFC_STRUCT rfc_ble5ScannerPar_s rfc_ble5ScannerPar_t;
109 typedef struct __RFC_STRUCT rfc_ble5ScannerPerPar_s rfc_ble5ScannerPerPar_t;
110 typedef struct __RFC_STRUCT rfc_ble5InitiatorPar_s rfc_ble5InitiatorPar_t;
111 typedef struct __RFC_STRUCT rfc_bleMasterSlaveOutput_s rfc_bleMasterSlaveOutput_t;
112 typedef struct __RFC_STRUCT rfc_bleAdvOutput_s rfc_bleAdvOutput_t;
113 typedef struct __RFC_STRUCT rfc_bleScannerOutput_s rfc_bleScannerOutput_t;
114 typedef struct __RFC_STRUCT rfc_bleInitiatorOutput_s rfc_bleInitiatorOutput_t;
115 typedef struct __RFC_STRUCT rfc_ble5ScanInitOutput_s rfc_ble5ScanInitOutput_t;
116 typedef struct __RFC_STRUCT rfc_bleGenericRxOutput_s rfc_bleGenericRxOutput_t;
117 typedef struct __RFC_STRUCT rfc_bleTxTestOutput_s rfc_bleTxTestOutput_t;
118 typedef struct __RFC_STRUCT rfc_ble5ExtAdvEntry_s rfc_ble5ExtAdvEntry_t;
119 typedef struct __RFC_STRUCT rfc_bleWhiteListEntry_s rfc_bleWhiteListEntry_t;
120 typedef struct __RFC_STRUCT rfc_ble5AdiEntry_s rfc_ble5AdiEntry_t;
121 typedef struct __RFC_STRUCT rfc_bleRxStatus_s rfc_bleRxStatus_t;
122 typedef struct __RFC_STRUCT rfc_ble5RxStatus_s rfc_ble5RxStatus_t;
123 
124 //! \addtogroup bleRadioOp
125 //! @{
126 struct __RFC_STRUCT rfc_bleRadioOp_s {
127    uint16_t commandNo;                  //!<        The command ID number
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    uint8_t channel;                     //!< \brief Channel to use<br>
146                                         //!<        0--39: BLE advertising/data channel index<br>
147                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
148                                         //!<        255: Use existing frequency<br>
149                                         //!<        Others: <i>Reserved</i>
150    struct {
151       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
152                                         //!<        0: Do not use whitening<br>
153                                         //!<        Other value: Initialization for 7-bit LFSR whitener
154       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
155                                         //!<        1: Override whitening initialization with value of init
156    } whitening;
157    uint8_t* pParams;                    //!<        Pointer to command specific parameter structure
158    uint8_t* pOutput;                    //!<        Pointer to command specific output structure
159 } __RFC_STRUCT_ATTR;
160 
161 //! @}
162 
163 //! \addtogroup ble5RadioOp
164 //! @{
165 struct __RFC_STRUCT rfc_ble5RadioOp_s {
166    uint16_t commandNo;                  //!<        The command ID number
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    uint8_t channel;                     //!< \brief Channel to use<br>
185                                         //!<        0--39: BLE advertising/data channel index<br>
186                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
187                                         //!<        255: Use existing frequency<br>
188                                         //!<        Others: <i>Reserved</i>
189    struct {
190       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
191                                         //!<        0: Do not use whitening<br>
192                                         //!<        Other value: Initialization for 7-bit LFSR whitener
193       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
194                                         //!<        1: Override whitening initialization with value of init
195    } whitening;
196    struct {
197       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
198                                         //!<        0: 1 Mbps<br>
199                                         //!<        1: 2 Mbps<br>
200                                         //!<        2: Coded<br>
201                                         //!<        3: <i>Reserved</i>
202       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
203                                         //!<        See the Technical Reference Manual for details.
204    } phyMode;
205    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
206    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
207                                         //!<        0x0000: Use default TX power<br>
208                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
209                                         //!<        structure that includes <code>tx20Power</code> must be used)
210    uint8_t* pParams;                    //!<        Pointer to command specific parameter structure
211    uint8_t* pOutput;                    //!<        Pointer to command specific output structure
212 } __RFC_STRUCT_ATTR;
213 
214 //! @}
215 
216 //! \addtogroup ble5Tx20RadioOp
217 //! @{
218 //! Command structure for Bluetooth commands which includes the optional field for 20-dBm PA TX power
219 struct __RFC_STRUCT rfc_ble5Tx20RadioOp_s {
220    uint16_t commandNo;                  //!<        The command ID number
221    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
222                                         //!<        updated by the radio CPU during operation and may be read by the
223                                         //!<        system CPU at any time.
224    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
225    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
226    struct {
227       uint8_t triggerType:4;            //!<        The type of trigger
228       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
229                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
230       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
231       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
232                                         //!<        1: A trigger in the past is triggered as soon as possible
233    } startTrigger;                      //!<        Identification of the trigger that starts the operation
234    struct {
235       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
236       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
237    } condition;
238    uint8_t channel;                     //!< \brief Channel to use<br>
239                                         //!<        0--39: BLE advertising/data channel index<br>
240                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
241                                         //!<        255: Use existing frequency<br>
242                                         //!<        Others: <i>Reserved</i>
243    struct {
244       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
245                                         //!<        0: Do not use whitening<br>
246                                         //!<        Other value: Initialization for 7-bit LFSR whitener
247       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
248                                         //!<        1: Override whitening initialization with value of init
249    } whitening;
250    struct {
251       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
252                                         //!<        0: 1 Mbps<br>
253                                         //!<        1: 2 Mbps<br>
254                                         //!<        2: Coded<br>
255                                         //!<        3: <i>Reserved</i>
256       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
257                                         //!<        See the Technical Reference Manual for details.
258    } phyMode;
259    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
260    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
261                                         //!<        0x0000: Use default TX power<br>
262                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
263                                         //!<        structure that includes <code>tx20Power</code> must be used)
264    uint8_t* pParams;                    //!<        Pointer to command specific parameter structure
265    uint8_t* pOutput;                    //!<        Pointer to command specific output structure
266    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
267                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
268                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
269                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
270                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
271                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
272                                         //!<        CPU and may be omitted from the structure.
273 } __RFC_STRUCT_ATTR;
274 
275 //! @}
276 
277 //! \addtogroup CMD_BLE_SLAVE
278 //! @{
279 #define CMD_BLE_SLAVE                                           0x1801
280 //! BLE Slave Command
281 struct __RFC_STRUCT rfc_CMD_BLE_SLAVE_s {
282    uint16_t commandNo;                  //!<        The command ID number 0x1801
283    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
284                                         //!<        updated by the radio CPU during operation and may be read by the
285                                         //!<        system CPU at any time.
286    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
287    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
288    struct {
289       uint8_t triggerType:4;            //!<        The type of trigger
290       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
291                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
292       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
293       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
294                                         //!<        1: A trigger in the past is triggered as soon as possible
295    } startTrigger;                      //!<        Identification of the trigger that starts the operation
296    struct {
297       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
298       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
299    } condition;
300    uint8_t channel;                     //!< \brief Channel to use<br>
301                                         //!<        0--39: BLE advertising/data channel index<br>
302                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
303                                         //!<        255: Use existing frequency<br>
304                                         //!<        Others: <i>Reserved</i>
305    struct {
306       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
307                                         //!<        0: Do not use whitening<br>
308                                         //!<        Other value: Initialization for 7-bit LFSR whitener
309       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
310                                         //!<        1: Override whitening initialization with value of init
311    } whitening;
312    rfc_bleSlavePar_t *pParams;          //!<        Pointer to command specific parameter structure
313    rfc_bleMasterSlaveOutput_t *pOutput; //!<        Pointer to command specific output structure
314 } __RFC_STRUCT_ATTR;
315 
316 //! @}
317 
318 //! \addtogroup CMD_BLE_MASTER
319 //! @{
320 #define CMD_BLE_MASTER                                          0x1802
321 //! BLE Master Command
322 struct __RFC_STRUCT rfc_CMD_BLE_MASTER_s {
323    uint16_t commandNo;                  //!<        The command ID number 0x1802
324    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
325                                         //!<        updated by the radio CPU during operation and may be read by the
326                                         //!<        system CPU at any time.
327    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
328    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
329    struct {
330       uint8_t triggerType:4;            //!<        The type of trigger
331       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
332                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
333       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
334       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
335                                         //!<        1: A trigger in the past is triggered as soon as possible
336    } startTrigger;                      //!<        Identification of the trigger that starts the operation
337    struct {
338       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
339       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
340    } condition;
341    uint8_t channel;                     //!< \brief Channel to use<br>
342                                         //!<        0--39: BLE advertising/data channel index<br>
343                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
344                                         //!<        255: Use existing frequency<br>
345                                         //!<        Others: <i>Reserved</i>
346    struct {
347       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
348                                         //!<        0: Do not use whitening<br>
349                                         //!<        Other value: Initialization for 7-bit LFSR whitener
350       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
351                                         //!<        1: Override whitening initialization with value of init
352    } whitening;
353    rfc_bleMasterPar_t *pParams;         //!<        Pointer to command specific parameter structure
354    rfc_bleMasterSlaveOutput_t *pOutput; //!<        Pointer to command specific output structure
355 } __RFC_STRUCT_ATTR;
356 
357 //! @}
358 
359 //! \addtogroup CMD_BLE_ADV
360 //! @{
361 #define CMD_BLE_ADV                                             0x1803
362 //! BLE Connectable Undirected Advertiser Command
363 struct __RFC_STRUCT rfc_CMD_BLE_ADV_s {
364    uint16_t commandNo;                  //!<        The command ID number 0x1803
365    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
366                                         //!<        updated by the radio CPU during operation and may be read by the
367                                         //!<        system CPU at any time.
368    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
369    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
370    struct {
371       uint8_t triggerType:4;            //!<        The type of trigger
372       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
373                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
374       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
375       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
376                                         //!<        1: A trigger in the past is triggered as soon as possible
377    } startTrigger;                      //!<        Identification of the trigger that starts the operation
378    struct {
379       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
380       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
381    } condition;
382    uint8_t channel;                     //!< \brief Channel to use<br>
383                                         //!<        0--39: BLE advertising/data channel index<br>
384                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
385                                         //!<        255: Use existing frequency<br>
386                                         //!<        Others: <i>Reserved</i>
387    struct {
388       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
389                                         //!<        0: Do not use whitening<br>
390                                         //!<        Other value: Initialization for 7-bit LFSR whitener
391       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
392                                         //!<        1: Override whitening initialization with value of init
393    } whitening;
394    rfc_bleAdvPar_t *pParams;            //!<        Pointer to command specific parameter structure
395    rfc_bleAdvOutput_t *pOutput;         //!<        Pointer to command specific output structure
396 } __RFC_STRUCT_ATTR;
397 
398 //! @}
399 
400 //! \addtogroup CMD_BLE_ADV_DIR
401 //! @{
402 #define CMD_BLE_ADV_DIR                                         0x1804
403 //! BLE Connectable Directed Advertiser Command
404 struct __RFC_STRUCT rfc_CMD_BLE_ADV_DIR_s {
405    uint16_t commandNo;                  //!<        The command ID number 0x1804
406    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
407                                         //!<        updated by the radio CPU during operation and may be read by the
408                                         //!<        system CPU at any time.
409    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
410    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
411    struct {
412       uint8_t triggerType:4;            //!<        The type of trigger
413       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
414                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
415       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
416       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
417                                         //!<        1: A trigger in the past is triggered as soon as possible
418    } startTrigger;                      //!<        Identification of the trigger that starts the operation
419    struct {
420       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
421       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
422    } condition;
423    uint8_t channel;                     //!< \brief Channel to use<br>
424                                         //!<        0--39: BLE advertising/data channel index<br>
425                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
426                                         //!<        255: Use existing frequency<br>
427                                         //!<        Others: <i>Reserved</i>
428    struct {
429       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
430                                         //!<        0: Do not use whitening<br>
431                                         //!<        Other value: Initialization for 7-bit LFSR whitener
432       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
433                                         //!<        1: Override whitening initialization with value of init
434    } whitening;
435    rfc_bleAdvPar_t *pParams;            //!<        Pointer to command specific parameter structure
436    rfc_bleAdvOutput_t *pOutput;         //!<        Pointer to command specific output structure
437 } __RFC_STRUCT_ATTR;
438 
439 //! @}
440 
441 //! \addtogroup CMD_BLE_ADV_NC
442 //! @{
443 #define CMD_BLE_ADV_NC                                          0x1805
444 //! BLE Non-Connectable Advertiser Command
445 struct __RFC_STRUCT rfc_CMD_BLE_ADV_NC_s {
446    uint16_t commandNo;                  //!<        The command ID number 0x1805
447    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
448                                         //!<        updated by the radio CPU during operation and may be read by the
449                                         //!<        system CPU at any time.
450    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
451    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
452    struct {
453       uint8_t triggerType:4;            //!<        The type of trigger
454       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
455                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
456       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
457       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
458                                         //!<        1: A trigger in the past is triggered as soon as possible
459    } startTrigger;                      //!<        Identification of the trigger that starts the operation
460    struct {
461       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
462       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
463    } condition;
464    uint8_t channel;                     //!< \brief Channel to use<br>
465                                         //!<        0--39: BLE advertising/data channel index<br>
466                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
467                                         //!<        255: Use existing frequency<br>
468                                         //!<        Others: <i>Reserved</i>
469    struct {
470       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
471                                         //!<        0: Do not use whitening<br>
472                                         //!<        Other value: Initialization for 7-bit LFSR whitener
473       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
474                                         //!<        1: Override whitening initialization with value of init
475    } whitening;
476    rfc_bleAdvPar_t *pParams;            //!<        Pointer to command specific parameter structure
477    rfc_bleAdvOutput_t *pOutput;         //!<        Pointer to command specific output structure
478 } __RFC_STRUCT_ATTR;
479 
480 //! @}
481 
482 //! \addtogroup CMD_BLE_ADV_SCAN
483 //! @{
484 #define CMD_BLE_ADV_SCAN                                        0x1806
485 //! BLE Scannable Undirected Advertiser Command
486 struct __RFC_STRUCT rfc_CMD_BLE_ADV_SCAN_s {
487    uint16_t commandNo;                  //!<        The command ID number 0x1806
488    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
489                                         //!<        updated by the radio CPU during operation and may be read by the
490                                         //!<        system CPU at any time.
491    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
492    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
493    struct {
494       uint8_t triggerType:4;            //!<        The type of trigger
495       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
496                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
497       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
498       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
499                                         //!<        1: A trigger in the past is triggered as soon as possible
500    } startTrigger;                      //!<        Identification of the trigger that starts the operation
501    struct {
502       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
503       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
504    } condition;
505    uint8_t channel;                     //!< \brief Channel to use<br>
506                                         //!<        0--39: BLE advertising/data channel index<br>
507                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
508                                         //!<        255: Use existing frequency<br>
509                                         //!<        Others: <i>Reserved</i>
510    struct {
511       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
512                                         //!<        0: Do not use whitening<br>
513                                         //!<        Other value: Initialization for 7-bit LFSR whitener
514       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
515                                         //!<        1: Override whitening initialization with value of init
516    } whitening;
517    rfc_bleAdvPar_t *pParams;            //!<        Pointer to command specific parameter structure
518    rfc_bleAdvOutput_t *pOutput;         //!<        Pointer to command specific output structure
519 } __RFC_STRUCT_ATTR;
520 
521 //! @}
522 
523 //! \addtogroup CMD_BLE_SCANNER
524 //! @{
525 #define CMD_BLE_SCANNER                                         0x1807
526 //! BLE Scanner Command
527 struct __RFC_STRUCT rfc_CMD_BLE_SCANNER_s {
528    uint16_t commandNo;                  //!<        The command ID number 0x1807
529    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
530                                         //!<        updated by the radio CPU during operation and may be read by the
531                                         //!<        system CPU at any time.
532    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
533    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
534    struct {
535       uint8_t triggerType:4;            //!<        The type of trigger
536       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
537                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
538       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
539       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
540                                         //!<        1: A trigger in the past is triggered as soon as possible
541    } startTrigger;                      //!<        Identification of the trigger that starts the operation
542    struct {
543       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
544       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
545    } condition;
546    uint8_t channel;                     //!< \brief Channel to use<br>
547                                         //!<        0--39: BLE advertising/data channel index<br>
548                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
549                                         //!<        255: Use existing frequency<br>
550                                         //!<        Others: <i>Reserved</i>
551    struct {
552       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
553                                         //!<        0: Do not use whitening<br>
554                                         //!<        Other value: Initialization for 7-bit LFSR whitener
555       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
556                                         //!<        1: Override whitening initialization with value of init
557    } whitening;
558    rfc_bleScannerPar_t *pParams;        //!<        Pointer to command specific parameter structure
559    rfc_bleScannerOutput_t *pOutput;     //!<        Pointer to command specific output structure
560 } __RFC_STRUCT_ATTR;
561 
562 //! @}
563 
564 //! \addtogroup CMD_BLE_INITIATOR
565 //! @{
566 #define CMD_BLE_INITIATOR                                       0x1808
567 //! BLE Initiator Command
568 struct __RFC_STRUCT rfc_CMD_BLE_INITIATOR_s {
569    uint16_t commandNo;                  //!<        The command ID number 0x1808
570    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
571                                         //!<        updated by the radio CPU during operation and may be read by the
572                                         //!<        system CPU at any time.
573    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
574    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
575    struct {
576       uint8_t triggerType:4;            //!<        The type of trigger
577       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
578                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
579       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
580       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
581                                         //!<        1: A trigger in the past is triggered as soon as possible
582    } startTrigger;                      //!<        Identification of the trigger that starts the operation
583    struct {
584       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
585       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
586    } condition;
587    uint8_t channel;                     //!< \brief Channel to use<br>
588                                         //!<        0--39: BLE advertising/data channel index<br>
589                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
590                                         //!<        255: Use existing frequency<br>
591                                         //!<        Others: <i>Reserved</i>
592    struct {
593       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
594                                         //!<        0: Do not use whitening<br>
595                                         //!<        Other value: Initialization for 7-bit LFSR whitener
596       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
597                                         //!<        1: Override whitening initialization with value of init
598    } whitening;
599    rfc_bleInitiatorPar_t *pParams;      //!<        Pointer to command specific parameter structure
600    rfc_bleInitiatorOutput_t *pOutput;   //!<        Pointer to command specific output structure
601 } __RFC_STRUCT_ATTR;
602 
603 //! @}
604 
605 //! \addtogroup CMD_BLE_GENERIC_RX
606 //! @{
607 #define CMD_BLE_GENERIC_RX                                      0x1809
608 //! BLE Generic Receiver Command
609 struct __RFC_STRUCT rfc_CMD_BLE_GENERIC_RX_s {
610    uint16_t commandNo;                  //!<        The command ID number 0x1809
611    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
612                                         //!<        updated by the radio CPU during operation and may be read by the
613                                         //!<        system CPU at any time.
614    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
615    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
616    struct {
617       uint8_t triggerType:4;            //!<        The type of trigger
618       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
619                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
620       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
621       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
622                                         //!<        1: A trigger in the past is triggered as soon as possible
623    } startTrigger;                      //!<        Identification of the trigger that starts the operation
624    struct {
625       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
626       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
627    } condition;
628    uint8_t channel;                     //!< \brief Channel to use<br>
629                                         //!<        0--39: BLE advertising/data channel index<br>
630                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
631                                         //!<        255: Use existing frequency<br>
632                                         //!<        Others: <i>Reserved</i>
633    struct {
634       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
635                                         //!<        0: Do not use whitening<br>
636                                         //!<        Other value: Initialization for 7-bit LFSR whitener
637       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
638                                         //!<        1: Override whitening initialization with value of init
639    } whitening;
640    rfc_bleGenericRxPar_t *pParams;      //!<        Pointer to command specific parameter structure
641    rfc_bleGenericRxOutput_t *pOutput;   //!<        Pointer to command specific output structure
642 } __RFC_STRUCT_ATTR;
643 
644 //! @}
645 
646 //! \addtogroup CMD_BLE_TX_TEST
647 //! @{
648 #define CMD_BLE_TX_TEST                                         0x180A
649 //! BLE PHY Test Transmitter Command
650 struct __RFC_STRUCT rfc_CMD_BLE_TX_TEST_s {
651    uint16_t commandNo;                  //!<        The command ID number 0x180A
652    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
653                                         //!<        updated by the radio CPU during operation and may be read by the
654                                         //!<        system CPU at any time.
655    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
656    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
657    struct {
658       uint8_t triggerType:4;            //!<        The type of trigger
659       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
660                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
661       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
662       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
663                                         //!<        1: A trigger in the past is triggered as soon as possible
664    } startTrigger;                      //!<        Identification of the trigger that starts the operation
665    struct {
666       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
667       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
668    } condition;
669    uint8_t channel;                     //!< \brief Channel to use<br>
670                                         //!<        0--39: BLE advertising/data channel index<br>
671                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
672                                         //!<        255: Use existing frequency<br>
673                                         //!<        Others: <i>Reserved</i>
674    struct {
675       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
676                                         //!<        0: Do not use whitening<br>
677                                         //!<        Other value: Initialization for 7-bit LFSR whitener
678       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
679                                         //!<        1: Override whitening initialization with value of init
680    } whitening;
681    rfc_bleTxTestPar_t *pParams;         //!<        Pointer to command specific parameter structure
682    rfc_bleTxTestOutput_t *pOutput;      //!<        Pointer to command specific output structure
683 } __RFC_STRUCT_ATTR;
684 
685 //! @}
686 
687 //! \addtogroup CMD_BLE_ADV_PAYLOAD
688 //! @{
689 #define CMD_BLE_ADV_PAYLOAD                                     0x1001
690 //! BLE Update Advertising Payload Command
691 struct __RFC_STRUCT rfc_CMD_BLE_ADV_PAYLOAD_s {
692    uint16_t commandNo;                  //!<        The command ID number 0x1001
693    uint8_t payloadType;                 //!< \brief 0: Advertising data<br>
694                                         //!<        1: Scan response data
695    uint8_t newLen;                      //!<        Length of the new payload
696    uint8_t* pNewData;                   //!<        Pointer to the buffer containing the new data
697    rfc_bleAdvPar_t *pParams;            //!<        Pointer to the parameter structure to update
698 } __RFC_STRUCT_ATTR;
699 
700 //! @}
701 
702 //! \addtogroup CMD_BLE5_RADIO_SETUP
703 //! @{
704 #define CMD_BLE5_RADIO_SETUP                                    0x1820
705 //! Bluetooth 5 Radio Setup Command for all PHYs
706 struct __RFC_STRUCT rfc_CMD_BLE5_RADIO_SETUP_s {
707    uint16_t commandNo;                  //!<        The command ID number 0x1820
708    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
709                                         //!<        updated by the radio CPU during operation and may be read by the
710                                         //!<        system CPU at any time.
711    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
712    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
713    struct {
714       uint8_t triggerType:4;            //!<        The type of trigger
715       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
716                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
717       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
718       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
719                                         //!<        1: A trigger in the past is triggered as soon as possible
720    } startTrigger;                      //!<        Identification of the trigger that starts the operation
721    struct {
722       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
723       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
724    } condition;
725    struct {
726       uint8_t mainMode:2;               //!< \brief PHY to use for non-BLE commands:<br>
727                                         //!<        0: 1 Mbps<br>
728                                         //!<        1: 2 Mbps<br>
729                                         //!<        2: Coded<br>
730                                         //!<        3: <i>Reserved</i>
731       uint8_t coding:1;                 //!< \brief Coding to use for TX if coded PHY is selected for non-BLE commands<br>
732                                         //!<        0: S = 8 (125 kbps)<br>
733                                         //!<        1: S = 2 (500 kbps)
734    } defaultPhy;
735    uint8_t loDivider;                   //!<        LO divider setting to use. Supported values: 0 or 2.
736    struct {
737       uint16_t frontEndMode:3;          //!< \brief 0x00: Differential mode<br>
738                                         //!<        0x01: Single-ended mode RFP<br>
739                                         //!<        0x02: Single-ended mode RFN<br>
740                                         //!<        0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)<br>
741                                         //!<        0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)<br>
742                                         //!<        Others: <i>Reserved</i>
743       uint16_t biasMode:1;              //!< \brief 0: Internal bias<br>
744                                         //!<        1: External bias
745       uint16_t analogCfgMode:6;         //!< \brief 0x00: Write analog configuration.<br>
746                                         //!<        Required first time after boot and when changing frequency band
747                                         //!<        or front-end configuration<br>
748                                         //!<        0x2D: Keep analog configuration.<br>
749                                         //!<        May be used after standby or when changing mode with the same frequency
750                                         //!<        band and front-end configuration<br>
751                                         //!<        Others: <i>Reserved</i>
752       uint16_t bNoFsPowerUp:1;          //!< \brief 0: Power up frequency synth<br>
753                                         //!<        1: Do not power up frequency synth
754       uint16_t :1;
755       uint16_t bSynthNarrowBand:1;      //!< \brief 0: Normal synth mode<br>
756                                         //!<        1: Narrow-band synth mode
757    } config;                            //!<        Configuration options
758    uint16_t txPower;                    //!<        Default transmit power
759    uint32_t* pRegOverrideCommon;        //!< \brief Pointer to a list of hardware and configuration registers to override during common
760                                         //!<        initialization. If NULL, no override is used.
761    uint32_t* pRegOverride1Mbps;         //!< \brief Pointer to a list of hardware and configuration registers to override when selecting
762                                         //!<        1 Mbps PHY mode. If NULL, no override is used.
763    uint32_t* pRegOverride2Mbps;         //!< \brief Pointer to a list of hardware and configuration registers to override when selecting
764                                         //!<        2 Mbps PHY mode. If NULL, no override is used.
765    uint32_t* pRegOverrideCoded;         //!< \brief Pointer to a list of hardware and configuration registers to override when selecting
766                                         //!<        coded PHY mode. If NULL, no override is used.
767 } __RFC_STRUCT_ATTR;
768 
769 //! @}
770 
771 //! \addtogroup CMD_BLE5_SLAVE
772 //! @{
773 #define CMD_BLE5_SLAVE                                          0x1821
774 //! Bluetooth 5 Slave Command
775 struct __RFC_STRUCT rfc_CMD_BLE5_SLAVE_s {
776    uint16_t commandNo;                  //!<        The command ID number 0x1821
777    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
778                                         //!<        updated by the radio CPU during operation and may be read by the
779                                         //!<        system CPU at any time.
780    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
781    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
782    struct {
783       uint8_t triggerType:4;            //!<        The type of trigger
784       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
785                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
786       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
787       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
788                                         //!<        1: A trigger in the past is triggered as soon as possible
789    } startTrigger;                      //!<        Identification of the trigger that starts the operation
790    struct {
791       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
792       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
793    } condition;
794    uint8_t channel;                     //!< \brief Channel to use<br>
795                                         //!<        0--39: BLE advertising/data channel index<br>
796                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
797                                         //!<        255: Use existing frequency<br>
798                                         //!<        Others: <i>Reserved</i>
799    struct {
800       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
801                                         //!<        0: Do not use whitening<br>
802                                         //!<        Other value: Initialization for 7-bit LFSR whitener
803       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
804                                         //!<        1: Override whitening initialization with value of init
805    } whitening;
806    struct {
807       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
808                                         //!<        0: 1 Mbps<br>
809                                         //!<        1: 2 Mbps<br>
810                                         //!<        2: Coded<br>
811                                         //!<        3: <i>Reserved</i>
812       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
813                                         //!<        See the Technical Reference Manual for details.
814    } phyMode;
815    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
816    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
817                                         //!<        0x0000: Use default TX power<br>
818                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
819                                         //!<        structure that includes <code>tx20Power</code> must be used)
820    rfc_ble5SlavePar_t *pParams;         //!<        Pointer to command specific parameter structure
821    rfc_bleMasterSlaveOutput_t *pOutput; //!<        Pointer to command specific output structure
822    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
823                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
824                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
825                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
826                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
827                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
828                                         //!<        CPU and may be omitted from the structure.
829 } __RFC_STRUCT_ATTR;
830 
831 //! @}
832 
833 //! \addtogroup CMD_BLE5_MASTER
834 //! @{
835 #define CMD_BLE5_MASTER                                         0x1822
836 //! Bluetooth 5 Master Command
837 struct __RFC_STRUCT rfc_CMD_BLE5_MASTER_s {
838    uint16_t commandNo;                  //!<        The command ID number 0x1822
839    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
840                                         //!<        updated by the radio CPU during operation and may be read by the
841                                         //!<        system CPU at any time.
842    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
843    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
844    struct {
845       uint8_t triggerType:4;            //!<        The type of trigger
846       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
847                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
848       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
849       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
850                                         //!<        1: A trigger in the past is triggered as soon as possible
851    } startTrigger;                      //!<        Identification of the trigger that starts the operation
852    struct {
853       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
854       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
855    } condition;
856    uint8_t channel;                     //!< \brief Channel to use<br>
857                                         //!<        0--39: BLE advertising/data channel index<br>
858                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
859                                         //!<        255: Use existing frequency<br>
860                                         //!<        Others: <i>Reserved</i>
861    struct {
862       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
863                                         //!<        0: Do not use whitening<br>
864                                         //!<        Other value: Initialization for 7-bit LFSR whitener
865       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
866                                         //!<        1: Override whitening initialization with value of init
867    } whitening;
868    struct {
869       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
870                                         //!<        0: 1 Mbps<br>
871                                         //!<        1: 2 Mbps<br>
872                                         //!<        2: Coded<br>
873                                         //!<        3: <i>Reserved</i>
874       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
875                                         //!<        See the Technical Reference Manual for details.
876    } phyMode;
877    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
878    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
879                                         //!<        0x0000: Use default TX power<br>
880                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
881                                         //!<        structure that includes <code>tx20Power</code> must be used)
882    rfc_ble5MasterPar_t *pParams;        //!<        Pointer to command specific parameter structure
883    rfc_bleMasterSlaveOutput_t *pOutput; //!<        Pointer to command specific output structure
884    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
885                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
886                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
887                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
888                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
889                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
890                                         //!<        CPU and may be omitted from the structure.
891 } __RFC_STRUCT_ATTR;
892 
893 //! @}
894 
895 //! \addtogroup CMD_BLE5_ADV_EXT
896 //! @{
897 #define CMD_BLE5_ADV_EXT                                        0x1823
898 //! Bluetooth 5 Extended Advertiser Command
899 struct __RFC_STRUCT rfc_CMD_BLE5_ADV_EXT_s {
900    uint16_t commandNo;                  //!<        The command ID number 0x1823
901    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
902                                         //!<        updated by the radio CPU during operation and may be read by the
903                                         //!<        system CPU at any time.
904    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
905    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
906    struct {
907       uint8_t triggerType:4;            //!<        The type of trigger
908       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
909                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
910       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
911       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
912                                         //!<        1: A trigger in the past is triggered as soon as possible
913    } startTrigger;                      //!<        Identification of the trigger that starts the operation
914    struct {
915       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
916       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
917    } condition;
918    uint8_t channel;                     //!< \brief Channel to use<br>
919                                         //!<        0--39: BLE advertising/data channel index<br>
920                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
921                                         //!<        255: Use existing frequency<br>
922                                         //!<        Others: <i>Reserved</i>
923    struct {
924       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
925                                         //!<        0: Do not use whitening<br>
926                                         //!<        Other value: Initialization for 7-bit LFSR whitener
927       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
928                                         //!<        1: Override whitening initialization with value of init
929    } whitening;
930    struct {
931       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
932                                         //!<        0: 1 Mbps<br>
933                                         //!<        1: 2 Mbps<br>
934                                         //!<        2: Coded<br>
935                                         //!<        3: <i>Reserved</i>
936       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
937                                         //!<        See the Technical Reference Manual for details.
938    } phyMode;
939    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
940    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
941                                         //!<        0x0000: Use default TX power<br>
942                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
943                                         //!<        structure that includes <code>tx20Power</code> must be used)
944    rfc_ble5AdvExtPar_t *pParams;        //!<        Pointer to command specific parameter structure
945    rfc_bleAdvOutput_t *pOutput;         //!<        Pointer to command specific output structure
946    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
947                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
948                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
949                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
950                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
951                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
952                                         //!<        CPU and may be omitted from the structure.
953 } __RFC_STRUCT_ATTR;
954 
955 //! @}
956 
957 //! \addtogroup CMD_BLE5_ADV_AUX
958 //! @{
959 #define CMD_BLE5_ADV_AUX                                        0x1824
960 //! Bluetooth 5 Secondary Channel Advertiser Command
961 struct __RFC_STRUCT rfc_CMD_BLE5_ADV_AUX_s {
962    uint16_t commandNo;                  //!<        The command ID number 0x1824
963    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
964                                         //!<        updated by the radio CPU during operation and may be read by the
965                                         //!<        system CPU at any time.
966    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
967    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
968    struct {
969       uint8_t triggerType:4;            //!<        The type of trigger
970       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
971                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
972       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
973       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
974                                         //!<        1: A trigger in the past is triggered as soon as possible
975    } startTrigger;                      //!<        Identification of the trigger that starts the operation
976    struct {
977       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
978       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
979    } condition;
980    uint8_t channel;                     //!< \brief Channel to use<br>
981                                         //!<        0--39: BLE advertising/data channel index<br>
982                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
983                                         //!<        255: Use existing frequency<br>
984                                         //!<        Others: <i>Reserved</i>
985    struct {
986       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
987                                         //!<        0: Do not use whitening<br>
988                                         //!<        Other value: Initialization for 7-bit LFSR whitener
989       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
990                                         //!<        1: Override whitening initialization with value of init
991    } whitening;
992    struct {
993       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
994                                         //!<        0: 1 Mbps<br>
995                                         //!<        1: 2 Mbps<br>
996                                         //!<        2: Coded<br>
997                                         //!<        3: <i>Reserved</i>
998       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
999                                         //!<        See the Technical Reference Manual for details.
1000    } phyMode;
1001    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
1002    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
1003                                         //!<        0x0000: Use default TX power<br>
1004                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
1005                                         //!<        structure that includes <code>tx20Power</code> must be used)
1006    rfc_ble5AdvAuxPar_t *pParams;        //!<        Pointer to command specific parameter structure
1007    rfc_bleAdvOutput_t *pOutput;         //!<        Pointer to command specific output structure
1008    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
1009                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
1010                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
1011                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
1012                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
1013                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
1014                                         //!<        CPU and may be omitted from the structure.
1015 } __RFC_STRUCT_ATTR;
1016 
1017 //! @}
1018 
1019 //! \addtogroup CMD_BLE5_ADV_PER
1020 //! @{
1021 #define CMD_BLE5_ADV_PER                                        0x1825
1022 //! Bluetooth 5 Periodic Advertiser Command
1023 struct __RFC_STRUCT rfc_CMD_BLE5_ADV_PER_s {
1024    uint16_t commandNo;                  //!<        The command ID number 0x1825
1025    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
1026                                         //!<        updated by the radio CPU during operation and may be read by the
1027                                         //!<        system CPU at any time.
1028    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
1029    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
1030    struct {
1031       uint8_t triggerType:4;            //!<        The type of trigger
1032       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1033                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1034       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1035       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1036                                         //!<        1: A trigger in the past is triggered as soon as possible
1037    } startTrigger;                      //!<        Identification of the trigger that starts the operation
1038    struct {
1039       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
1040       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
1041    } condition;
1042    uint8_t channel;                     //!< \brief Channel to use<br>
1043                                         //!<        0--39: BLE advertising/data channel index<br>
1044                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
1045                                         //!<        255: Use existing frequency<br>
1046                                         //!<        Others: <i>Reserved</i>
1047    struct {
1048       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
1049                                         //!<        0: Do not use whitening<br>
1050                                         //!<        Other value: Initialization for 7-bit LFSR whitener
1051       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
1052                                         //!<        1: Override whitening initialization with value of init
1053    } whitening;
1054    struct {
1055       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
1056                                         //!<        0: 1 Mbps<br>
1057                                         //!<        1: 2 Mbps<br>
1058                                         //!<        2: Coded<br>
1059                                         //!<        3: <i>Reserved</i>
1060       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
1061                                         //!<        See the Technical Reference Manual for details.
1062    } phyMode;
1063    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
1064    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
1065                                         //!<        0x0000: Use default TX power<br>
1066                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
1067                                         //!<        structure that includes <code>tx20Power</code> must be used)
1068    rfc_ble5AdvPerPar_t *pParams;        //!<        Pointer to command specific parameter structure
1069    rfc_bleAdvOutput_t *pOutput;         //!<        Pointer to command specific output structure
1070    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
1071                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
1072                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
1073                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
1074                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
1075                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
1076                                         //!<        CPU and may be omitted from the structure.
1077 } __RFC_STRUCT_ATTR;
1078 
1079 //! @}
1080 
1081 //! \addtogroup CMD_BLE5_SCANNER_PER
1082 //! @{
1083 #define CMD_BLE5_SCANNER_PER                                    0x1826
1084 //! Bluetooth 5 Periodic Scanner Command
1085 struct __RFC_STRUCT rfc_CMD_BLE5_SCANNER_PER_s {
1086    uint16_t commandNo;                  //!<        The command ID number 0x1826
1087    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
1088                                         //!<        updated by the radio CPU during operation and may be read by the
1089                                         //!<        system CPU at any time.
1090    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
1091    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
1092    struct {
1093       uint8_t triggerType:4;            //!<        The type of trigger
1094       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1095                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1096       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1097       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1098                                         //!<        1: A trigger in the past is triggered as soon as possible
1099    } startTrigger;                      //!<        Identification of the trigger that starts the operation
1100    struct {
1101       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
1102       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
1103    } condition;
1104    uint8_t channel;                     //!< \brief Channel to use<br>
1105                                         //!<        0--39: BLE advertising/data channel index<br>
1106                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
1107                                         //!<        255: Use existing frequency<br>
1108                                         //!<        Others: <i>Reserved</i>
1109    struct {
1110       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
1111                                         //!<        0: Do not use whitening<br>
1112                                         //!<        Other value: Initialization for 7-bit LFSR whitener
1113       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
1114                                         //!<        1: Override whitening initialization with value of init
1115    } whitening;
1116    struct {
1117       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
1118                                         //!<        0: 1 Mbps<br>
1119                                         //!<        1: 2 Mbps<br>
1120                                         //!<        2: Coded<br>
1121                                         //!<        3: <i>Reserved</i>
1122       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
1123                                         //!<        See the Technical Reference Manual for details.
1124    } phyMode;
1125    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
1126    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
1127                                         //!<        0x0000: Use default TX power<br>
1128                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
1129                                         //!<        structure that includes <code>tx20Power</code> must be used)
1130    rfc_ble5ScannerPerPar_t *pParams;    //!<        Pointer to command specific parameter structure
1131    rfc_ble5ScanInitOutput_t *pOutput;   //!<        Pointer to command specific output structure
1132    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
1133                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
1134                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
1135                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
1136                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
1137                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
1138                                         //!<        CPU and may be omitted from the structure.
1139 } __RFC_STRUCT_ATTR;
1140 
1141 //! @}
1142 
1143 //! \addtogroup CMD_BLE5_SCANNER
1144 //! @{
1145 #define CMD_BLE5_SCANNER                                        0x1827
1146 //! Bluetooth 5 Scanner Command
1147 struct __RFC_STRUCT rfc_CMD_BLE5_SCANNER_s {
1148    uint16_t commandNo;                  //!<        The command ID number 0x1827
1149    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
1150                                         //!<        updated by the radio CPU during operation and may be read by the
1151                                         //!<        system CPU at any time.
1152    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
1153    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
1154    struct {
1155       uint8_t triggerType:4;            //!<        The type of trigger
1156       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1157                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1158       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1159       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1160                                         //!<        1: A trigger in the past is triggered as soon as possible
1161    } startTrigger;                      //!<        Identification of the trigger that starts the operation
1162    struct {
1163       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
1164       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
1165    } condition;
1166    uint8_t channel;                     //!< \brief Channel to use<br>
1167                                         //!<        0--39: BLE advertising/data channel index<br>
1168                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
1169                                         //!<        255: Use existing frequency<br>
1170                                         //!<        Others: <i>Reserved</i>
1171    struct {
1172       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
1173                                         //!<        0: Do not use whitening<br>
1174                                         //!<        Other value: Initialization for 7-bit LFSR whitener
1175       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
1176                                         //!<        1: Override whitening initialization with value of init
1177    } whitening;
1178    struct {
1179       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
1180                                         //!<        0: 1 Mbps<br>
1181                                         //!<        1: 2 Mbps<br>
1182                                         //!<        2: Coded<br>
1183                                         //!<        3: <i>Reserved</i>
1184       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
1185                                         //!<        See the Technical Reference Manual for details.
1186    } phyMode;
1187    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
1188    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
1189                                         //!<        0x0000: Use default TX power<br>
1190                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
1191                                         //!<        structure that includes <code>tx20Power</code> must be used)
1192    rfc_ble5ScannerPar_t *pParams;       //!<        Pointer to command specific parameter structure
1193    rfc_ble5ScanInitOutput_t *pOutput;   //!<        Pointer to command specific output structure
1194    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
1195                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
1196                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
1197                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
1198                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
1199                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
1200                                         //!<        CPU and may be omitted from the structure.
1201 } __RFC_STRUCT_ATTR;
1202 
1203 //! @}
1204 
1205 //! \addtogroup CMD_BLE5_INITIATOR
1206 //! @{
1207 #define CMD_BLE5_INITIATOR                                      0x1828
1208 //! Bluetooth 5 Initiator Command
1209 struct __RFC_STRUCT rfc_CMD_BLE5_INITIATOR_s {
1210    uint16_t commandNo;                  //!<        The command ID number 0x1828
1211    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
1212                                         //!<        updated by the radio CPU during operation and may be read by the
1213                                         //!<        system CPU at any time.
1214    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
1215    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
1216    struct {
1217       uint8_t triggerType:4;            //!<        The type of trigger
1218       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1219                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1220       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1221       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1222                                         //!<        1: A trigger in the past is triggered as soon as possible
1223    } startTrigger;                      //!<        Identification of the trigger that starts the operation
1224    struct {
1225       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
1226       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
1227    } condition;
1228    uint8_t channel;                     //!< \brief Channel to use<br>
1229                                         //!<        0--39: BLE advertising/data channel index<br>
1230                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
1231                                         //!<        255: Use existing frequency<br>
1232                                         //!<        Others: <i>Reserved</i>
1233    struct {
1234       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
1235                                         //!<        0: Do not use whitening<br>
1236                                         //!<        Other value: Initialization for 7-bit LFSR whitener
1237       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
1238                                         //!<        1: Override whitening initialization with value of init
1239    } whitening;
1240    struct {
1241       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
1242                                         //!<        0: 1 Mbps<br>
1243                                         //!<        1: 2 Mbps<br>
1244                                         //!<        2: Coded<br>
1245                                         //!<        3: <i>Reserved</i>
1246       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
1247                                         //!<        See the Technical Reference Manual for details.
1248    } phyMode;
1249    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
1250    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
1251                                         //!<        0x0000: Use default TX power<br>
1252                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
1253                                         //!<        structure that includes <code>tx20Power</code> must be used)
1254    rfc_ble5InitiatorPar_t *pParams;     //!<        Pointer to command specific parameter structure
1255    rfc_ble5ScanInitOutput_t *pOutput;   //!<        Pointer to command specific output structure
1256    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
1257                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
1258                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
1259                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
1260                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
1261                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
1262                                         //!<        CPU and may be omitted from the structure.
1263 } __RFC_STRUCT_ATTR;
1264 
1265 //! @}
1266 
1267 //! \addtogroup CMD_BLE5_GENERIC_RX
1268 //! @{
1269 #define CMD_BLE5_GENERIC_RX                                     0x1829
1270 //! Bluetooth 5 Generic Receiver Command
1271 struct __RFC_STRUCT rfc_CMD_BLE5_GENERIC_RX_s {
1272    uint16_t commandNo;                  //!<        The command ID number 0x1829
1273    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
1274                                         //!<        updated by the radio CPU during operation and may be read by the
1275                                         //!<        system CPU at any time.
1276    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
1277    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
1278    struct {
1279       uint8_t triggerType:4;            //!<        The type of trigger
1280       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1281                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1282       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1283       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1284                                         //!<        1: A trigger in the past is triggered as soon as possible
1285    } startTrigger;                      //!<        Identification of the trigger that starts the operation
1286    struct {
1287       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
1288       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
1289    } condition;
1290    uint8_t channel;                     //!< \brief Channel to use<br>
1291                                         //!<        0--39: BLE advertising/data channel index<br>
1292                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
1293                                         //!<        255: Use existing frequency<br>
1294                                         //!<        Others: <i>Reserved</i>
1295    struct {
1296       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
1297                                         //!<        0: Do not use whitening<br>
1298                                         //!<        Other value: Initialization for 7-bit LFSR whitener
1299       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
1300                                         //!<        1: Override whitening initialization with value of init
1301    } whitening;
1302    struct {
1303       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
1304                                         //!<        0: 1 Mbps<br>
1305                                         //!<        1: 2 Mbps<br>
1306                                         //!<        2: Coded<br>
1307                                         //!<        3: <i>Reserved</i>
1308       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
1309                                         //!<        See the Technical Reference Manual for details.
1310    } phyMode;
1311    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
1312    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
1313                                         //!<        0x0000: Use default TX power<br>
1314                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
1315                                         //!<        structure that includes <code>tx20Power</code> must be used)
1316    rfc_bleGenericRxPar_t *pParams;      //!<        Pointer to command specific parameter structure
1317    rfc_bleGenericRxOutput_t *pOutput;   //!<        Pointer to command specific output structure
1318    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
1319                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
1320                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
1321                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
1322                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
1323                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
1324                                         //!<        CPU and may be omitted from the structure.
1325 } __RFC_STRUCT_ATTR;
1326 
1327 //! @}
1328 
1329 //! \addtogroup CMD_BLE5_TX_TEST
1330 //! @{
1331 #define CMD_BLE5_TX_TEST                                        0x182A
1332 //! Bluetooth 5 PHY Test Transmitter Command
1333 struct __RFC_STRUCT rfc_CMD_BLE5_TX_TEST_s {
1334    uint16_t commandNo;                  //!<        The command ID number 0x182A
1335    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
1336                                         //!<        updated by the radio CPU during operation and may be read by the
1337                                         //!<        system CPU at any time.
1338    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
1339    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
1340    struct {
1341       uint8_t triggerType:4;            //!<        The type of trigger
1342       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1343                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1344       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1345       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1346                                         //!<        1: A trigger in the past is triggered as soon as possible
1347    } startTrigger;                      //!<        Identification of the trigger that starts the operation
1348    struct {
1349       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
1350       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
1351    } condition;
1352    uint8_t channel;                     //!< \brief Channel to use<br>
1353                                         //!<        0--39: BLE advertising/data channel index<br>
1354                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
1355                                         //!<        255: Use existing frequency<br>
1356                                         //!<        Others: <i>Reserved</i>
1357    struct {
1358       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
1359                                         //!<        0: Do not use whitening<br>
1360                                         //!<        Other value: Initialization for 7-bit LFSR whitener
1361       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
1362                                         //!<        1: Override whitening initialization with value of init
1363    } whitening;
1364    struct {
1365       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
1366                                         //!<        0: 1 Mbps<br>
1367                                         //!<        1: 2 Mbps<br>
1368                                         //!<        2: Coded<br>
1369                                         //!<        3: <i>Reserved</i>
1370       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
1371                                         //!<        See the Technical Reference Manual for details.
1372    } phyMode;
1373    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
1374    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
1375                                         //!<        0x0000: Use default TX power<br>
1376                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
1377                                         //!<        structure that includes <code>tx20Power</code> must be used)
1378    rfc_bleTxTestPar_t *pParams;         //!<        Pointer to command specific parameter structure
1379    rfc_bleTxTestOutput_t *pOutput;      //!<        Pointer to command specific output structure
1380    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
1381                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
1382                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
1383                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
1384                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
1385                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
1386                                         //!<        CPU and may be omitted from the structure.
1387 } __RFC_STRUCT_ATTR;
1388 
1389 //! @}
1390 
1391 //! \addtogroup CMD_BLE5_ADV
1392 //! @{
1393 #define CMD_BLE5_ADV                                            0x182B
1394 //! Bluetooth 5 Connectable Undirected Advertiser Command
1395 struct __RFC_STRUCT rfc_CMD_BLE5_ADV_s {
1396    uint16_t commandNo;                  //!<        The command ID number 0x182B
1397    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
1398                                         //!<        updated by the radio CPU during operation and may be read by the
1399                                         //!<        system CPU at any time.
1400    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
1401    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
1402    struct {
1403       uint8_t triggerType:4;            //!<        The type of trigger
1404       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1405                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1406       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1407       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1408                                         //!<        1: A trigger in the past is triggered as soon as possible
1409    } startTrigger;                      //!<        Identification of the trigger that starts the operation
1410    struct {
1411       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
1412       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
1413    } condition;
1414    uint8_t channel;                     //!< \brief Channel to use<br>
1415                                         //!<        0--39: BLE advertising/data channel index<br>
1416                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
1417                                         //!<        255: Use existing frequency<br>
1418                                         //!<        Others: <i>Reserved</i>
1419    struct {
1420       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
1421                                         //!<        0: Do not use whitening<br>
1422                                         //!<        Other value: Initialization for 7-bit LFSR whitener
1423       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
1424                                         //!<        1: Override whitening initialization with value of init
1425    } whitening;
1426    struct {
1427       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
1428                                         //!<        0: 1 Mbps<br>
1429                                         //!<        1: 2 Mbps<br>
1430                                         //!<        2: Coded<br>
1431                                         //!<        3: <i>Reserved</i>
1432       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
1433                                         //!<        See the Technical Reference Manual for details.
1434    } phyMode;
1435    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
1436    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
1437                                         //!<        0x0000: Use default TX power<br>
1438                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
1439                                         //!<        structure that includes <code>tx20Power</code> must be used)
1440    rfc_bleAdvPar_t *pParams;            //!<        Pointer to command specific parameter structure
1441    rfc_bleAdvOutput_t *pOutput;         //!<        Pointer to command specific output structure
1442    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
1443                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
1444                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
1445                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
1446                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
1447                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
1448                                         //!<        CPU and may be omitted from the structure.
1449 } __RFC_STRUCT_ATTR;
1450 
1451 //! @}
1452 
1453 //! \addtogroup CMD_BLE5_ADV_DIR
1454 //! @{
1455 #define CMD_BLE5_ADV_DIR                                        0x182C
1456 //! Bluetooth 5 Connectable Directed Advertiser Command
1457 struct __RFC_STRUCT rfc_CMD_BLE5_ADV_DIR_s {
1458    uint16_t commandNo;                  //!<        The command ID number 0x182C
1459    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
1460                                         //!<        updated by the radio CPU during operation and may be read by the
1461                                         //!<        system CPU at any time.
1462    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
1463    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
1464    struct {
1465       uint8_t triggerType:4;            //!<        The type of trigger
1466       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1467                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1468       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1469       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1470                                         //!<        1: A trigger in the past is triggered as soon as possible
1471    } startTrigger;                      //!<        Identification of the trigger that starts the operation
1472    struct {
1473       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
1474       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
1475    } condition;
1476    uint8_t channel;                     //!< \brief Channel to use<br>
1477                                         //!<        0--39: BLE advertising/data channel index<br>
1478                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
1479                                         //!<        255: Use existing frequency<br>
1480                                         //!<        Others: <i>Reserved</i>
1481    struct {
1482       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
1483                                         //!<        0: Do not use whitening<br>
1484                                         //!<        Other value: Initialization for 7-bit LFSR whitener
1485       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
1486                                         //!<        1: Override whitening initialization with value of init
1487    } whitening;
1488    struct {
1489       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
1490                                         //!<        0: 1 Mbps<br>
1491                                         //!<        1: 2 Mbps<br>
1492                                         //!<        2: Coded<br>
1493                                         //!<        3: <i>Reserved</i>
1494       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
1495                                         //!<        See the Technical Reference Manual for details.
1496    } phyMode;
1497    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
1498    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
1499                                         //!<        0x0000: Use default TX power<br>
1500                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
1501                                         //!<        structure that includes <code>tx20Power</code> must be used)
1502    rfc_bleAdvPar_t *pParams;            //!<        Pointer to command specific parameter structure
1503    rfc_bleAdvOutput_t *pOutput;         //!<        Pointer to command specific output structure
1504    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
1505                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
1506                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
1507                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
1508                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
1509                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
1510                                         //!<        CPU and may be omitted from the structure.
1511 } __RFC_STRUCT_ATTR;
1512 
1513 //! @}
1514 
1515 //! \addtogroup CMD_BLE5_ADV_NC
1516 //! @{
1517 #define CMD_BLE5_ADV_NC                                         0x182D
1518 //! Bluetooth 5 Non-Connectable Advertiser Command
1519 struct __RFC_STRUCT rfc_CMD_BLE5_ADV_NC_s {
1520    uint16_t commandNo;                  //!<        The command ID number 0x182D
1521    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
1522                                         //!<        updated by the radio CPU during operation and may be read by the
1523                                         //!<        system CPU at any time.
1524    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
1525    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
1526    struct {
1527       uint8_t triggerType:4;            //!<        The type of trigger
1528       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1529                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1530       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1531       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1532                                         //!<        1: A trigger in the past is triggered as soon as possible
1533    } startTrigger;                      //!<        Identification of the trigger that starts the operation
1534    struct {
1535       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
1536       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
1537    } condition;
1538    uint8_t channel;                     //!< \brief Channel to use<br>
1539                                         //!<        0--39: BLE advertising/data channel index<br>
1540                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
1541                                         //!<        255: Use existing frequency<br>
1542                                         //!<        Others: <i>Reserved</i>
1543    struct {
1544       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
1545                                         //!<        0: Do not use whitening<br>
1546                                         //!<        Other value: Initialization for 7-bit LFSR whitener
1547       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
1548                                         //!<        1: Override whitening initialization with value of init
1549    } whitening;
1550    struct {
1551       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
1552                                         //!<        0: 1 Mbps<br>
1553                                         //!<        1: 2 Mbps<br>
1554                                         //!<        2: Coded<br>
1555                                         //!<        3: <i>Reserved</i>
1556       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
1557                                         //!<        See the Technical Reference Manual for details.
1558    } phyMode;
1559    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
1560    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
1561                                         //!<        0x0000: Use default TX power<br>
1562                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
1563                                         //!<        structure that includes <code>tx20Power</code> must be used)
1564    rfc_bleAdvPar_t *pParams;            //!<        Pointer to command specific parameter structure
1565    rfc_bleAdvOutput_t *pOutput;         //!<        Pointer to command specific output structure
1566    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
1567                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
1568                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
1569                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
1570                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
1571                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
1572                                         //!<        CPU and may be omitted from the structure.
1573 } __RFC_STRUCT_ATTR;
1574 
1575 //! @}
1576 
1577 //! \addtogroup CMD_BLE5_ADV_SCAN
1578 //! @{
1579 #define CMD_BLE5_ADV_SCAN                                       0x182E
1580 //! Bluetooth 5 Scannable Undirected Advertiser Command
1581 struct __RFC_STRUCT rfc_CMD_BLE5_ADV_SCAN_s {
1582    uint16_t commandNo;                  //!<        The command ID number 0x182E
1583    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
1584                                         //!<        updated by the radio CPU during operation and may be read by the
1585                                         //!<        system CPU at any time.
1586    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
1587    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
1588    struct {
1589       uint8_t triggerType:4;            //!<        The type of trigger
1590       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1591                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1592       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1593       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1594                                         //!<        1: A trigger in the past is triggered as soon as possible
1595    } startTrigger;                      //!<        Identification of the trigger that starts the operation
1596    struct {
1597       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
1598       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
1599    } condition;
1600    uint8_t channel;                     //!< \brief Channel to use<br>
1601                                         //!<        0--39: BLE advertising/data channel index<br>
1602                                         //!<        60--207: Custom frequency; (2300 + <code>channel</code>) MHz<br>
1603                                         //!<        255: Use existing frequency<br>
1604                                         //!<        Others: <i>Reserved</i>
1605    struct {
1606       uint8_t init:7;                   //!< \brief If <code>bOverride</code> = 1 or custom frequency is used:<br>
1607                                         //!<        0: Do not use whitening<br>
1608                                         //!<        Other value: Initialization for 7-bit LFSR whitener
1609       uint8_t bOverride:1;              //!< \brief 0: Use default whitening for BLE advertising/data channels<br>
1610                                         //!<        1: Override whitening initialization with value of init
1611    } whitening;
1612    struct {
1613       uint8_t mainMode:2;               //!< \brief PHY to use:<br>
1614                                         //!<        0: 1 Mbps<br>
1615                                         //!<        1: 2 Mbps<br>
1616                                         //!<        2: Coded<br>
1617                                         //!<        3: <i>Reserved</i>
1618       uint8_t coding:6;                 //!< \brief Coding to use for TX if coded PHY is selected.
1619                                         //!<        See the Technical Reference Manual for details.
1620    } phyMode;
1621    uint8_t rangeDelay;                  //!<        Number of RAT ticks to add to the listening time after T_IFS
1622    uint16_t txPower;                    //!< \brief Transmit power to use (overrides the one given in radio setup) <br>
1623                                         //!<        0x0000: Use default TX power<br>
1624                                         //!<        0xFFFF: 20-dBm PA only: Use TX power from <code>tx20Power</code> field (command
1625                                         //!<        structure that includes <code>tx20Power</code> must be used)
1626    rfc_bleAdvPar_t *pParams;            //!<        Pointer to command specific parameter structure
1627    rfc_bleAdvOutput_t *pOutput;         //!<        Pointer to command specific output structure
1628    uint32_t tx20Power;                  //!< \brief If <code>txPower</code> = 0xFFFF:<br>
1629                                         //!<        If <code>tx20Power</code> < 0x10000000: Transmit power to use for the 20-dBm PA;
1630                                         //!<        overrides the one given in radio setup for the duration of the command. <br>
1631                                         //!<        If <code>tx20Power</code> >= 0x10000000: Pointer to PA change override structure
1632                                         //!<        as for CMD_CHANGE_PA ; permanently changes the PA and PA power set in radio setup.<br>
1633                                         //!<        For other values of <code>txPower</code>, this field is not accessed by the radio
1634                                         //!<        CPU and may be omitted from the structure.
1635 } __RFC_STRUCT_ATTR;
1636 
1637 //! @}
1638 
1639 #define CMD_BLE5_RADIO_SETUP_PA                                 CMD_BLE5_RADIO_SETUP
1640 
1641 //! \addtogroup CMD_BLE5_RADIO_SETUP_PA
1642 //! @{
1643 //! Bluetooth 5 Radio Setup Command for all PHYs with PA Switching Fields
1644 struct __RFC_STRUCT rfc_CMD_BLE5_RADIO_SETUP_PA_s {
1645    uint16_t commandNo;                  //!<        The command ID number
1646    uint16_t status;                     //!< \brief An integer telling the status of the command. This value is
1647                                         //!<        updated by the radio CPU during operation and may be read by the
1648                                         //!<        system CPU at any time.
1649    rfc_radioOp_t *pNextOp;              //!<        Pointer to the next operation to run after this operation is done
1650    ratmr_t startTime;                   //!<        Absolute or relative start time (depending on the value of <code>startTrigger</code>)
1651    struct {
1652       uint8_t triggerType:4;            //!<        The type of trigger
1653       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1654                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1655       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1656       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1657                                         //!<        1: A trigger in the past is triggered as soon as possible
1658    } startTrigger;                      //!<        Identification of the trigger that starts the operation
1659    struct {
1660       uint8_t rule:4;                   //!<        Condition for running next command: Rule for how to proceed
1661       uint8_t nSkip:4;                  //!<        Number of skips + 1 if the rule involves skipping. 0: same, 1: next, 2: skip next, ...
1662    } condition;
1663    struct {
1664       uint8_t mainMode:2;               //!< \brief PHY to use for non-BLE commands:<br>
1665                                         //!<        0: 1 Mbps<br>
1666                                         //!<        1: 2 Mbps<br>
1667                                         //!<        2: Coded<br>
1668                                         //!<        3: <i>Reserved</i>
1669       uint8_t coding:1;                 //!< \brief Coding to use for TX if coded PHY is selected for non-BLE commands<br>
1670                                         //!<        0: S = 8 (125 kbps)<br>
1671                                         //!<        1: S = 2 (500 kbps)
1672    } defaultPhy;
1673    uint8_t loDivider;                   //!<        LO divider setting to use. Supported values: 0 or 2.
1674    struct {
1675       uint16_t frontEndMode:3;          //!< \brief 0x00: Differential mode<br>
1676                                         //!<        0x01: Single-ended mode RFP<br>
1677                                         //!<        0x02: Single-ended mode RFN<br>
1678                                         //!<        0x05 Single-ended mode RFP with external frontend control on RF pins (RFN and RXTX)<br>
1679                                         //!<        0x06 Single-ended mode RFN with external frontend control on RF pins (RFP and RXTX)<br>
1680                                         //!<        Others: <i>Reserved</i>
1681       uint16_t biasMode:1;              //!< \brief 0: Internal bias<br>
1682                                         //!<        1: External bias
1683       uint16_t analogCfgMode:6;         //!< \brief 0x00: Write analog configuration.<br>
1684                                         //!<        Required first time after boot and when changing frequency band
1685                                         //!<        or front-end configuration<br>
1686                                         //!<        0x2D: Keep analog configuration.<br>
1687                                         //!<        May be used after standby or when changing mode with the same frequency
1688                                         //!<        band and front-end configuration<br>
1689                                         //!<        Others: <i>Reserved</i>
1690       uint16_t bNoFsPowerUp:1;          //!< \brief 0: Power up frequency synth<br>
1691                                         //!<        1: Do not power up frequency synth
1692       uint16_t :1;
1693       uint16_t bSynthNarrowBand:1;      //!< \brief 0: Normal synth mode<br>
1694                                         //!<        1: Narrow-band synth mode
1695    } config;                            //!<        Configuration options
1696    uint16_t txPower;                    //!<        Default transmit power
1697    uint32_t* pRegOverrideCommon;        //!< \brief Pointer to a list of hardware and configuration registers to override during common
1698                                         //!<        initialization. If NULL, no override is used.
1699    uint32_t* pRegOverride1Mbps;         //!< \brief Pointer to a list of hardware and configuration registers to override when selecting
1700                                         //!<        1 Mbps PHY mode. If NULL, no override is used.
1701    uint32_t* pRegOverride2Mbps;         //!< \brief Pointer to a list of hardware and configuration registers to override when selecting
1702                                         //!<        2 Mbps PHY mode. If NULL, no override is used.
1703    uint32_t* pRegOverrideCoded;         //!< \brief Pointer to a list of hardware and configuration registers to override when selecting
1704                                         //!<        coded PHY mode. If NULL, no override is used.
1705    uint32_t* pRegOverrideTxStd;         //!< \brief Pointer to a list of hardware and configuration registers to override when switching to
1706                                         //!<        standard PA. Used by RF driver only, not radio CPU.
1707    uint32_t* pRegOverrideTx20;          //!< \brief Pointer to a list of hardware and configuration registers to override when switching to
1708                                         //!<        20-dBm PA. Used by RF driver only, not radio CPU.
1709 } __RFC_STRUCT_ATTR;
1710 
1711 //! @}
1712 
1713 //! \addtogroup bleMasterSlavePar
1714 //! @{
1715 struct __RFC_STRUCT rfc_bleMasterSlavePar_s {
1716    dataQueue_t* pRxQ;                   //!<        Pointer to receive queue
1717    dataQueue_t* pTxQ;                   //!<        Pointer to transmit queue
1718    struct {
1719       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically remove ignored packets from Rx queue
1720       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically remove packets with CRC error from Rx queue
1721       uint8_t bAutoFlushEmpty:1;        //!<        If 1, automatically remove empty packets from Rx queue
1722       uint8_t bIncludeLenByte:1;        //!<        If 1, include the received length byte in the stored packet; otherwise discard it
1723       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
1724       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the Rx queue
1725       uint8_t bAppendStatus:1;          //!<        If 1, append a status word to the packet in the Rx queue
1726       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the Rx queue
1727    } rxConfig;                          //!<        Configuration bits for the receive queue entries
1728    struct {
1729       uint8_t lastRxSn:1;               //!<        The SN bit of the header of the last packet received with CRC OK
1730       uint8_t lastTxSn:1;               //!<        The SN bit of the header of the last transmitted packet
1731       uint8_t nextTxSn:1;               //!<        The SN bit of the header of the next packet to transmit
1732       uint8_t bFirstPkt:1;              //!<        For slave: 0 if a packet has been transmitted on the connection, 1 otherwise
1733       uint8_t bAutoEmpty:1;             //!<        1 if the last transmitted packet was an auto-empty packet
1734       uint8_t bLlCtrlTx:1;              //!<        1 if the last transmitted packet was an LL control packet (LLID = 11)
1735       uint8_t bLlCtrlAckRx:1;           //!<        1 if the last received packet was the ACK of an LL control packet
1736       uint8_t bLlCtrlAckPending:1;      //!<        1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed
1737    } seqStat;                           //!<        Sequence number status
1738    uint8_t maxNack;                     //!<        Maximum number of NACKs received before operation ends. 0: No limit
1739    uint8_t maxPkt;                      //!<        Maximum number of packets transmitted in the operation before it ends. 0: No limit
1740    uint32_t accessAddress;              //!<        Access address used on the connection
1741    uint8_t crcInit0;                    //!<        CRC initialization value used on the connection -- least significant byte
1742    uint8_t crcInit1;                    //!<        CRC initialization value used on the connection -- middle byte
1743    uint8_t crcInit2;                    //!<        CRC initialization value used on the connection -- most significant byte
1744 } __RFC_STRUCT_ATTR;
1745 
1746 //! @}
1747 
1748 //! \addtogroup bleSlavePar
1749 //! @{
1750 //! Parameter structure for legacy slave (CMD_BLE_SLAVE)
1751 
1752 struct __RFC_STRUCT rfc_bleSlavePar_s {
1753    dataQueue_t* pRxQ;                   //!<        Pointer to receive queue
1754    dataQueue_t* pTxQ;                   //!<        Pointer to transmit queue
1755    struct {
1756       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically remove ignored packets from Rx queue
1757       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically remove packets with CRC error from Rx queue
1758       uint8_t bAutoFlushEmpty:1;        //!<        If 1, automatically remove empty packets from Rx queue
1759       uint8_t bIncludeLenByte:1;        //!<        If 1, include the received length byte in the stored packet; otherwise discard it
1760       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
1761       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the Rx queue
1762       uint8_t bAppendStatus:1;          //!<        If 1, append a status word to the packet in the Rx queue
1763       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the Rx queue
1764    } rxConfig;                          //!<        Configuration bits for the receive queue entries
1765    struct {
1766       uint8_t lastRxSn:1;               //!<        The SN bit of the header of the last packet received with CRC OK
1767       uint8_t lastTxSn:1;               //!<        The SN bit of the header of the last transmitted packet
1768       uint8_t nextTxSn:1;               //!<        The SN bit of the header of the next packet to transmit
1769       uint8_t bFirstPkt:1;              //!<        For slave: 0 if a packet has been transmitted on the connection, 1 otherwise
1770       uint8_t bAutoEmpty:1;             //!<        1 if the last transmitted packet was an auto-empty packet
1771       uint8_t bLlCtrlTx:1;              //!<        1 if the last transmitted packet was an LL control packet (LLID = 11)
1772       uint8_t bLlCtrlAckRx:1;           //!<        1 if the last received packet was the ACK of an LL control packet
1773       uint8_t bLlCtrlAckPending:1;      //!<        1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed
1774    } seqStat;                           //!<        Sequence number status
1775    uint8_t maxNack;                     //!<        Maximum number of NACKs received before operation ends. 0: No limit
1776    uint8_t maxPkt;                      //!<        Maximum number of packets transmitted in the operation before it ends. 0: No limit
1777    uint32_t accessAddress;              //!<        Access address used on the connection
1778    uint8_t crcInit0;                    //!<        CRC initialization value used on the connection -- least significant byte
1779    uint8_t crcInit1;                    //!<        CRC initialization value used on the connection -- middle byte
1780    uint8_t crcInit2;                    //!<        CRC initialization value used on the connection -- most significant byte
1781    struct {
1782       uint8_t triggerType:4;            //!<        The type of trigger
1783       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1784                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1785       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1786       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1787                                         //!<        1: A trigger in the past is triggered as soon as possible
1788    } timeoutTrigger;                    //!<        Trigger that defines timeout of the first receive operation
1789    ratmr_t timeoutTime;                 //!< \brief Time used together with <code>timeoutTrigger</code> that defines timeout of the first
1790                                         //!<        receive operation
1791    uint16_t __dummy0;
1792    uint8_t __dummy1;
1793    struct {
1794       uint8_t triggerType:4;            //!<        The type of trigger
1795       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1796                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1797       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1798       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1799                                         //!<        1: A trigger in the past is triggered as soon as possible
1800    } endTrigger;                        //!<        Trigger that causes the device to end the connection event as soon as allowed
1801    ratmr_t endTime;                     //!< \brief Time used together with <code>endTrigger</code> that causes the device to end the
1802                                         //!<        connection event as soon as allowed
1803 } __RFC_STRUCT_ATTR;
1804 
1805 //! @}
1806 
1807 //! \addtogroup bleMasterPar
1808 //! @{
1809 //! Parameter structure for legacy master (CMD_BLE_MASTER)
1810 
1811 struct __RFC_STRUCT rfc_bleMasterPar_s {
1812    dataQueue_t* pRxQ;                   //!<        Pointer to receive queue
1813    dataQueue_t* pTxQ;                   //!<        Pointer to transmit queue
1814    struct {
1815       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically remove ignored packets from Rx queue
1816       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically remove packets with CRC error from Rx queue
1817       uint8_t bAutoFlushEmpty:1;        //!<        If 1, automatically remove empty packets from Rx queue
1818       uint8_t bIncludeLenByte:1;        //!<        If 1, include the received length byte in the stored packet; otherwise discard it
1819       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
1820       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the Rx queue
1821       uint8_t bAppendStatus:1;          //!<        If 1, append a status word to the packet in the Rx queue
1822       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the Rx queue
1823    } rxConfig;                          //!<        Configuration bits for the receive queue entries
1824    struct {
1825       uint8_t lastRxSn:1;               //!<        The SN bit of the header of the last packet received with CRC OK
1826       uint8_t lastTxSn:1;               //!<        The SN bit of the header of the last transmitted packet
1827       uint8_t nextTxSn:1;               //!<        The SN bit of the header of the next packet to transmit
1828       uint8_t bFirstPkt:1;              //!<        For slave: 0 if a packet has been transmitted on the connection, 1 otherwise
1829       uint8_t bAutoEmpty:1;             //!<        1 if the last transmitted packet was an auto-empty packet
1830       uint8_t bLlCtrlTx:1;              //!<        1 if the last transmitted packet was an LL control packet (LLID = 11)
1831       uint8_t bLlCtrlAckRx:1;           //!<        1 if the last received packet was the ACK of an LL control packet
1832       uint8_t bLlCtrlAckPending:1;      //!<        1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed
1833    } seqStat;                           //!<        Sequence number status
1834    uint8_t maxNack;                     //!<        Maximum number of NACKs received before operation ends. 0: No limit
1835    uint8_t maxPkt;                      //!<        Maximum number of packets transmitted in the operation before it ends. 0: No limit
1836    uint32_t accessAddress;              //!<        Access address used on the connection
1837    uint8_t crcInit0;                    //!<        CRC initialization value used on the connection -- least significant byte
1838    uint8_t crcInit1;                    //!<        CRC initialization value used on the connection -- middle byte
1839    uint8_t crcInit2;                    //!<        CRC initialization value used on the connection -- most significant byte
1840    struct {
1841       uint8_t triggerType:4;            //!<        The type of trigger
1842       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1843                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1844       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1845       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1846                                         //!<        1: A trigger in the past is triggered as soon as possible
1847    } endTrigger;                        //!<        Trigger that causes the device to end the connection event as soon as allowed
1848    ratmr_t endTime;                     //!< \brief Time used together with <code>endTrigger</code> that causes the device to end the
1849                                         //!<        connection event as soon as allowed
1850 } __RFC_STRUCT_ATTR;
1851 
1852 //! @}
1853 
1854 //! \addtogroup bleAdvPar
1855 //! @{
1856 //! Parameter structure for legacy advertiser (CMD_BLE_ADV* and CMD_BLE5_ADV*)
1857 
1858 struct __RFC_STRUCT rfc_bleAdvPar_s {
1859    dataQueue_t* pRxQ;                   //!<        Pointer to receive queue
1860    struct {
1861       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically remove ignored packets from Rx queue
1862       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically remove packets with CRC error from Rx queue
1863       uint8_t bAutoFlushEmpty:1;        //!<        If 1, automatically remove empty packets from Rx queue
1864       uint8_t bIncludeLenByte:1;        //!<        If 1, include the received length byte in the stored packet; otherwise discard it
1865       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
1866       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the Rx queue
1867       uint8_t bAppendStatus:1;          //!<        If 1, append a status word to the packet in the Rx queue
1868       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the Rx queue
1869    } rxConfig;                          //!<        Configuration bits for the receive queue entries
1870    struct {
1871       uint8_t advFilterPolicy:2;        //!< \brief Advertiser filter policy<br>
1872                                         //!<        0: Process scan and connect requests from all devices<br>
1873                                         //!<        1: Process connect requests from all devices and only scan requests from
1874                                         //!<        devices that are in the white list<br>
1875                                         //!<        2: Process scan requests from all devices and only connect requests from
1876                                         //!<        devices that are in the white list<br>
1877                                         //!<        3: Process scan and connect requests only from devices in the white list
1878       uint8_t deviceAddrType:1;         //!<        The type of the device address -- public (0) or random (1)
1879       uint8_t peerAddrType:1;           //!<        Directed advertiser: The type of the peer address -- public (0) or random (1)
1880       uint8_t bStrictLenFilter:1;       //!< \brief 0: Accept any packet with a valid advertising packet length<br>
1881                                         //!<        1: Discard messages with illegal length for the given packet type
1882       uint8_t chSel:1;                  //!< \brief 0: Do not report support of Channel Selection Algorithm #2<br>
1883                                         //!<        1: Report support of Channel Selection Algorithm #2
1884       uint8_t privIgnMode:1;            //!< \brief 0: Filter on bPrivIgn only when white list is used
1885                                         //!<        1: Filter on bPrivIgn always
1886       uint8_t rpaMode:1;                //!< \brief Resolvable private address mode<br>
1887                                         //!<        0: Normal operation<br>
1888                                         //!<        1: Use white list for a received RPA regardless of filter policy
1889    } advConfig;
1890    uint8_t advLen;                      //!<        Size of advertiser data
1891    uint8_t scanRspLen;                  //!<        Size of scan response data
1892    uint8_t* pAdvData;                   //!<        Pointer to buffer containing ADV*_IND data
1893    uint8_t* pScanRspData;               //!<        Pointer to buffer containing SCAN_RSP data
1894    uint16_t* pDeviceAddress;            //!< \brief Pointer (with least significant bit set to 0) to device address used for this device.
1895                                         //!<        If least significant bit is 1, the address type given by
1896                                         //!<        <code>advConfig.deviceAddrType</code> is inverted.
1897    rfc_bleWhiteListEntry_t *pWhiteList; //!< \brief Pointer (with least significant bit set to 0)  to white list or peer address (directed
1898                                         //!<        advertiser). If least significant bit is 1, the address type given by
1899                                         //!<        <code>advConfig.peerAddrType</code> is inverted.
1900    struct {
1901       uint8_t scanRspEndType:1;         //!< \brief Command status at end if SCAN_RSP was sent:<br>
1902                                         //!<        0: End with BLE_DONE_OK and result True<br>
1903                                         //!<        1: End with BLE_DONE_SCAN_RSP and result False
1904    } behConfig;
1905    uint8_t __dummy0;
1906    uint8_t __dummy1;
1907    struct {
1908       uint8_t triggerType:4;            //!<        The type of trigger
1909       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1910                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1911       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1912       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1913                                         //!<        1: A trigger in the past is triggered as soon as possible
1914    } endTrigger;                        //!<        Trigger that causes the device to end the advertiser event as soon as allowed
1915    ratmr_t endTime;                     //!< \brief Time used together with <code>endTrigger</code> that causes the device to end the
1916                                         //!<        advertiser event as soon as allowed
1917 } __RFC_STRUCT_ATTR;
1918 
1919 //! @}
1920 
1921 //! \addtogroup bleScannerPar
1922 //! @{
1923 //! Parameter structure for legacy scanner (CMD_BLE_SCANNER)
1924 
1925 struct __RFC_STRUCT rfc_bleScannerPar_s {
1926    dataQueue_t* pRxQ;                   //!<        Pointer to receive queue
1927    struct {
1928       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically remove ignored packets from Rx queue
1929       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically remove packets with CRC error from Rx queue
1930       uint8_t bAutoFlushEmpty:1;        //!<        If 1, automatically remove empty packets from Rx queue
1931       uint8_t bIncludeLenByte:1;        //!<        If 1, include the received length byte in the stored packet; otherwise discard it
1932       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
1933       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the Rx queue
1934       uint8_t bAppendStatus:1;          //!<        If 1, append a status word to the packet in the Rx queue
1935       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the Rx queue
1936    } rxConfig;                          //!<        Configuration bits for the receive queue entries
1937    struct {
1938       uint8_t scanFilterPolicy:1;       //!< \brief Scanning filter policy regarding advertiser address<br>
1939                                         //!<        0: Accept all advertisement packets<br>
1940                                         //!<        1: Accept only advertisement packets from devices where the advertiser's address
1941                                         //!<        is in the white list
1942       uint8_t bActiveScan:1;            //!< \brief 0: Passive scan<br>
1943                                         //!<        1: Active scan
1944       uint8_t deviceAddrType:1;         //!<        The type of the device address -- public (0) or random (1)
1945       uint8_t rpaFilterPolicy:1;        //!< \brief Filter policy for initA for ADV_DIRECT_IND messages<br>
1946                                         //!<        0: Accept only initA that matches own address<br>
1947                                         //!<        1: Also accept all resolvable private addresses
1948       uint8_t bStrictLenFilter:1;       //!< \brief 0: Accept any packet with a valid advertising packet length<br>
1949                                         //!<        1: Discard messages with illegal length for the given packet type
1950       uint8_t bAutoWlIgnore:1;          //!< \brief 0: Do not set ignore bit in white list from radio CPU<br>
1951                                         //!<        1: Automatically set ignore bit in white list
1952       uint8_t bEndOnRpt:1;              //!< \brief 0: Continue scanner operation after each reporting ADV*_IND or sending SCAN_RSP<br>
1953                                         //!<        1: End scanner operation after each reported ADV*_IND and potentially SCAN_RSP
1954       uint8_t rpaMode:1;                //!< \brief Resolvable private address mode<br>
1955                                         //!<        0: Normal operation<br>
1956                                         //!<        1: Use white list for a received RPA regardless of filter policy
1957    } scanConfig;
1958    uint16_t randomState;                //!<        State for pseudo-random number generation used in backoff procedure
1959    uint16_t backoffCount;               //!<        Parameter <i>backoffCount</i> used in backoff procedure, cf. Bluetooth spec
1960    struct {
1961       uint8_t logUpperLimit:4;          //!<        Binary logarithm of parameter upperLimit used in scanner backoff procedure
1962       uint8_t bLastSucceeded:1;         //!< \brief 1 if the last SCAN_RSP was successfully received and <code>upperLimit</code>
1963                                         //!<        not changed
1964       uint8_t bLastFailed:1;            //!< \brief 1 if reception of the last SCAN_RSP failed and <code>upperLimit</code> was not
1965                                         //!<        changed
1966    } backoffPar;
1967    uint8_t scanReqLen;                  //!<        Size of scan request data
1968    uint8_t* pScanReqData;               //!<        Pointer to buffer containing SCAN_REQ data
1969    uint16_t* pDeviceAddress;            //!< \brief Pointer (with least significant bit set to 0) to device address used for this device.
1970                                         //!<        If least significant bit is 1, the address type given by
1971                                         //!<        <code>scanConfig.deviceAddrType</code> is inverted.
1972    rfc_bleWhiteListEntry_t *pWhiteList; //!<        Pointer to white list
1973    uint16_t __dummy0;
1974    struct {
1975       uint8_t triggerType:4;            //!<        The type of trigger
1976       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1977                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1978       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1979       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1980                                         //!<        1: A trigger in the past is triggered as soon as possible
1981    } timeoutTrigger;                    //!<        Trigger that causes the device to stop receiving as soon as allowed
1982    struct {
1983       uint8_t triggerType:4;            //!<        The type of trigger
1984       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
1985                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
1986       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
1987       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
1988                                         //!<        1: A trigger in the past is triggered as soon as possible
1989    } endTrigger;                        //!<        Trigger that causes the device to stop receiving as soon as allowed
1990    ratmr_t timeoutTime;                 //!< \brief Time used together with <code>timeoutTrigger</code> that causes the device to stop
1991                                         //!<        receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT
1992    ratmr_t endTime;                     //!< \brief Time used together with <code>endTrigger</code> that causes the device to stop
1993                                         //!<        receiving as soon as allowed, ending with BLE_DONE_ENDED
1994 } __RFC_STRUCT_ATTR;
1995 
1996 //! @}
1997 
1998 //! \addtogroup bleInitiatorPar
1999 //! @{
2000 //! Parameter structure for legacy initiator (CMD_BLE_INITIATOR)
2001 
2002 struct __RFC_STRUCT rfc_bleInitiatorPar_s {
2003    dataQueue_t* pRxQ;                   //!<        Pointer to receive queue
2004    struct {
2005       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically remove ignored packets from Rx queue
2006       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically remove packets with CRC error from Rx queue
2007       uint8_t bAutoFlushEmpty:1;        //!<        If 1, automatically remove empty packets from Rx queue
2008       uint8_t bIncludeLenByte:1;        //!<        If 1, include the received length byte in the stored packet; otherwise discard it
2009       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
2010       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the Rx queue
2011       uint8_t bAppendStatus:1;          //!<        If 1, append a status word to the packet in the Rx queue
2012       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the Rx queue
2013    } rxConfig;                          //!<        Configuration bits for the receive queue entries
2014    struct {
2015       uint8_t bUseWhiteList:1;          //!< \brief Initiator filter policy<br>
2016                                         //!<        0: Use specific peer address<br>
2017                                         //!<        1: Use white list
2018       uint8_t bDynamicWinOffset:1;      //!< \brief 0: No dynamic WinOffset insertion<br>
2019                                         //!<        1: Use dynamic WinOffset insertion
2020       uint8_t deviceAddrType:1;         //!<        The type of the device address -- public (0) or random (1)
2021       uint8_t peerAddrType:1;           //!<        The type of the peer address -- public (0) or random (1)
2022       uint8_t bStrictLenFilter:1;       //!< \brief 0: Accept any packet with a valid advertising packet length<br>
2023                                         //!<        1: Discard messages with illegal length for the given packet type
2024       uint8_t chSel:1;                  //!< \brief 0: Do not report support of Channel Selection Algorithm #2<br>
2025                                         //!<        1: Report support of Channel Selection Algorithm #2
2026    } initConfig;
2027    uint8_t __dummy0;
2028    uint8_t connectReqLen;               //!<        Size of connect request data
2029    uint8_t* pConnectReqData;            //!<        Pointer to buffer containing LLData to go in the CONNECT_IND (CONNECT_REQ)
2030    uint16_t* pDeviceAddress;            //!< \brief Pointer (with least significant bit set to 0) to device address used for this device.
2031                                         //!<        If least significant bit is 1, the address type given by
2032                                         //!<        <code>initConfig.deviceAddrType</code> is inverted.
2033    rfc_bleWhiteListEntry_t *pWhiteList; //!< \brief Pointer (with least significant bit set to 0)  to white list or peer address. If least
2034                                         //!<        significant bit is 1, the address type given by <code>initConfig.peerAddrType</code>
2035                                         //!<        is inverted.
2036    ratmr_t connectTime;                 //!< \brief Indication of timer value of the first possible start time of the first connection event.
2037                                         //!<        Set to the calculated value if a connection is made and to the next possible connection
2038                                         //!<        time if not.
2039    uint16_t __dummy1;
2040    struct {
2041       uint8_t triggerType:4;            //!<        The type of trigger
2042       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
2043                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
2044       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
2045       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
2046                                         //!<        1: A trigger in the past is triggered as soon as possible
2047    } timeoutTrigger;                    //!<        Trigger that causes the device to stop receiving as soon as allowed
2048    struct {
2049       uint8_t triggerType:4;            //!<        The type of trigger
2050       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
2051                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
2052       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
2053       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
2054                                         //!<        1: A trigger in the past is triggered as soon as possible
2055    } endTrigger;                        //!<        Trigger that causes the device to stop receiving as soon as allowed
2056    ratmr_t timeoutTime;                 //!< \brief Time used together with <code>timeoutTrigger</code> that causes the device to stop
2057                                         //!<        receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT
2058    ratmr_t endTime;                     //!< \brief Time used together with <code>endTrigger</code> that causes the device to stop
2059                                         //!<        receiving as soon as allowed, ending with BLE_DONE_ENDED
2060 } __RFC_STRUCT_ATTR;
2061 
2062 //! @}
2063 
2064 //! \addtogroup bleGenericRxPar
2065 //! @{
2066 //! Parameter structure for generic Rx (CMD_BLE_GENERIC_RX and CMD_BLE5_GENERIC_RX)
2067 
2068 struct __RFC_STRUCT rfc_bleGenericRxPar_s {
2069    dataQueue_t* pRxQ;                   //!<        Pointer to receive queue. May be NULL; if so, received packets are not stored
2070    struct {
2071       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically remove ignored packets from Rx queue
2072       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically remove packets with CRC error from Rx queue
2073       uint8_t bAutoFlushEmpty:1;        //!<        If 1, automatically remove empty packets from Rx queue
2074       uint8_t bIncludeLenByte:1;        //!<        If 1, include the received length byte in the stored packet; otherwise discard it
2075       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
2076       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the Rx queue
2077       uint8_t bAppendStatus:1;          //!<        If 1, append a status word to the packet in the Rx queue
2078       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the Rx queue
2079    } rxConfig;                          //!<        Configuration bits for the receive queue entries
2080    uint8_t bRepeat;                     //!< \brief 0: End operation after receiving a packet<br>
2081                                         //!<        1: Restart receiver after receiving a packet
2082    uint16_t __dummy0;
2083    uint32_t accessAddress;              //!<        Access address used on the connection
2084    uint8_t crcInit0;                    //!<        CRC initialization value used on the connection -- least significant byte
2085    uint8_t crcInit1;                    //!<        CRC initialization value used on the connection -- middle byte
2086    uint8_t crcInit2;                    //!<        CRC initialization value used on the connection -- most significant byte
2087    struct {
2088       uint8_t triggerType:4;            //!<        The type of trigger
2089       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
2090                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
2091       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
2092       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
2093                                         //!<        1: A trigger in the past is triggered as soon as possible
2094    } endTrigger;                        //!<        Trigger that causes the device to end the Rx operation
2095    ratmr_t endTime;                     //!< \brief Time used together with <code>endTrigger</code> that causes the device to end the
2096                                         //!<        Rx operation
2097 } __RFC_STRUCT_ATTR;
2098 
2099 //! @}
2100 
2101 //! \addtogroup bleTxTestPar
2102 //! @{
2103 //! Parameter structure for Tx test (CMD_BLE_TX_TEST and CMD_BLE5_TX_TEST)
2104 
2105 struct __RFC_STRUCT rfc_bleTxTestPar_s {
2106    uint16_t numPackets;                 //!< \brief Number of packets to transmit<br>
2107                                         //!<        0: Transmit unlimited number of packets
2108    uint8_t payloadLength;               //!<        The number of payload bytes in each packet.
2109    uint8_t packetType;                  //!< \brief The packet type to be used, encoded according to the Bluetooth 5.0 spec, Volume 6, Part F,
2110                                         //!<        Section 4.1.4
2111    ratmr_t period;                      //!<        Number of radio timer cycles between the start of each packet
2112    struct {
2113       uint8_t bOverrideDefault:1;       //!< \brief 0: Use default packet encoding<br>
2114                                         //!<        1: Override packet contents
2115       uint8_t bUsePrbs9:1;              //!< \brief If <code>bOverride</code> is 1:<br>
2116                                         //!<        0: No PRBS9 encoding of packet<br>
2117                                         //!<        1: Use PRBS9 encoding of packet
2118       uint8_t bUsePrbs15:1;             //!< \brief If <code>bOverride</code> is 1:<br>
2119                                         //!<        0: No PRBS15 encoding of packet<br>
2120                                         //!<        1: Use PRBS15 encoding of packet
2121    } config;
2122    uint8_t byteVal;                     //!<        If <code>config.bOverride</code> is 1, value of each byte to be sent
2123    uint8_t __dummy0;
2124    struct {
2125       uint8_t triggerType:4;            //!<        The type of trigger
2126       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
2127                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
2128       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
2129       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
2130                                         //!<        1: A trigger in the past is triggered as soon as possible
2131    } endTrigger;                        //!<        Trigger that causes the device to end the Test Tx operation
2132    ratmr_t endTime;                     //!< \brief Time used together with <code>endTrigger</code> that causes the device to end the
2133                                         //!<        Test Tx operation
2134 } __RFC_STRUCT_ATTR;
2135 
2136 //! @}
2137 
2138 //! \addtogroup ble5SlavePar
2139 //! @{
2140 //! Parameter structure for Bluetooth 5 slave (CMD_BLE5_SLAVE)
2141 
2142 struct __RFC_STRUCT rfc_ble5SlavePar_s {
2143    dataQueue_t* pRxQ;                   //!<        Pointer to receive queue
2144    dataQueue_t* pTxQ;                   //!<        Pointer to transmit queue
2145    struct {
2146       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically remove ignored packets from Rx queue
2147       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically remove packets with CRC error from Rx queue
2148       uint8_t bAutoFlushEmpty:1;        //!<        If 1, automatically remove empty packets from Rx queue
2149       uint8_t bIncludeLenByte:1;        //!<        If 1, include the received length byte in the stored packet; otherwise discard it
2150       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
2151       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the Rx queue
2152       uint8_t bAppendStatus:1;          //!<        If 1, append a status word to the packet in the Rx queue
2153       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the Rx queue
2154    } rxConfig;                          //!<        Configuration bits for the receive queue entries
2155    struct {
2156       uint8_t lastRxSn:1;               //!<        The SN bit of the header of the last packet received with CRC OK
2157       uint8_t lastTxSn:1;               //!<        The SN bit of the header of the last transmitted packet
2158       uint8_t nextTxSn:1;               //!<        The SN bit of the header of the next packet to transmit
2159       uint8_t bFirstPkt:1;              //!<        For slave: 0 if a packet has been transmitted on the connection, 1 otherwise
2160       uint8_t bAutoEmpty:1;             //!<        1 if the last transmitted packet was an auto-empty packet
2161       uint8_t bLlCtrlTx:1;              //!<        1 if the last transmitted packet was an LL control packet (LLID = 11)
2162       uint8_t bLlCtrlAckRx:1;           //!<        1 if the last received packet was the ACK of an LL control packet
2163       uint8_t bLlCtrlAckPending:1;      //!<        1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed
2164    } seqStat;                           //!<        Sequence number status
2165    uint8_t maxNack;                     //!<        Maximum number of NACKs received before operation ends. 0: No limit
2166    uint8_t maxPkt;                      //!<        Maximum number of packets transmitted in the operation before it ends. 0: No limit
2167    uint32_t accessAddress;              //!<        Access address used on the connection
2168    uint8_t crcInit0;                    //!<        CRC initialization value used on the connection -- least significant byte
2169    uint8_t crcInit1;                    //!<        CRC initialization value used on the connection -- middle byte
2170    uint8_t crcInit2;                    //!<        CRC initialization value used on the connection -- most significant byte
2171    struct {
2172       uint8_t triggerType:4;            //!<        The type of trigger
2173       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
2174                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
2175       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
2176       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
2177                                         //!<        1: A trigger in the past is triggered as soon as possible
2178    } timeoutTrigger;                    //!<        Trigger that defines timeout of the first receive operation
2179    ratmr_t timeoutTime;                 //!< \brief Time used together with <code>timeoutTrigger</code> that defines timeout of the first
2180                                         //!<        receive operation
2181    uint8_t maxRxPktLen;                 //!<        Maximum packet length currently allowed for received packets on the connection
2182    uint8_t maxLenLowRate;               //!<        Maximum packet length for which using S = 8 (125 kbps) is allowed when transmitting. 0: no limit.
2183    uint8_t __dummy0;
2184    struct {
2185       uint8_t triggerType:4;            //!<        The type of trigger
2186       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
2187                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
2188       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
2189       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
2190                                         //!<        1: A trigger in the past is triggered as soon as possible
2191    } endTrigger;                        //!<        Trigger that causes the device to end the connection event as soon as allowed
2192    ratmr_t endTime;                     //!< \brief Time used together with <code>endTrigger</code> that causes the device to end the
2193                                         //!<        connection event as soon as allowed
2194 } __RFC_STRUCT_ATTR;
2195 
2196 //! @}
2197 
2198 //! \addtogroup ble5MasterPar
2199 //! @{
2200 //! Parameter structure for Bluetooth 5 master (CMD_BLE5_MASTER)
2201 
2202 struct __RFC_STRUCT rfc_ble5MasterPar_s {
2203    dataQueue_t* pRxQ;                   //!<        Pointer to receive queue
2204    dataQueue_t* pTxQ;                   //!<        Pointer to transmit queue
2205    struct {
2206       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically remove ignored packets from Rx queue
2207       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically remove packets with CRC error from Rx queue
2208       uint8_t bAutoFlushEmpty:1;        //!<        If 1, automatically remove empty packets from Rx queue
2209       uint8_t bIncludeLenByte:1;        //!<        If 1, include the received length byte in the stored packet; otherwise discard it
2210       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
2211       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the Rx queue
2212       uint8_t bAppendStatus:1;          //!<        If 1, append a status word to the packet in the Rx queue
2213       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the Rx queue
2214    } rxConfig;                          //!<        Configuration bits for the receive queue entries
2215    struct {
2216       uint8_t lastRxSn:1;               //!<        The SN bit of the header of the last packet received with CRC OK
2217       uint8_t lastTxSn:1;               //!<        The SN bit of the header of the last transmitted packet
2218       uint8_t nextTxSn:1;               //!<        The SN bit of the header of the next packet to transmit
2219       uint8_t bFirstPkt:1;              //!<        For slave: 0 if a packet has been transmitted on the connection, 1 otherwise
2220       uint8_t bAutoEmpty:1;             //!<        1 if the last transmitted packet was an auto-empty packet
2221       uint8_t bLlCtrlTx:1;              //!<        1 if the last transmitted packet was an LL control packet (LLID = 11)
2222       uint8_t bLlCtrlAckRx:1;           //!<        1 if the last received packet was the ACK of an LL control packet
2223       uint8_t bLlCtrlAckPending:1;      //!<        1 if the last successfully received packet was an LL control packet which has not yet been ACK'ed
2224    } seqStat;                           //!<        Sequence number status
2225    uint8_t maxNack;                     //!<        Maximum number of NACKs received before operation ends. 0: No limit
2226    uint8_t maxPkt;                      //!<        Maximum number of packets transmitted in the operation before it ends. 0: No limit
2227    uint32_t accessAddress;              //!<        Access address used on the connection
2228    uint8_t crcInit0;                    //!<        CRC initialization value used on the connection -- least significant byte
2229    uint8_t crcInit1;                    //!<        CRC initialization value used on the connection -- middle byte
2230    uint8_t crcInit2;                    //!<        CRC initialization value used on the connection -- most significant byte
2231    struct {
2232       uint8_t triggerType:4;            //!<        The type of trigger
2233       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
2234                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
2235       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
2236       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
2237                                         //!<        1: A trigger in the past is triggered as soon as possible
2238    } endTrigger;                        //!<        Trigger that causes the device to end the connection event as soon as allowed
2239    ratmr_t endTime;                     //!< \brief Time used together with <code>endTrigger</code> that causes the device to end the
2240                                         //!<        connection event as soon as allowed
2241    uint8_t maxRxPktLen;                 //!<        Maximum packet length currently allowed for received packets on the connection
2242    uint8_t maxLenLowRate;               //!<        Maximum packet length for which using S = 8 (125 kbps) is allowed when transmitting. 0: no limit.
2243 } __RFC_STRUCT_ATTR;
2244 
2245 //! @}
2246 
2247 //! \addtogroup ble5AdvExtPar
2248 //! @{
2249 //! Parameter structure for extended advertiser (CMD_BLE5_ADV_EXT)
2250 
2251 struct __RFC_STRUCT rfc_ble5AdvExtPar_s {
2252    struct {
2253       uint8_t :2;
2254       uint8_t deviceAddrType:1;         //!<        The type of the device address -- public (0) or random (1)
2255    } advConfig;
2256    uint8_t __dummy0;
2257    uint8_t __dummy1;
2258    uint8_t auxPtrTargetType;            //!< \brief Number indicating reference for auxPtrTargetTime. Takes same values as trigger types,
2259                                         //!<        but only TRIG_ABSTIME and TRIG_REL_* are allowed
2260    ratmr_t auxPtrTargetTime;            //!<        Time of start of packet to which auxPtr points
2261    uint8_t* pAdvPkt;                    //!<        Pointer to extended advertising packet for the ADV_EXT_IND packet
2262    uint16_t* pDeviceAddress;            //!< \brief Pointer (with least significant bit set to 0) to device address used for this device.
2263                                         //!<        If least significant bit is 1, the address type given by
2264                                         //!<        <code>advConfig.deviceAddrType</code> is inverted.
2265 } __RFC_STRUCT_ATTR;
2266 
2267 //! @}
2268 
2269 //! \addtogroup ble5AdvAuxPar
2270 //! @{
2271 //! Parameter structure for secondary channel advertiser (CMD_BLE5_ADV_AUX)
2272 
2273 struct __RFC_STRUCT rfc_ble5AdvAuxPar_s {
2274    dataQueue_t* pRxQ;                   //!<        Pointer to receive queue
2275    struct {
2276       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically remove ignored packets from Rx queue
2277       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically remove packets with CRC error from Rx queue
2278       uint8_t bAutoFlushEmpty:1;        //!<        If 1, automatically remove empty packets from Rx queue
2279       uint8_t bIncludeLenByte:1;        //!<        If 1, include the received length byte in the stored packet; otherwise discard it
2280       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
2281       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the Rx queue
2282       uint8_t bAppendStatus:1;          //!<        If 1, append a status word to the packet in the Rx queue
2283       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the Rx queue
2284    } rxConfig;                          //!<        Configuration bits for the receive queue entries
2285    struct {
2286       uint8_t advFilterPolicy:2;        //!< \brief Advertiser filter policy<br>
2287                                         //!<        0: Process scan and connect requests from all devices<br>
2288                                         //!<        1: Process connect requests from all devices and only scan requests from
2289                                         //!<        devices that are in the white list<br>
2290                                         //!<        2: Process scan requests from all devices and only connect requests from
2291                                         //!<        devices that are in the white list<br>
2292                                         //!<        3: Process scan and connect requests only from devices in the white list
2293       uint8_t deviceAddrType:1;         //!<        The type of the device address -- public (0) or random (1)
2294       uint8_t targetAddrType:1;         //!<        Directed secondary advertiser: The type of the target address -- public (0) or random (1)
2295       uint8_t bStrictLenFilter:1;       //!< \brief 0: Accept any packet with a valid advertising packet length<br>
2296                                         //!<        1: Discard messages with illegal length for the given packet type
2297       uint8_t bDirected:1;              //!< \brief 0: Advertiser is undirected: pWhiteList points to a white list
2298                                         //!<        1: Advertiser is directed: pWhiteList points to a single device address
2299       uint8_t privIgnMode:1;            //!< \brief 0: Filter on bPrivIgn only when white list is used
2300                                         //!<        1: Filter on bPrivIgn always
2301       uint8_t rpaMode:1;                //!< \brief Resolvable private address mode<br>
2302                                         //!<        0: Normal operation<br>
2303                                         //!<        1: Use white list for a received RPA regardless of filter policy
2304    } advConfig;
2305    struct {
2306       uint8_t scanRspEndType:1;         //!< \brief Command status at end if AUX_SCAN_RSP was sent:<br>
2307                                         //!<        0: End with BLE_DONE_OK and result True<br>
2308                                         //!<        1: End with BLE_DONE_SCAN_RSP and result False
2309    } behConfig;
2310    uint8_t auxPtrTargetType;            //!< \brief Number indicating reference for auxPtrTargetTime. Takes same values as trigger types,
2311                                         //!<        but only TRIG_ABSTIME and TRIG_REL_* are allowed
2312    ratmr_t auxPtrTargetTime;            //!<        Time of start of packet to which auxPtr points
2313    uint8_t* pAdvPkt;                    //!<        Pointer to extended advertising packet for the ADV_AUX_IND packet
2314    uint8_t* pRspPkt;                    //!< \brief Pointer to extended advertising packet for the AUX_SCAN_RSP or AUX_CONNECT_RSP packet
2315                                         //!<        (may be NULL if not applicable)
2316    uint16_t* pDeviceAddress;            //!< \brief Pointer (with least significant bit set to 0) to device address used for this device.
2317                                         //!<        If least significant bit is 1, the address type given by
2318                                         //!<        <code>advConfig.deviceAddrType</code> is inverted.
2319    rfc_bleWhiteListEntry_t *pWhiteList; //!< \brief Pointer (with least significant bit set to 0)  to white list or peer address (directed
2320                                         //!<        advertiser). If least significant bit is 1, the address type given by
2321                                         //!<        <code>advConfig.peerAddrType</code> is inverted.
2322 } __RFC_STRUCT_ATTR;
2323 
2324 //! @}
2325 
2326 //! \addtogroup ble5AdvPerPar
2327 //! @{
2328 //! Parameter structure for periodic advertiser (CMD_BLE5_ADV_PER)
2329 
2330 struct __RFC_STRUCT rfc_ble5AdvPerPar_s {
2331    uint16_t __dummy0;
2332    uint8_t __dummy1;
2333    uint8_t auxPtrTargetType;            //!< \brief Number indicating reference for auxPtrTargetTime. Takes same values as trigger types,
2334                                         //!<        but only TRIG_ABSTIME and TRIG_REL_* are allowed
2335    ratmr_t auxPtrTargetTime;            //!<        Time of start of packet to which auxPtr points
2336    uint8_t* pAdvPkt;                    //!<        Pointer to extended advertising packet for the ADV_EXT_IND packet
2337    uint32_t accessAddress;              //!<        Access address used on the periodic advertisement
2338    uint8_t crcInit0;                    //!<        CRC initialization value used on the periodic advertisement -- least significant byte
2339    uint8_t crcInit1;                    //!<        CRC initialization value used on the periodic advertisement -- middle byte
2340    uint8_t crcInit2;                    //!<        CRC initialization value used on the periodic advertisement -- most significant byte
2341 } __RFC_STRUCT_ATTR;
2342 
2343 //! @}
2344 
2345 //! \addtogroup ble5AuxChRes
2346 //! @{
2347 struct __RFC_STRUCT rfc_ble5AuxChRes_s {
2348    ratmr_t rxStartTime;                 //!<        The time needed to start RX in order to receive the packet
2349    uint16_t rxListenTime;               //!<        The time needed to listen in order to receive the packet. 0: No AUX packet
2350    uint8_t channelNo;                   //!<        The channel index used for secondary advertising
2351    uint8_t phyMode;                     //!< \brief PHY to use on secondary channel:<br>
2352                                         //!<        0: 1 Mbps<br>
2353                                         //!<        1: 2 Mbps<br>
2354                                         //!<        2: Coded<br>
2355                                         //!<        Others: <i>Reserved</i>
2356 } __RFC_STRUCT_ATTR;
2357 
2358 //! @}
2359 
2360 //! \addtogroup ble5ScannerPar
2361 //! @{
2362 //! Parameter structure for Bluetooth 5 scanner (CMD_BLE5_SCANNER)
2363 
2364 struct __RFC_STRUCT rfc_ble5ScannerPar_s {
2365    dataQueue_t* pRxQ;                   //!<        Pointer to receive queue
2366    struct {
2367       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically remove ignored packets from Rx queue
2368       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically remove packets with CRC error from Rx queue
2369       uint8_t bAutoFlushEmpty:1;        //!<        If 1, automatically remove empty packets from Rx queue
2370       uint8_t bIncludeLenByte:1;        //!<        If 1, include the received length byte in the stored packet; otherwise discard it
2371       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
2372       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the Rx queue
2373       uint8_t bAppendStatus:1;          //!<        If 1, append a status word to the packet in the Rx queue
2374       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the Rx queue
2375    } rxConfig;                          //!<        Configuration bits for the receive queue entries
2376    struct {
2377       uint8_t scanFilterPolicy:1;       //!< \brief Scanning filter policy regarding advertiser address<br>
2378                                         //!<        0: Accept all advertisement packets<br>
2379                                         //!<        1: Accept only advertisement packets from devices where the advertiser's address
2380                                         //!<        is in the White list.
2381       uint8_t bActiveScan:1;            //!< \brief 0: Passive scan<br>
2382                                         //!<        1: Active scan
2383       uint8_t deviceAddrType:1;         //!<        The type of the device address -- public (0) or random (1)
2384       uint8_t rpaFilterPolicy:1;        //!< \brief Filter policy for initA of ADV_DIRECT_IND messages<br>
2385                                         //!<        0: Accept only initA that matches own address<br>
2386                                         //!<        1: Also accept all resolvable private addresses
2387       uint8_t bStrictLenFilter:1;       //!< \brief 0: Accept any packet with a valid advertising packet length<br>
2388                                         //!<        1: Discard messages with illegal length for the given packet type
2389       uint8_t bAutoWlIgnore:1;          //!< \brief 0: Do not set ignore bit in white list from radio CPU for legacy packets<br>
2390                                         //!<        1: Automatically set ignore bit in white list for legacy packets
2391       uint8_t bEndOnRpt:1;              //!< \brief 0: Continue scanner operation after each reporting ADV*_IND or sending SCAN_RSP<br>
2392                                         //!<        1: End scanner operation after each reported ADV*_IND and potentially SCAN_RSP
2393       uint8_t rpaMode:1;                //!< \brief Resolvable private address mode<br>
2394                                         //!<        0: Normal operation<br>
2395                                         //!<        1: Use white list for a received RPA regardless of filter policy
2396    } scanConfig;
2397    uint16_t randomState;                //!<        State for pseudo-random number generation used in backoff procedure
2398    uint16_t backoffCount;               //!<        Parameter <i>backoffCount</i> used in backoff procedure, cf. Bluetooth spec
2399    struct {
2400       uint8_t logUpperLimit:4;          //!<        Binary logarithm of parameter upperLimit used in scanner backoff procedure
2401       uint8_t bLastSucceeded:1;         //!< \brief 1 if the last SCAN_RSP was successfully received and <code>upperLimit</code>
2402                                         //!<        not changed
2403       uint8_t bLastFailed:1;            //!< \brief 1 if reception of the last SCAN_RSP failed and <code>upperLimit</code> was not
2404                                         //!<        changed
2405    } backoffPar;
2406    struct {
2407       uint8_t bCheckAdi:1;              //!< \brief 0: Do not perform ADI filtering<br>
2408                                         //!<        1: Perform ADI filtering on packets where ADI is present
2409       uint8_t bAutoAdiUpdate:1;         //!< \brief 0: Do not update ADI entries in radio CPU using legacy mode (recommended)<br>
2410                                         //!<        1: Legacy mode: Automatically update ADI entry for received packets with
2411                                         //!<        AdvDataInfo after first occurrence
2412       uint8_t bApplyDuplicateFiltering:1;//!< \brief 0: Do not apply duplicate filtering based on device address for extended
2413                                         //!<        advertiser packets (recommended)<br>
2414                                         //!<        1: Apply duplicate filtering based on device address for extended advertiser
2415                                         //!<        packets with no ADI field
2416       uint8_t bAutoWlIgnore:1;          //!< \brief 0: Do not set ignore bit in white list from radio CPU for extended advertising packets<br>
2417                                         //!<        1: Automatically set ignore bit in white list for extended advertising packets
2418       uint8_t bAutoAdiProcess:1;        //!< \brief 0: Do not use automatic ADI processing<br>
2419                                         //!<        1: Automatically update ADI entry for received packets so that only the same
2420                                         //!<        ADI is accepted for the rest of the chain and the SID/DID combination is
2421                                         //!<        ignored after the entire chain is received.
2422       uint8_t bExclusiveSid:1;          //!< \brief 0: Set <code>adiStatus.state</code> to 0 when command starts so that all
2423                                         //!<        valid SIDs are accepted<br>
2424                                         //!<        1: Do not modify adiStatus.state when command starts<br>
2425       uint8_t bAcceptSyncInfo:1;        //!< \brief 0: Perform normal filtering<br>
2426                                         //!<        1: Accept packets with SyncInfo present in the extended header, or non-connectable
2427                                         //!<        non-scannable adv ext ind with aux ptr, even if they would normally be filtered out
2428    } extFilterConfig;
2429    struct {
2430       uint8_t lastAcceptedSid:4;        //!<        Indication of SID of last successfully received packet that was not ignored
2431       uint8_t state:3;                  //!< \brief 0: No extended packet received, or last extended packet didn't have an ADI;
2432                                         //!<        <code>lastAcceptedSid</code> field is not valid<br>
2433                                         //!<        1: A message with ADI has been received, but no chain is under reception;
2434                                         //!<        ADI filtering to be performed normally<br>
2435                                         //!<        2: A message with SID as given in <code>lastAcceptedSid</code> has been
2436                                         //!<        received, and chained messages are still pending. Messages without this
2437                                         //!<        SID will be ignored<br>
2438                                         //!<        3: An AUX_SCAN_RSP message has been received after receiving messages with SID
2439                                         //!<        as given in <code>lastAcceptedSid</code>, and chained messages are
2440                                         //!<        pending. Messages with an ADI field will be ignored.<br>
2441                                         //!<        4: A message with no ADI has been received, and chained messages are still
2442                                         //!<        pending. Messages with an ADI field will be ignored.<br>
2443                                         //!<        Others: <i>Reserved</i>
2444    } adiStatus;
2445    uint8_t __dummy0;
2446    uint16_t __dummy1;
2447    uint16_t* pDeviceAddress;            //!< \brief Pointer (with least significant bit set to 0) to device address used for this device.
2448                                         //!<        If least significant bit is 1, the address type given by
2449                                         //!<        <code>scanConfig.deviceAddrType</code> is inverted.
2450    rfc_bleWhiteListEntry_t *pWhiteList; //!<        Pointer to white list
2451    rfc_ble5AdiEntry_t *pAdiList;        //!<        Pointer to advDataInfo list
2452    uint16_t maxWaitTimeForAuxCh;        //!< \brief Maximum wait time for switching to secondary scanning withing the command. If the time
2453                                         //!<        to the start of the event is greater than this, the command will end with BLE_DONE_AUX.
2454                                         //!<        If it is smaller, the radio will automatically switch to the correct channel and PHY.
2455    struct {
2456       uint8_t triggerType:4;            //!<        The type of trigger
2457       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
2458                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
2459       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
2460       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
2461                                         //!<        1: A trigger in the past is triggered as soon as possible
2462    } timeoutTrigger;                    //!<        Trigger that causes the device to stop receiving as soon as allowed
2463    struct {
2464       uint8_t triggerType:4;            //!<        The type of trigger
2465       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
2466                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
2467       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
2468       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
2469                                         //!<        1: A trigger in the past is triggered as soon as possible
2470    } endTrigger;                        //!<        Trigger that causes the device to stop receiving as soon as allowed
2471    ratmr_t timeoutTime;                 //!< \brief Time used together with <code>timeoutTrigger</code> that causes the device to stop
2472                                         //!<        receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT
2473    ratmr_t endTime;                     //!< \brief Time used together with <code>endTrigger</code> that causes the device to stop
2474                                         //!<        receiving as soon as allowed, ending with BLE_DONE_ENDED
2475    ratmr_t rxStartTime;                 //!<        The time needed to start RX in order to receive the packet
2476    uint16_t rxListenTime;               //!<        The time needed to listen in order to receive the packet. 0: No AUX packet
2477    uint8_t channelNo;                   //!<        The channel index used for secondary advertising
2478    uint8_t phyMode;                     //!< \brief PHY to use on secondary channel:<br>
2479                                         //!<        0: 1 Mbps<br>
2480                                         //!<        1: 2 Mbps<br>
2481                                         //!<        2: Coded<br>
2482                                         //!<        Others: <i>Reserved</i>
2483 } __RFC_STRUCT_ATTR;
2484 
2485 //! @}
2486 
2487 //! \addtogroup ble5ScannerPerPar
2488 //! @{
2489 //! Parameter structure for Bluetooth 5 periodic scanner (CMD_BLE5_SCANNER_PER)
2490 
2491 struct __RFC_STRUCT rfc_ble5ScannerPerPar_s {
2492    dataQueue_t* pRxQ;                   //!<        Pointer to receive queue
2493    struct {
2494       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically remove ignored packets from Rx queue
2495       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically remove packets with CRC error from Rx queue
2496       uint8_t bAutoFlushEmpty:1;        //!<        If 1, automatically remove empty packets from Rx queue
2497       uint8_t bIncludeLenByte:1;        //!<        If 1, include the received length byte in the stored packet; otherwise discard it
2498       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
2499       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the Rx queue
2500       uint8_t bAppendStatus:1;          //!<        If 1, append a status word to the packet in the Rx queue
2501       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the Rx queue
2502    } rxConfig;                          //!<        Configuration bits for the receive queue entries
2503    struct {
2504       uint8_t :2;
2505       uint8_t deviceAddrType:1;         //!<        The type of the device address -- public (0) or random (1)
2506       uint8_t :1;
2507       uint8_t bStrictLenFilter:1;       //!< \brief 0: Accept any packet with a valid advertising packet length<br>
2508                                         //!<        1: Discard messages with illegal length for the given packet type
2509    } scanConfig;
2510    uint16_t __dummy0;
2511    uint32_t __dummy1;
2512    uint32_t __dummy2;
2513    uint16_t* pDeviceAddress;            //!< \brief Pointer (with least significant bit set to 0) to device address used for this device.
2514                                         //!<        If least significant bit is 1, the address type given by
2515                                         //!<        <code>scanConfig.deviceAddrType</code> is inverted.
2516    uint32_t accessAddress;              //!<        Access address used on the periodic advertisement
2517    uint8_t crcInit0;                    //!<        CRC initialization value used on the periodic advertisement -- least significant byte
2518    uint8_t crcInit1;                    //!<        CRC initialization value used on the periodic advertisement -- middle byte
2519    uint8_t crcInit2;                    //!<        CRC initialization value used on the periodic advertisement -- most significant byte
2520    uint8_t __dummy3;
2521    uint16_t maxWaitTimeForAuxCh;        //!< \brief Maximum wait time for switching to secondary scanning withing the command. If the time
2522                                         //!<        to the start of the event is greater than this, the command will end with BLE_DONE_AUX.
2523                                         //!<        If it is smaller, the radio will automatically switch to the correct channel and PHY.
2524    struct {
2525       uint8_t triggerType:4;            //!<        The type of trigger
2526       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
2527                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
2528       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
2529       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
2530                                         //!<        1: A trigger in the past is triggered as soon as possible
2531    } timeoutTrigger;                    //!<        Trigger that causes the device to stop receiving as soon as allowed
2532    struct {
2533       uint8_t triggerType:4;            //!<        The type of trigger
2534       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
2535                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
2536       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
2537       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
2538                                         //!<        1: A trigger in the past is triggered as soon as possible
2539    } endTrigger;                        //!<        Trigger that causes the device to stop receiving as soon as allowed
2540    ratmr_t timeoutTime;                 //!< \brief Time used together with <code>timeoutTrigger</code> that causes the device to stop
2541                                         //!<        receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT
2542    ratmr_t endTime;                     //!< \brief Time used together with <code>endTrigger</code> that causes the device to stop
2543                                         //!<        receiving as soon as allowed, ending with BLE_DONE_ENDED
2544    ratmr_t rxStartTime;                 //!<        The time needed to start RX in order to receive the packet
2545    uint16_t rxListenTime;               //!<        The time needed to listen in order to receive the packet. 0: No AUX packet
2546    uint8_t channelNo;                   //!<        The channel index used for secondary advertising
2547    uint8_t phyMode;                     //!< \brief PHY to use on secondary channel:<br>
2548                                         //!<        0: 1 Mbps<br>
2549                                         //!<        1: 2 Mbps<br>
2550                                         //!<        2: Coded<br>
2551                                         //!<        Others: <i>Reserved</i>
2552 } __RFC_STRUCT_ATTR;
2553 
2554 //! @}
2555 
2556 //! \addtogroup ble5InitiatorPar
2557 //! @{
2558 //! Parameter structure for Bluetooth 5 initiator (CMD_BLE5_INITIATOR)
2559 
2560 struct __RFC_STRUCT rfc_ble5InitiatorPar_s {
2561    dataQueue_t* pRxQ;                   //!<        Pointer to receive queue
2562    struct {
2563       uint8_t bAutoFlushIgnored:1;      //!<        If 1, automatically remove ignored packets from Rx queue
2564       uint8_t bAutoFlushCrcErr:1;       //!<        If 1, automatically remove packets with CRC error from Rx queue
2565       uint8_t bAutoFlushEmpty:1;        //!<        If 1, automatically remove empty packets from Rx queue
2566       uint8_t bIncludeLenByte:1;        //!<        If 1, include the received length byte in the stored packet; otherwise discard it
2567       uint8_t bIncludeCrc:1;            //!<        If 1, include the received CRC field in the stored packet; otherwise discard it
2568       uint8_t bAppendRssi:1;            //!<        If 1, append an RSSI byte to the packet in the Rx queue
2569       uint8_t bAppendStatus:1;          //!<        If 1, append a status word to the packet in the Rx queue
2570       uint8_t bAppendTimestamp:1;       //!<        If 1, append a timestamp to the packet in the Rx queue
2571    } rxConfig;                          //!<        Configuration bits for the receive queue entries
2572    struct {
2573       uint8_t bUseWhiteList:1;          //!< \brief Initiator filter policy<br>
2574                                         //!<        0: Use specific peer address<br>
2575                                         //!<        1: Use white list
2576       uint8_t bDynamicWinOffset:1;      //!<        1: Use dynamic WinOffset insertion
2577       uint8_t deviceAddrType:1;         //!<        The type of the device address -- public (0) or random (1)
2578       uint8_t peerAddrType:1;           //!<        The type of the peer address -- public (0) or random (1)
2579       uint8_t bStrictLenFilter:1;       //!< \brief 0: Accept any packet with a valid advertising packet length<br>
2580                                         //!<        1: Discard messages with illegal length for the given packet type
2581       uint8_t chSel:1;                  //!< \brief 0: Do not report support of Channel Selection Algorithm #2 in CONNECT_IND<br>
2582                                         //!<        1: Report support of Channel Selection Algorithm #2 in CONNECT_IND
2583    } initConfig;
2584    uint16_t randomState;                //!<        State for pseudo-random number generation used in backoff procedure
2585    uint16_t backoffCount;               //!<        Parameter <i>backoffCount</i> used in backoff procedure, cf. Bluetooth spec
2586    struct {
2587       uint8_t logUpperLimit:4;          //!<        Binary logarithm of parameter upperLimit used in scanner backoff procedure
2588       uint8_t bLastSucceeded:1;         //!< \brief 1 if the last SCAN_RSP was successfully received and <code>upperLimit</code>
2589                                         //!<        not changed
2590       uint8_t bLastFailed:1;            //!< \brief 1 if reception of the last SCAN_RSP failed and <code>upperLimit</code> was not
2591                                         //!<        changed
2592    } backoffPar;
2593    uint8_t connectReqLen;               //!<        Size of connect request data
2594    uint8_t* pConnectReqData;            //!<        Pointer to buffer containing LLData to go in the CONNECT_IND or AUX_CONNECT_REQ packet
2595    uint16_t* pDeviceAddress;            //!< \brief Pointer (with least significant bit set to 0) to device address used for this device.
2596                                         //!<        If least significant bit is 1, the address type given by
2597                                         //!<        <code>initConfig.deviceAddrType</code> is inverted.
2598    rfc_bleWhiteListEntry_t *pWhiteList; //!< \brief Pointer (with least significant bit set to 0)  to white list or peer address. If least
2599                                         //!<        significant bit is 1, the address type given by <code>initConfig.peerAddrType</code>
2600                                         //!<        is inverted.
2601    ratmr_t connectTime;                 //!< \brief Indication of timer value of the first possible start time of the first connection event.
2602                                         //!<        Set to the calculated value if a connection is made and to the next possible connection
2603                                         //!<        time if not.
2604    uint16_t maxWaitTimeForAuxCh;        //!< \brief Maximum wait time for switching to secondary scanning withing the command. If the time
2605                                         //!<        to the start of the event is greater than this, the command will end with BLE_DONE_AUX.
2606                                         //!<        If it is smaller, the radio will automatically switch to the correct channel and PHY.
2607    struct {
2608       uint8_t triggerType:4;            //!<        The type of trigger
2609       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
2610                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
2611       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
2612       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
2613                                         //!<        1: A trigger in the past is triggered as soon as possible
2614    } timeoutTrigger;                    //!<        Trigger that causes the device to stop receiving as soon as allowed
2615    struct {
2616       uint8_t triggerType:4;            //!<        The type of trigger
2617       uint8_t bEnaCmd:1;                //!< \brief 0: No alternative trigger command<br>
2618                                         //!<        1: CMD_TRIGGER can be used as an alternative trigger
2619       uint8_t triggerNo:2;              //!<        The trigger number of the CMD_TRIGGER command that triggers this action
2620       uint8_t pastTrig:1;               //!< \brief 0: A trigger in the past is never triggered, or for start of commands, give an error<br>
2621                                         //!<        1: A trigger in the past is triggered as soon as possible
2622    } endTrigger;                        //!<        Trigger that causes the device to stop receiving as soon as allowed
2623    ratmr_t timeoutTime;                 //!< \brief Time used together with <code>timeoutTrigger</code> that causes the device to stop
2624                                         //!<        receiving as soon as allowed, ending with BLE_DONE_RXTIMEOUT
2625    ratmr_t endTime;                     //!< \brief Time used together with <code>endTrigger</code> that causes the device to stop
2626                                         //!<        receiving as soon as allowed, ending with BLE_DONE_ENDED
2627    ratmr_t rxStartTime;                 //!<        The time needed to start RX in order to receive the packet
2628    uint16_t rxListenTime;               //!<        The time needed to listen in order to receive the packet. 0: No AUX packet
2629    uint8_t channelNo;                   //!<        The channel index used for secondary advertising
2630    uint8_t phyMode;                     //!< \brief PHY to use on secondary channel:<br>
2631                                         //!<        0: 1 Mbps<br>
2632                                         //!<        1: 2 Mbps<br>
2633                                         //!<        2: Coded<br>
2634                                         //!<        Others: <i>Reserved</i>
2635 } __RFC_STRUCT_ATTR;
2636 
2637 //! @}
2638 
2639 //! \addtogroup bleMasterSlaveOutput
2640 //! @{
2641 //! Output structure for master and slave (CMD_BLE_MASTER/CMD_BLE_SLAVE/CMD_BLE5_MASTER/CMD_BLE5_SLAVE)
2642 
2643 struct __RFC_STRUCT rfc_bleMasterSlaveOutput_s {
2644    uint8_t nTx;                         //!< \brief Total number of packets (including auto-empty and retransmissions) that have been
2645                                         //!<        transmitted
2646    uint8_t nTxAck;                      //!<        Total number of transmitted packets (including auto-empty) that have been ACK'ed
2647    uint8_t nTxCtrl;                     //!<        Number of unique LL control packets from the Tx queue that have been transmitted
2648    uint8_t nTxCtrlAck;                  //!<        Number of LL control packets from the Tx queue that have been finished (ACK'ed)
2649    uint8_t nTxCtrlAckAck;               //!< \brief Number of LL control packets that have been ACK'ed and where an ACK has been sent in
2650                                         //!<        response
2651    uint8_t nTxRetrans;                  //!<        Number of retransmissions that has been done
2652    uint8_t nTxEntryDone;                //!<        Number of packets from the Tx queue that have been finished (ACK'ed)
2653    uint8_t nRxOk;                       //!<        Number of packets that have been received with payload, CRC OK and not ignored
2654    uint8_t nRxCtrl;                     //!<        Number of LL control packets that have been received with CRC OK and not ignored
2655    uint8_t nRxCtrlAck;                  //!< \brief Number of LL control packets that have been received with CRC OK and not ignored, and
2656                                         //!<        then ACK'ed
2657    uint8_t nRxNok;                      //!<        Number of packets that have been received with CRC error
2658    uint8_t nRxIgnored;                  //!< \brief Number of packets that have been received with CRC OK and ignored due to repeated
2659                                         //!<        sequence number
2660    uint8_t nRxEmpty;                    //!<        Number of packets that have been received with CRC OK and no payload
2661    uint8_t nRxBufFull;                  //!<        Number of packets that have been received and discarded due to lack of buffer space
2662    int8_t lastRssi;                     //!<        RSSI of last received packet (signed)
2663    struct {
2664       uint8_t bTimeStampValid:1;        //!<        1 if a valid time stamp has been written to timeStamp; 0 otherwise
2665       uint8_t bLastCrcErr:1;            //!<        1 if the last received packet had CRC error; 0 otherwise
2666       uint8_t bLastIgnored:1;           //!<        1 if the last received packet with CRC OK was ignored; 0 otherwise
2667       uint8_t bLastEmpty:1;             //!<        1 if the last received packet with CRC OK was empty; 0 otherwise
2668       uint8_t bLastCtrl:1;              //!<        1 if the last received packet with CRC OK was an LL control packet; 0 otherwise
2669       uint8_t bLastMd:1;                //!<        1 if the last received packet with CRC OK had MD = 1; 0 otherwise
2670       uint8_t bLastAck:1;               //!< \brief 1 if the last received packet with CRC OK was an ACK of a transmitted packet;
2671                                         //!<        0 otherwise
2672    } pktStatus;                         //!<        Status of received packets
2673    ratmr_t timeStamp;                   //!<        Slave operation: Time stamp of first received packet
2674 } __RFC_STRUCT_ATTR;
2675 
2676 //! @}
2677 
2678 //! \addtogroup bleAdvOutput
2679 //! @{
2680 //! Output structure for advertiser (CMD_BLE_ADV* and CMD_BLE5_ADV*)
2681 
2682 struct __RFC_STRUCT rfc_bleAdvOutput_s {
2683    uint16_t nTxAdvInd;                  //!<        Number of ADV*_IND packets completely transmitted
2684    uint8_t nTxScanRsp;                  //!<        Number of  AUX_SCAN_RSP or SCAN_RSP packets transmitted
2685    uint8_t nRxScanReq;                  //!<        Number of AUX_SCAN_REQ or SCAN_REQ packets received OK and not ignored
2686    uint8_t nRxConnectReq;               //!<        Number of AUX_CONNECT_REQ or CONNECT_IND (CONNECT_REQ) packets received OK and not ignored
2687    uint8_t nTxConnectRsp;               //!<        Number of  AUX_CONNECT_RSP packets transmitted
2688    uint16_t nRxNok;                     //!<        Number of packets received with CRC error
2689    uint16_t nRxIgnored;                 //!<        Number of packets received with CRC OK, but ignored
2690    uint8_t nRxBufFull;                  //!<        Number of packets received that did not fit in Rx queue
2691    int8_t lastRssi;                     //!<        The RSSI of the last received packet (signed)
2692    ratmr_t timeStamp;                   //!<        Time stamp of the last received packet
2693 } __RFC_STRUCT_ATTR;
2694 
2695 //! @}
2696 
2697 //! \addtogroup bleScannerOutput
2698 //! @{
2699 //! Output structure for legacy scanner (CMD_BLE_SCANNER)
2700 
2701 struct __RFC_STRUCT rfc_bleScannerOutput_s {
2702    uint16_t nTxScanReq;                 //!<        Number of transmitted SCAN_REQ packets
2703    uint16_t nBackedOffScanReq;          //!<        Number of SCAN_REQ packets not sent due to backoff procedure
2704    uint16_t nRxAdvOk;                   //!<        Number of ADV*_IND packets received with CRC OK and not ignored
2705    uint16_t nRxAdvIgnored;              //!<        Number of ADV*_IND packets received with CRC OK, but ignored
2706    uint16_t nRxAdvNok;                  //!<        Number of ADV*_IND packets received with CRC error
2707    uint16_t nRxScanRspOk;               //!<        Number of SCAN_RSP packets received with CRC OK and not ignored
2708    uint16_t nRxScanRspIgnored;          //!<        Number of SCAN_RSP packets received with CRC OK, but ignored
2709    uint16_t nRxScanRspNok;              //!<        Number of SCAN_RSP packets received with CRC error
2710    uint8_t nRxAdvBufFull;               //!<        Number of ADV*_IND packets received that did not fit in Rx queue
2711    uint8_t nRxScanRspBufFull;           //!<        Number of SCAN_RSP packets received that did not fit in Rx queue
2712    int8_t lastRssi;                     //!<        The RSSI of the last received packet (signed)
2713    uint8_t __dummy0;
2714    ratmr_t timeStamp;                   //!<        Time stamp of the last successfully received ADV*_IND packet that was not ignored
2715 } __RFC_STRUCT_ATTR;
2716 
2717 //! @}
2718 
2719 //! \addtogroup bleInitiatorOutput
2720 //! @{
2721 //! Output structure for legacy initiator (CMD_BLE_INITIATOR)
2722 
2723 struct __RFC_STRUCT rfc_bleInitiatorOutput_s {
2724    uint8_t nTxConnectReq;               //!<        Number of transmitted CONNECT_IND (CONNECT_REQ) packets
2725    uint8_t nRxAdvOk;                    //!<        Number of ADV*_IND packets received with CRC OK and not ignored
2726    uint16_t nRxAdvIgnored;              //!<        Number of ADV*_IND packets received with CRC OK, but ignored
2727    uint16_t nRxAdvNok;                  //!<        Number of ADV*_IND packets received with CRC error
2728    uint8_t nRxAdvBufFull;               //!<        Number of ADV*_IND packets received that did not fit in Rx queue
2729    int8_t lastRssi;                     //!<        The RSSI of the last received packet (signed)
2730    ratmr_t timeStamp;                   //!<        Time stamp of the received ADV*_IND packet that caused transmission of CONNECT_IND (CONNECT_REQ)
2731 } __RFC_STRUCT_ATTR;
2732 
2733 //! @}
2734 
2735 //! \addtogroup ble5ScanInitOutput
2736 //! @{
2737 //! Output structure for BLE scanner and initiator (CMD_BLE5_SCANNER and CMD_BLE5_INITIATOR)
2738 
2739 struct __RFC_STRUCT rfc_ble5ScanInitOutput_s {
2740    uint16_t nTxReq;                     //!<        Number of transmitted AUX_SCAN_REQ, SCAN_REQ, AUX_CONNECT_REQ, or CONNECT_IND packets
2741    uint16_t nBackedOffReq;              //!<        Number of AUX_SCAN_REQ, SCAN_REQ, or AUX_CONNECT_REQ packets not sent due to backoff procedure
2742    uint16_t nRxAdvOk;                   //!<        Number of ADV*_IND packets received with CRC OK and not ignored
2743    uint16_t nRxAdvIgnored;              //!<        Number of ADV*_IND packets received with CRC OK, but ignored
2744    uint16_t nRxAdvNok;                  //!<        Number of ADV*_IND packets received with CRC error
2745    uint16_t nRxRspOk;                   //!<        Number of AUX_SCAN_RSP, SCAN_RSP, or AUX_CONNECT_RSP packets received with CRC OK and not ignored
2746    uint16_t nRxRspIgnored;              //!<        Number of AUX_SCAN_RSP, SCAN_RSP, or AUX_CONNECT_RSP packets received with CRC OK, but ignored
2747    uint16_t nRxRspNok;                  //!<        Number of AUX_SCAN_RSP, SCAN_RSP, or AUX_CONNECT_RSP packets received with CRC error
2748    uint8_t nRxAdvBufFull;               //!<        Number of ADV*_IND packets received that did not fit in Rx queue
2749    uint8_t nRxRspBufFull;               //!<        Number of AUX_SCAN_RSP, SCAN_RSP, or AUX_CONNECT_RSP packets received that did not fit in Rx queue
2750    int8_t lastRssi;                     //!<        The RSSI of the last received packet (signed)
2751    uint8_t __dummy0;
2752    ratmr_t timeStamp;                   //!<        Time stamp of the last successfully received *ADV*_IND packet that was not ignored
2753 } __RFC_STRUCT_ATTR;
2754 
2755 //! @}
2756 
2757 //! \addtogroup bleGenericRxOutput
2758 //! @{
2759 //! Output structure for generic Rx (CMD_BLE_GENERIC_RX and CMD_BLE5_GENERIC_RX)
2760 
2761 struct __RFC_STRUCT rfc_bleGenericRxOutput_s {
2762    uint16_t nRxOk;                      //!<        Number of packets received with CRC OK
2763    uint16_t nRxNok;                     //!<        Number of packets received with CRC error
2764    uint16_t nRxBufFull;                 //!<        Number of packets that have been received and discarded due to lack of buffer space
2765    int8_t lastRssi;                     //!<        The RSSI of the last received packet (signed)
2766    uint8_t __dummy0;
2767    ratmr_t timeStamp;                   //!<        Time stamp of the last received packet
2768 } __RFC_STRUCT_ATTR;
2769 
2770 //! @}
2771 
2772 //! \addtogroup bleTxTestOutput
2773 //! @{
2774 //! Output structure for Tx test (CMD_BLE_TX_TEST and CMD_BLE5_TX_TEST)
2775 
2776 struct __RFC_STRUCT rfc_bleTxTestOutput_s {
2777    uint16_t nTx;                        //!<        Number of packets transmitted
2778 } __RFC_STRUCT_ATTR;
2779 
2780 //! @}
2781 
2782 //! \addtogroup ble5ExtAdvEntry
2783 //! @{
2784 //! Common Extended Packet Entry Format
2785 
2786 struct __RFC_STRUCT rfc_ble5ExtAdvEntry_s {
2787    struct {
2788       uint8_t length:6;                 //!<        Extended header length
2789       uint8_t advMode:2;                //!< \brief Advertiser mode as defined in BLE:<br>
2790                                         //!<        0: Non-connectable, non-scannable<br>
2791                                         //!<        1: Connectable, non-scannable<br>
2792                                         //!<        2: Non-connectable, scannable<br>
2793                                         //!<        3: <i>Reserved</i>
2794    } extHdrInfo;
2795    uint8_t extHdrFlags;                 //!<        Extended header flags as defined in BLE
2796    struct {
2797       uint8_t bSkipAdvA:1;              //!< \brief 0: AdvA is present in extended payload if configured in
2798                                         //!<        <code>extHdrFlags</code><br>
2799                                         //!<        1: AdvA is inserted automatically from command structure if configured in
2800                                         //!<        <code>extHdrFlags</code> and is omitted from extended header
2801       uint8_t bSkipTargetA:1;           //!< \brief 0: TargetA is present in extended payload if configured in
2802                                         //!<        <code>extHdrFlags</code>. For response messages, the value is replaced
2803                                         //!<        by the received address when sending<br>
2804                                         //!<        1: TargetA is inserted automatically from command structure or received
2805                                         //!<        address if configured in <code>extHdrFlags</code> and is omitted from
2806                                         //!<        extended header. Not supported with CMD_BLE5_ADV_EXT.
2807       uint8_t deviceAddrType:1;         //!< \brief If <code>bSkipAdvA</code> = 0: The type of the device address in extended
2808                                         //!<        header buffer -- public (0) or random (1)
2809       uint8_t targetAddrType:1;         //!< \brief If <code>bSkipAdvA</code> = 0: The type of the target address in extended
2810                                         //!<        header buffer -- public (0) or random (1)
2811    } extHdrConfig;
2812    uint8_t advDataLen;                  //!<        Size of payload buffer
2813    uint8_t* pExtHeader;                 //!< \brief Pointer to buffer containing extended header. If no fields except extended
2814                                         //!<        header flags, automatic advertiser address, or automatic target address are
2815                                         //!<        present, pointer may be NULL.
2816    uint8_t* pAdvData;                   //!< \brief Pointer to buffer containing advData. If <code>advDataLen</code> = 0,
2817                                         //!<        pointer may be NULL.
2818 } __RFC_STRUCT_ATTR;
2819 
2820 //! @}
2821 
2822 //! \addtogroup bleWhiteListEntry
2823 //! @{
2824 //! White list entry structure
2825 
2826 struct __RFC_STRUCT rfc_bleWhiteListEntry_s {
2827    uint8_t size;                        //!<        Number of while list entries. Used in the first entry of the list only
2828    struct {
2829       uint8_t bEnable:1;                //!<        1 if the entry is in use, 0 if the entry is not in use
2830       uint8_t addrType:1;               //!<        The type address in the entry -- public (0) or random (1)
2831       uint8_t bWlIgn:1;                 //!< \brief 1 if the entry is to be ignored by a scanner if the AdvDataInfo
2832                                         //!<        field is not present, 0 otherwise. Used to mask out entries that
2833                                         //!<        have already been scanned and reported.
2834       uint8_t :1;
2835       uint8_t bPrivIgn:1;               //!< \brief 1 if the entry is to be ignored as part of a privacy algorithm,
2836                                         //!<        0 otherwise
2837    } conf;
2838    uint16_t address;                    //!<        Least significant 16 bits of the address contained in the entry
2839    uint32_t addressHi;                  //!<        Most significant 32 bits of the address contained in the entry
2840 } __RFC_STRUCT_ATTR;
2841 
2842 //! @}
2843 
2844 //! \addtogroup ble5AdiEntry
2845 //! @{
2846 //! AdvDataInfo list entry structure
2847 
2848 struct __RFC_STRUCT rfc_ble5AdiEntry_s {
2849    struct {
2850       uint16_t advDataId:12;            //!< \brief If <code>bValid</code> = 1: Last Advertising Data ID (DID) for the
2851                                         //!<        Advertising Set ID (SID) corresponding to the entry number in the array
2852       uint16_t mode:2;                  //!< \brief 0: Entry is invalid (always receive packet with the given SID)<br>
2853                                         //!<        1: Entry is valid (ignore packets with the given SID where DID equals
2854                                         //!<        <code>advDataId</code>)<br>
2855                                         //!<        2: Entry is blocked (always ignore packet with the given SID)<br>
2856                                         //!<        3: <i>Reserved</i>
2857    } advDataInfo;
2858 } __RFC_STRUCT_ATTR;
2859 
2860 //! @}
2861 
2862 //! \addtogroup bleRxStatus
2863 //! @{
2864 //! Receive status byte that may be appended to message in receive buffer for legacy commands
2865 
2866 struct __RFC_STRUCT rfc_bleRxStatus_s {
2867    struct {
2868       uint8_t channel:6;                //!< \brief The channel on which the packet was received, provided channel is in the range
2869                                         //!<        0--39; otherwise 0x3F
2870       uint8_t bIgnore:1;                //!<        1 if the packet is marked as ignored, 0 otherwise
2871       uint8_t bCrcErr:1;                //!<        1 if the packet was received with CRC error, 0 otherwise
2872    } status;
2873 } __RFC_STRUCT_ATTR;
2874 
2875 //! @}
2876 
2877 //! \addtogroup ble5RxStatus
2878 //! @{
2879 //! Receive status field that may be appended to message in receive buffer for Bluetooth 5 commands
2880 
2881 struct __RFC_STRUCT rfc_ble5RxStatus_s {
2882    struct {
2883       uint16_t channel:6;               //!< \brief The channel on which the packet was received, provided channel is in the range
2884                                         //!<        0--39; otherwise 0x3F
2885       uint16_t bIgnore:1;               //!<        1 if the packet is marked as ignored, 0 otherwise
2886       uint16_t bCrcErr:1;               //!<        1 if the packet was received with CRC error, 0 otherwise
2887       uint16_t phyMode:2;               //!< \brief The PHY on which the packet was received<br>
2888                                         //!<        0: 1 Mbps<br>
2889                                         //!<        1: 2 Mbps<br>
2890                                         //!<        2: Coded, S = 8 (125 kbps)<br>
2891                                         //!<        3: Coded, S = 2 (500 kbps)
2892       uint16_t bSyncInfoAutoAccept:1;   //!< \brief 1 if the packet was accepted only due to syncInfo field present in the extHdr,
2893                                         //!<        0 otherwise
2894    } status;
2895 } __RFC_STRUCT_ATTR;
2896 
2897 //! @}
2898 
2899 //! @}
2900 //! @}
2901 #endif
2902