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 - 2023, 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 defaultPend0:1;
221  uint16_t defaultPend1:1;
223  uint16_t bPendDataReqOnly0:1;
225  uint16_t bPendDataReqOnly1:1;
227  uint16_t bPanCoord0:1;
229  uint16_t bPanCoord1:1;
231  uint16_t bAllowEnhAck0:1;
233  uint16_t bAllowEnhAck1:1;
235  } dualPanFiltOpt;
237  uint8_t numExtEntries1;
239  uint32_t* pExtEntryList1;
240  uint32_t* pShortEntryList1;
241  uint64_t localExtAddr1;
242  uint16_t localShortAddr1;
243  uint16_t localPanID1;
245 
247 
250 #define CMD_IEEE_ED_SCAN 0x2802
253  uint16_t commandNo;
254  uint16_t status;
255  rfc_radioOp_t *pNextOp;
258  ratmr_t startTime;
259  struct {
260  uint8_t triggerType:4;
261  uint8_t bEnaCmd:1;
262  uint8_t triggerNo:2;
264  uint8_t pastTrig:1;
265  } startTrigger;
267  struct {
268  uint8_t rule:4;
269  uint8_t nSkip:4;
270  } condition;
271  uint8_t channel;
272  struct {
277  uint8_t ccaEnEnergy:1;
278  uint8_t ccaEnCorr:1;
279  uint8_t ccaEnSync:1;
280  uint8_t ccaCorrOp:1;
281  uint8_t ccaSyncOp:1;
284  uint8_t ccaCorrThr:2;
287  } ccaOpt;
288  int8_t ccaRssiThr;
289  uint8_t __dummy0;
290  int8_t maxRssi;
291  struct {
292  uint8_t triggerType:4;
293  uint8_t bEnaCmd:1;
294  uint8_t triggerNo:2;
296  uint8_t pastTrig:1;
297  } endTrigger;
299  ratmr_t endTime;
302 
304 
307 #define CMD_IEEE_TX 0x2C01
310  uint16_t commandNo;
311  uint16_t status;
312  rfc_radioOp_t *pNextOp;
315  ratmr_t startTime;
316  struct {
317  uint8_t triggerType:4;
318  uint8_t bEnaCmd:1;
319  uint8_t triggerNo:2;
321  uint8_t pastTrig:1;
322  } startTrigger;
324  struct {
325  uint8_t rule:4;
326  uint8_t nSkip:4;
327  } condition;
328  struct {
329  uint8_t bIncludePhyHdr:1;
330  uint8_t bIncludeCrc:1;
332  uint8_t :1;
334  uint8_t payloadLenMsb:5;
335  } txOpt;
337  uint8_t payloadLen;
338  uint8_t* pPayload;
339  ratmr_t timeStamp;
341 
343 
346 #define CMD_IEEE_CSMA 0x2C02
349  uint16_t commandNo;
350  uint16_t status;
351  rfc_radioOp_t *pNextOp;
354  ratmr_t startTime;
355  struct {
356  uint8_t triggerType:4;
357  uint8_t bEnaCmd:1;
358  uint8_t triggerNo:2;
360  uint8_t pastTrig:1;
361  } startTrigger;
363  struct {
364  uint8_t rule:4;
365  uint8_t nSkip:4;
366  } condition;
367  uint16_t randomState;
368  uint8_t macMaxBE;
369  uint8_t macMaxCSMABackoffs;
370  struct {
371  uint8_t initCW:5;
372  uint8_t bSlotted:1;
373  uint8_t rxOffMode:2;
375  } csmaConfig;
380  uint8_t NB;
381  uint8_t BE;
382  uint8_t remainingPeriods;
383  int8_t lastRssi;
384  struct {
385  uint8_t triggerType:4;
386  uint8_t bEnaCmd:1;
387  uint8_t triggerNo:2;
389  uint8_t pastTrig:1;
390  } endTrigger;
392  ratmr_t lastTimeStamp;
393  ratmr_t endTime;
396 
398 
401 #define CMD_IEEE_RX_ACK 0x2C03
404  uint16_t commandNo;
405  uint16_t status;
406  rfc_radioOp_t *pNextOp;
409  ratmr_t startTime;
410  struct {
411  uint8_t triggerType:4;
412  uint8_t bEnaCmd:1;
413  uint8_t triggerNo:2;
415  uint8_t pastTrig:1;
416  } startTrigger;
418  struct {
419  uint8_t rule:4;
420  uint8_t nSkip:4;
421  } condition;
422  uint8_t seqNo;
423  struct {
424  uint8_t triggerType:4;
425  uint8_t bEnaCmd:1;
426  uint8_t triggerNo:2;
428  uint8_t pastTrig:1;
429  } endTrigger;
431  ratmr_t endTime;
434 
436 
439 #define CMD_IEEE_ABORT_BG 0x2C04
442  uint16_t commandNo;
443  uint16_t status;
444  rfc_radioOp_t *pNextOp;
447  ratmr_t startTime;
448  struct {
449  uint8_t triggerType:4;
450  uint8_t bEnaCmd:1;
451  uint8_t triggerNo:2;
453  uint8_t pastTrig:1;
454  } startTrigger;
456  struct {
457  uint8_t rule:4;
458  uint8_t nSkip:4;
459  } condition;
461 
463 
466 #define CMD_IEEE_MOD_CCA 0x2001
469  uint16_t commandNo;
470  struct {
471  uint8_t ccaEnEnergy:1;
472  uint8_t ccaEnCorr:1;
473  uint8_t ccaEnSync:1;
474  uint8_t ccaCorrOp:1;
475  uint8_t ccaSyncOp:1;
478  uint8_t ccaCorrThr:2;
481  } newCcaOpt;
482  int8_t newCcaRssiThr;
484 
486 
489 #define CMD_IEEE_MOD_FILT 0x2002
492  uint16_t commandNo;
493  struct {
494  uint16_t frameFiltEn:1;
495  uint16_t frameFiltStop:1;
497  uint16_t autoAckEn:1;
499  uint16_t slottedAckEn:1;
501  uint16_t autoPendEn:1;
503  uint16_t defaultPend:1;
505  uint16_t bPendDataReqOnly:1;
506  uint16_t bPanCoord:1;
508  uint16_t maxFrameVersion:2;
510  uint16_t fcfReservedMask:3;
511  uint16_t modifyFtFilter:2;
512  uint16_t bStrictLenFilter:1;
517  } newFrameFiltOpt;
519  struct {
520  uint8_t bAcceptFt0Beacon:1;
521  uint8_t bAcceptFt1Data:1;
524  uint8_t bAcceptFt2Ack:1;
527  uint8_t bAcceptFt3MacCmd:1;
530  uint8_t bAcceptFt4Reserved:1;
533  uint8_t bAcceptFt5Reserved:1;
536  uint8_t bAcceptFt6Reserved:1;
539  uint8_t bAcceptFt7Reserved:1;
542  } newFrameTypes;
546 
548 
551 #define CMD_IEEE_MOD_SRC_MATCH 0x2003
554  uint16_t commandNo;
555  struct {
556  uint8_t bEnable:1;
557  uint8_t srcPend:1;
559  uint8_t entryType:1;
560  } options;
562  uint8_t entryNo;
564 
566 
569 #define CMD_IEEE_ABORT_FG 0x2401
572  uint16_t commandNo;
574 
576 
579 #define CMD_IEEE_STOP_FG 0x2402
582  uint16_t commandNo;
584 
586 
589 #define CMD_IEEE_CCA_REQ 0x2403
592  uint16_t commandNo;
593  int8_t currentRssi;
594  int8_t maxRssi;
595  struct {
596  uint8_t ccaState:2;
597  uint8_t ccaEnergy:2;
601  uint8_t ccaCorr:2;
605  uint8_t ccaSync:1;
609  } ccaInfo;
613 
615 
619 
620 struct __RFC_STRUCT rfc_ieeeRxOutput_s {
621  uint8_t nTxAck;
622  uint8_t nRxBeacon;
623  uint8_t nRxData;
624  uint8_t nRxAck;
625  uint8_t nRxMacCmd;
626  uint8_t nRxReserved;
627  uint8_t nRxNok;
628  uint8_t nRxIgnored;
629  uint8_t nRxBufFull;
630  int8_t lastRssi;
631  int8_t maxRssi;
632  uint8_t __dummy0;
633  ratmr_t beaconTimeStamp;
635 
637 
641 
642 struct __RFC_STRUCT rfc_shortAddrEntry_s {
643  uint16_t shortAddr;
644  uint16_t panId;
646 
648 
652 
653 struct __RFC_STRUCT rfc_ieeeRxCorrCrc_s {
654  struct {
655  uint8_t corr:6;
656  uint8_t bIgnore:1;
657  uint8_t bCrcErr:1;
658  } status;
660 
662 
665 #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:237
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:241
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:242
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:239
uint16_t localPanID1
The PAN ID of the local device on PAN 1.
Definition: cc13x4_cc26x4/driverlib/rf_ieee_cmd.h:243
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:240
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:238
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-2024, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale