rflib
cc13x1_cc26x1/driverlib/rf_ieee_cmd.h
Go to the documentation of this file.
1 /******************************************************************************
2 * Filename: rf_ieee_cmd.h
3 *
4 * Description: CC13x2/CC26x2 API for IEEE 802.15.4 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 __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 __dummy0;
186  uint8_t numExtEntries;
187  uint8_t numShortEntries;
188  uint32_t* pExtEntryList;
189  uint32_t* pShortEntryList;
190  uint64_t localExtAddr;
191  uint16_t localShortAddr;
192  uint16_t localPanID;
193  uint16_t __dummy1;
194  uint8_t __dummy2;
195  struct {
196  uint8_t triggerType:4;
197  uint8_t bEnaCmd:1;
198  uint8_t triggerNo:2;
200  uint8_t pastTrig:1;
201  } endTrigger;
203  ratmr_t endTime;
206 
208 
211 #define CMD_IEEE_ED_SCAN 0x2802
214  uint16_t commandNo;
215  uint16_t status;
216  rfc_radioOp_t *pNextOp;
219  ratmr_t startTime;
220  struct {
221  uint8_t triggerType:4;
222  uint8_t bEnaCmd:1;
223  uint8_t triggerNo:2;
225  uint8_t pastTrig:1;
226  } startTrigger;
228  struct {
229  uint8_t rule:4;
230  uint8_t nSkip:4;
231  } condition;
232  uint8_t channel;
233  struct {
238  uint8_t ccaEnEnergy:1;
239  uint8_t ccaEnCorr:1;
240  uint8_t ccaEnSync:1;
241  uint8_t ccaCorrOp:1;
242  uint8_t ccaSyncOp:1;
245  uint8_t ccaCorrThr:2;
248  } ccaOpt;
249  int8_t ccaRssiThr;
250  uint8_t __dummy0;
251  int8_t maxRssi;
252  struct {
253  uint8_t triggerType:4;
254  uint8_t bEnaCmd:1;
255  uint8_t triggerNo:2;
257  uint8_t pastTrig:1;
258  } endTrigger;
260  ratmr_t endTime;
263 
265 
268 #define CMD_IEEE_TX 0x2C01
271  uint16_t commandNo;
272  uint16_t status;
273  rfc_radioOp_t *pNextOp;
276  ratmr_t startTime;
277  struct {
278  uint8_t triggerType:4;
279  uint8_t bEnaCmd:1;
280  uint8_t triggerNo:2;
282  uint8_t pastTrig:1;
283  } startTrigger;
285  struct {
286  uint8_t rule:4;
287  uint8_t nSkip:4;
288  } condition;
289  struct {
290  uint8_t bIncludePhyHdr:1;
291  uint8_t bIncludeCrc:1;
293  uint8_t :1;
295  uint8_t payloadLenMsb:5;
296  } txOpt;
298  uint8_t payloadLen;
299  uint8_t* pPayload;
300  ratmr_t timeStamp;
302 
304 
307 #define CMD_IEEE_CSMA 0x2C02
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  uint16_t randomState;
329  uint8_t macMaxBE;
330  uint8_t macMaxCSMABackoffs;
331  struct {
332  uint8_t initCW:5;
333  uint8_t bSlotted:1;
334  uint8_t rxOffMode:2;
336  } csmaConfig;
341  uint8_t NB;
342  uint8_t BE;
343  uint8_t remainingPeriods;
344  int8_t lastRssi;
345  struct {
346  uint8_t triggerType:4;
347  uint8_t bEnaCmd:1;
348  uint8_t triggerNo:2;
350  uint8_t pastTrig:1;
351  } endTrigger;
353  ratmr_t lastTimeStamp;
354  ratmr_t endTime;
357 
359 
362 #define CMD_IEEE_RX_ACK 0x2C03
365  uint16_t commandNo;
366  uint16_t status;
367  rfc_radioOp_t *pNextOp;
370  ratmr_t startTime;
371  struct {
372  uint8_t triggerType:4;
373  uint8_t bEnaCmd:1;
374  uint8_t triggerNo:2;
376  uint8_t pastTrig:1;
377  } startTrigger;
379  struct {
380  uint8_t rule:4;
381  uint8_t nSkip:4;
382  } condition;
383  uint8_t seqNo;
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 endTime;
395 
397 
400 #define CMD_IEEE_ABORT_BG 0x2C04
403  uint16_t commandNo;
404  uint16_t status;
405  rfc_radioOp_t *pNextOp;
408  ratmr_t startTime;
409  struct {
410  uint8_t triggerType:4;
411  uint8_t bEnaCmd:1;
412  uint8_t triggerNo:2;
414  uint8_t pastTrig:1;
415  } startTrigger;
417  struct {
418  uint8_t rule:4;
419  uint8_t nSkip:4;
420  } condition;
422 
424 
427 #define CMD_IEEE_MOD_CCA 0x2001
430  uint16_t commandNo;
431  struct {
432  uint8_t ccaEnEnergy:1;
433  uint8_t ccaEnCorr:1;
434  uint8_t ccaEnSync:1;
435  uint8_t ccaCorrOp:1;
436  uint8_t ccaSyncOp:1;
439  uint8_t ccaCorrThr:2;
442  } newCcaOpt;
443  int8_t newCcaRssiThr;
445 
447 
450 #define CMD_IEEE_MOD_FILT 0x2002
453  uint16_t commandNo;
454  struct {
455  uint16_t frameFiltEn:1;
456  uint16_t frameFiltStop:1;
458  uint16_t autoAckEn:1;
460  uint16_t slottedAckEn:1;
462  uint16_t autoPendEn:1;
464  uint16_t defaultPend:1;
466  uint16_t bPendDataReqOnly:1;
467  uint16_t bPanCoord:1;
469  uint16_t maxFrameVersion:2;
471  uint16_t fcfReservedMask:3;
472  uint16_t modifyFtFilter:2;
473  uint16_t bStrictLenFilter:1;
478  } newFrameFiltOpt;
480  struct {
481  uint8_t bAcceptFt0Beacon:1;
482  uint8_t bAcceptFt1Data:1;
485  uint8_t bAcceptFt2Ack:1;
488  uint8_t bAcceptFt3MacCmd:1;
491  uint8_t bAcceptFt4Reserved:1;
494  uint8_t bAcceptFt5Reserved:1;
497  uint8_t bAcceptFt6Reserved:1;
500  uint8_t bAcceptFt7Reserved:1;
503  } newFrameTypes;
507 
509 
512 #define CMD_IEEE_MOD_SRC_MATCH 0x2003
515  uint16_t commandNo;
516  struct {
517  uint8_t bEnable:1;
518  uint8_t srcPend:1;
520  uint8_t entryType:1;
521  } options;
523  uint8_t entryNo;
525 
527 
530 #define CMD_IEEE_ABORT_FG 0x2401
533  uint16_t commandNo;
535 
537 
540 #define CMD_IEEE_STOP_FG 0x2402
543  uint16_t commandNo;
545 
547 
550 #define CMD_IEEE_CCA_REQ 0x2403
553  uint16_t commandNo;
554  int8_t currentRssi;
555  int8_t maxRssi;
556  struct {
557  uint8_t ccaState:2;
558  uint8_t ccaEnergy:2;
562  uint8_t ccaCorr:2;
566  uint8_t ccaSync:1;
570  } ccaInfo;
574 
576 
580 
581 struct __RFC_STRUCT rfc_ieeeRxOutput_s {
582  uint8_t nTxAck;
583  uint8_t nRxBeacon;
584  uint8_t nRxData;
585  uint8_t nRxAck;
586  uint8_t nRxMacCmd;
587  uint8_t nRxReserved;
588  uint8_t nRxNok;
589  uint8_t nRxIgnored;
590  uint8_t nRxBufFull;
591  int8_t lastRssi;
592  int8_t maxRssi;
593  uint8_t __dummy0;
594  ratmr_t beaconTimeStamp;
596 
598 
602 
603 struct __RFC_STRUCT rfc_shortAddrEntry_s {
604  uint16_t shortAddr;
605  uint16_t panId;
607 
609 
613 
614 struct __RFC_STRUCT rfc_ieeeRxCorrCrc_s {
615  struct {
616  uint8_t corr:6;
617  uint8_t bIgnore:1;
618  uint8_t bCrcErr:1;
619  } status;
621 
623 
626 #endif
#define __RFC_STRUCT_ATTR
Definition: cc13x1_cc26x1/driverlib/rf_ieee_cmd.h:50
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:614
IEEE 802.15.4 Gracefully Stop Foreground Level Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:542
#define __RFC_STRUCT
Definition: cc13x1_cc26x1/driverlib/rf_ieee_cmd.h:41
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
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
IEEE 802.15.4 Enable/Disable Source Matching Entry Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:514
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
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
IEEE 802.15.4 Receive Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:84
Definition: cc13x2_cc26x2/driverlib/rf_common_cmd.h:122
IEEE 802.15.4 Energy Detect Scan Command.
Definition: cc13x2_cc26x2/driverlib/rf_ieee_cmd.h:213
© Copyright 1995-2022, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale