rflib
cc13x4_cc26x4/driverlib/rf_ieee_cmd.h
Go to the documentation of this file.
1 /******************************************************************************
2 * Filename: rf_ieee_cmd.h
3 *
4 * Description: CC13x4/CC26x4 API for IEEE 802.15.4 commands
5 *
6 * Copyright (c) 2015 - 2022, 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 __IEEE_CMD_H
38 #define __IEEE_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 
56 
59 
60 #include <stdint.h>
61 #include "rf_mailbox.h"
62 #include "rf_common_cmd.h"
63 
79 
82 #define CMD_IEEE_RX 0x2801
85  uint16_t commandNo;
86  uint16_t status;
87  rfc_radioOp_t *pNextOp;
90  ratmr_t startTime;
91  struct {
92  uint8_t triggerType:4;
93  uint8_t bEnaCmd:1;
94  uint8_t triggerNo:2;
96  uint8_t pastTrig:1;
97  } startTrigger;
99  struct {
100  uint8_t rule:4;
101  uint8_t nSkip:4;
102  } condition;
103  uint8_t channel;
104  struct {
109  uint8_t bAutoFlushCrc:1;
110  uint8_t bAutoFlushIgn:1;
111  uint8_t bIncludePhyHdr:1;
112  uint8_t bIncludeCrc:1;
113  uint8_t bAppendRssi:1;
114  uint8_t bAppendCorrCrc:1;
115  uint8_t bAppendSrcInd:1;
116  uint8_t bAppendTimestamp:1;
117  } rxConfig;
118  dataQueue_t* pRxQ;
119  rfc_ieeeRxOutput_t *pOutput;
120  struct {
121  uint16_t frameFiltEn:1;
122  uint16_t frameFiltStop:1;
124  uint16_t autoAckEn:1;
126  uint16_t slottedAckEn:1;
128  uint16_t autoPendEn:1;
130  uint16_t defaultPend:1;
132  uint16_t bPendDataReqOnly:1;
133  uint16_t bPanCoord:1;
135  uint16_t maxFrameVersion:2;
137  uint16_t fcfReservedMask:3;
138  uint16_t modifyFtFilter:2;
139  uint16_t bStrictLenFilter:1;
144  } frameFiltOpt;
146  struct {
147  uint8_t bAcceptFt0Beacon:1;
148  uint8_t bAcceptFt1Data:1;
151  uint8_t bAcceptFt2Ack:1;
154  uint8_t bAcceptFt3MacCmd:1;
157  uint8_t bAcceptFt4Reserved:1;
160  uint8_t bAcceptFt5Reserved:1;
163  uint8_t bAcceptFt6Reserved:1;
166  uint8_t bAcceptFt7Reserved:1;
169  } frameTypes;
172  struct {
173  uint8_t ccaEnEnergy:1;
174  uint8_t ccaEnCorr:1;
175  uint8_t ccaEnSync:1;
176  uint8_t ccaCorrOp:1;
177  uint8_t ccaSyncOp:1;
180  uint8_t ccaCorrThr:2;
183  } ccaOpt;
184  int8_t ccaRssiThr;
185  uint8_t dualPanEn;
186  uint8_t numExtEntries;
189  uint8_t numShortEntries;
190  uint32_t* pExtEntryList;
191  uint32_t* pShortEntryList;
192  uint64_t localExtAddr;
193  uint16_t localShortAddr;
194  uint16_t localPanID;
195  uint16_t __dummy0;
196  uint8_t __dummy1;
197  struct {
198  uint8_t triggerType:4;
199  uint8_t bEnaCmd:1;
200  uint8_t triggerNo:2;
202  uint8_t pastTrig:1;
203  } endTrigger;
205  ratmr_t endTime;
206  struct {
208  uint16_t frameFilterDoneEn0:1;
209  uint16_t frameFilterDoneEn1:1;
211  uint16_t autoAckEn0:1;
213  uint16_t autoAckEn1:1;
215  uint16_t autoPendEn0:1;
217  uint16_t autoPendEn1:1;
219  uint16_t bPendDataReqOnly0:1;
221  uint16_t bPendDataReqOnly1:1;
223  uint16_t bPanCoord0:1;
225  uint16_t bPanCoord1:1;
227  uint16_t bAllowEnhAck0:1;
229  uint16_t bAllowEnhAck1:1;
231  } dualPanFiltOpt;
233  uint8_t numExtEntries1;
235  uint32_t* pExtEntryList1;
236  uint32_t* pShortEntryList1;
237  uint64_t localExtAddr1;
238  uint16_t localShortAddr1;
239  uint16_t localPanID1;
241 
243 
246 #define CMD_IEEE_ED_SCAN 0x2802
249  uint16_t commandNo;
250  uint16_t status;
251  rfc_radioOp_t *pNextOp;
254  ratmr_t startTime;
255  struct {
256  uint8_t triggerType:4;
257  uint8_t bEnaCmd:1;
258  uint8_t triggerNo:2;
260  uint8_t pastTrig:1;
261  } startTrigger;
263  struct {
264  uint8_t rule:4;
265  uint8_t nSkip:4;
266  } condition;
267  uint8_t channel;
268  struct {
273  uint8_t ccaEnEnergy:1;
274  uint8_t ccaEnCorr:1;
275  uint8_t ccaEnSync:1;
276  uint8_t ccaCorrOp:1;
277  uint8_t ccaSyncOp:1;
280  uint8_t ccaCorrThr:2;
283  } ccaOpt;
284  int8_t ccaRssiThr;
285  uint8_t __dummy0;
286  int8_t maxRssi;
287  struct {
288  uint8_t triggerType:4;
289  uint8_t bEnaCmd:1;
290  uint8_t triggerNo:2;
292  uint8_t pastTrig:1;
293  } endTrigger;
295  ratmr_t endTime;
298 
300 
303 #define CMD_IEEE_TX 0x2C01
306  uint16_t commandNo;
307  uint16_t status;
308  rfc_radioOp_t *pNextOp;
311  ratmr_t startTime;
312  struct {
313  uint8_t triggerType:4;
314  uint8_t bEnaCmd:1;
315  uint8_t triggerNo:2;
317  uint8_t pastTrig:1;
318  } startTrigger;
320  struct {
321  uint8_t rule:4;
322  uint8_t nSkip:4;
323  } condition;
324  struct {
325  uint8_t bIncludePhyHdr:1;
326  uint8_t bIncludeCrc:1;
328  uint8_t :1;
330  uint8_t payloadLenMsb:5;
331  } txOpt;
333  uint8_t payloadLen;
334  uint8_t* pPayload;
335  ratmr_t timeStamp;
337 
339 
342 #define CMD_IEEE_CSMA 0x2C02
345  uint16_t commandNo;
346  uint16_t status;
347  rfc_radioOp_t *pNextOp;
350  ratmr_t startTime;
351  struct {
352  uint8_t triggerType:4;
353  uint8_t bEnaCmd:1;
354  uint8_t triggerNo:2;
356  uint8_t pastTrig:1;
357  } startTrigger;
359  struct {
360  uint8_t rule:4;
361  uint8_t nSkip:4;
362  } condition;
363  uint16_t randomState;
364  uint8_t macMaxBE;
365  uint8_t macMaxCSMABackoffs;
366  struct {
367  uint8_t initCW:5;
368  uint8_t bSlotted:1;
369  uint8_t rxOffMode:2;
371  } csmaConfig;
376  uint8_t NB;
377  uint8_t BE;
378  uint8_t remainingPeriods;
379  int8_t lastRssi;
380  struct {
381  uint8_t triggerType:4;
382  uint8_t bEnaCmd:1;
383  uint8_t triggerNo:2;
385  uint8_t pastTrig:1;
386  } endTrigger;
388  ratmr_t lastTimeStamp;
389  ratmr_t endTime;
392 
394 
397 #define CMD_IEEE_RX_ACK 0x2C03
400  uint16_t commandNo;
401  uint16_t status;
402  rfc_radioOp_t *pNextOp;
405  ratmr_t startTime;
406  struct {
407  uint8_t triggerType:4;
408  uint8_t bEnaCmd:1;
409  uint8_t triggerNo:2;
411  uint8_t pastTrig:1;
412  } startTrigger;
414  struct {
415  uint8_t rule:4;
416  uint8_t nSkip:4;
417  } condition;
418  uint8_t seqNo;
419  struct {
420  uint8_t triggerType:4;
421  uint8_t bEnaCmd:1;
422  uint8_t triggerNo:2;
424  uint8_t pastTrig:1;
425  } endTrigger;
427  ratmr_t endTime;
430 
432 
435 #define CMD_IEEE_ABORT_BG 0x2C04
438  uint16_t commandNo;
439  uint16_t status;
440  rfc_radioOp_t *pNextOp;
443  ratmr_t startTime;
444  struct {
445  uint8_t triggerType:4;
446  uint8_t bEnaCmd:1;
447  uint8_t triggerNo:2;
449  uint8_t pastTrig:1;
450  } startTrigger;
452  struct {
453  uint8_t rule:4;
454  uint8_t nSkip:4;
455  } condition;
457 
459 
462 #define CMD_IEEE_MOD_CCA 0x2001
465  uint16_t commandNo;
466  struct {
467  uint8_t ccaEnEnergy:1;
468  uint8_t ccaEnCorr:1;
469  uint8_t ccaEnSync:1;
470  uint8_t ccaCorrOp:1;
471  uint8_t ccaSyncOp:1;
474  uint8_t ccaCorrThr:2;
477  } newCcaOpt;
478  int8_t newCcaRssiThr;
480 
482 
485 #define CMD_IEEE_MOD_FILT 0x2002
488  uint16_t commandNo;
489  struct {
490  uint16_t frameFiltEn:1;
491  uint16_t frameFiltStop:1;
493  uint16_t autoAckEn:1;
495  uint16_t slottedAckEn:1;
497  uint16_t autoPendEn:1;
499  uint16_t defaultPend:1;
501  uint16_t bPendDataReqOnly:1;
502  uint16_t bPanCoord:1;
504  uint16_t maxFrameVersion:2;
506  uint16_t fcfReservedMask:3;
507  uint16_t modifyFtFilter:2;
508  uint16_t bStrictLenFilter:1;
513  } newFrameFiltOpt;
515  struct {
516  uint8_t bAcceptFt0Beacon:1;
517  uint8_t bAcceptFt1Data:1;
520  uint8_t bAcceptFt2Ack:1;
523  uint8_t bAcceptFt3MacCmd:1;
526  uint8_t bAcceptFt4Reserved:1;
529  uint8_t bAcceptFt5Reserved:1;
532  uint8_t bAcceptFt6Reserved:1;
535  uint8_t bAcceptFt7Reserved:1;
538  } newFrameTypes;
542 
544 
547 #define CMD_IEEE_MOD_SRC_MATCH 0x2003
550  uint16_t commandNo;
551  struct {
552  uint8_t bEnable:1;
553  uint8_t srcPend:1;
555  uint8_t entryType:1;
556  } options;
558  uint8_t entryNo;
560 
562 
565 #define CMD_IEEE_ABORT_FG 0x2401
568  uint16_t commandNo;
570 
572 
575 #define CMD_IEEE_STOP_FG 0x2402
578  uint16_t commandNo;
580 
582 
585 #define CMD_IEEE_CCA_REQ 0x2403
588  uint16_t commandNo;
589  int8_t currentRssi;
590  int8_t maxRssi;
591  struct {
592  uint8_t ccaState:2;
593  uint8_t ccaEnergy:2;
597  uint8_t ccaCorr:2;
601  uint8_t ccaSync:1;
605  } ccaInfo;
609 
611 
615 
616 struct __RFC_STRUCT rfc_ieeeRxOutput_s {
617  uint8_t nTxAck;
618  uint8_t nRxBeacon;
619  uint8_t nRxData;
620  uint8_t nRxAck;
621  uint8_t nRxMacCmd;
622  uint8_t nRxReserved;
623  uint8_t nRxNok;
624  uint8_t nRxIgnored;
625  uint8_t nRxBufFull;
626  int8_t lastRssi;
627  int8_t maxRssi;
628  uint8_t __dummy0;
629  ratmr_t beaconTimeStamp;
631 
633 
637 
638 struct __RFC_STRUCT rfc_shortAddrEntry_s {
639  uint16_t shortAddr;
640  uint16_t panId;
642 
644 
648 
649 struct __RFC_STRUCT rfc_ieeeRxCorrCrc_s {
650  struct {
651  uint8_t corr:6;
652  uint8_t bIgnore:1;
653  uint8_t bCrcErr:1;
654  } status;
656 
658 
661 #endif
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:614
uint8_t __dummy1
Definition: cc13x4_cc26x4/driverlib/rf_ieee_cmd.h:196
IEEE 802.15.4 Gracefully Stop Foreground Level Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:542
IEEE 802.15.4 Modify Frame Filtering Parameter Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:452
IEEE 802.15.4 CSMA-CA Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:309
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:581
IEEE 802.15.4 Abort Foreground Level Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:532
uint8_t numExtEntries1
Number of extended address entries for PAN 1.
Definition: cc13x4_cc26x4/driverlib/rf_ieee_cmd.h:233
uint8_t dualPanEn
Dual PAN support 0: Single PAN; legacy command structure supported 1: Dual PAN enabled.
Definition: cc13x4_cc26x4/driverlib/rf_ieee_cmd.h:185
uint64_t localExtAddr1
The extended address of the local device on PAN 1.
Definition: cc13x4_cc26x4/driverlib/rf_ieee_cmd.h:237
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:603
IEEE 802.15.4 Abort Background Level Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:402
uint16_t localShortAddr1
The short address of the local device on PAN 1.
Definition: cc13x4_cc26x4/driverlib/rf_ieee_cmd.h:238
IEEE 802.15.4 Enable/Disable Source Matching Entry Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:514
uint32_t * pExtEntryList1
Pointer to list of extended address entries for PAN 1.
Definition: cc13x4_cc26x4/driverlib/rf_ieee_cmd.h:235
uint16_t localPanID1
The PAN ID of the local device on PAN 1.
Definition: cc13x4_cc26x4/driverlib/rf_ieee_cmd.h:239
IEEE 802.15.4 Receive Acknowledgement Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:364
IEEE 802.15.4 Modify CCA Parameter Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:429
IEEE 802.15.4 CCA and RSSI Information Request Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:552
uint32_t ratmr_t
Type definition for RAT.
Definition: cc13x2_cc26x2/driverlib/rf_mailbox.h:57
uint32_t * pShortEntryList1
Pointer to list of short address entries for PAN 1.
Definition: cc13x4_cc26x4/driverlib/rf_ieee_cmd.h:236
IEEE 802.15.4 Transmit Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:270
Type definition for a data queue.
Definition: cc13x2_cc26x2/driverlib/rf_mailbox.h:62
#define __RFC_STRUCT
Definition: cc13x4_cc26x4/driverlib/rf_ieee_cmd.h:41
IEEE 802.15.4 Receive Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:84
Definition: cc13x2_cc26x2/driverlib/rf_common_cmd.h:122
uint8_t numShortEntries1
Number of short address entries for PAN 1.
Definition: cc13x4_cc26x4/driverlib/rf_ieee_cmd.h:234
IEEE 802.15.4 Energy Detect Scan Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:213
#define __RFC_STRUCT_ATTR
Definition: cc13x4_cc26x4/driverlib/rf_ieee_cmd.h:50
uint16_t __dummy0
Definition: cc13x4_cc26x4/driverlib/rf_ieee_cmd.h:195
© Copyright 1995-2022, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale