|
| 1 | +/*! ********************************************************************************* |
| 2 | +* \defgroup MacFunctionality Mac Functionality Definitions |
| 3 | +* @{ |
| 4 | +********************************************************************************** */ |
| 5 | +/*! ********************************************************************************* |
| 6 | +* Copyright (c) 2015, Freescale Semiconductor, Inc. |
| 7 | +* Copyright 2016-2025 NXP |
| 8 | +* All rights reserved. |
| 9 | +* |
| 10 | +* \file |
| 11 | +* |
| 12 | +* SPDX-License-Identifier: BSD-3-Clause |
| 13 | +********************************************************************************** */ |
| 14 | + |
| 15 | +#ifndef _MAC_FUNCTIONALITY_DEFINES_H_ |
| 16 | +#define _MAC_FUNCTIONALITY_DEFINES_H_ |
| 17 | + |
| 18 | +/************************************************************************************ |
| 19 | +************************************************************************************* |
| 20 | +* Include |
| 21 | +************************************************************************************* |
| 22 | +************************************************************************************/ |
| 23 | + |
| 24 | +/************************************************************************************ |
| 25 | +************************************************************************************* |
| 26 | +* Public macros |
| 27 | +************************************************************************************* |
| 28 | +************************************************************************************/ |
| 29 | + |
| 30 | +/*! 2.4 GHz MAC 2006 for CM4 */ |
| 31 | +#define gMacFeatureSet_06M4_d 0 |
| 32 | +/*! 2.4 GHz MAC 2011 for CM4 */ |
| 33 | +#define gMacFeatureSet_11M4_d 1 |
| 34 | +/*! 2.4 GHz ZigBee PRO MAC for CM4 */ |
| 35 | +#define gMacFeatureSet_ZPM4_d 2 |
| 36 | +/*! 2.4 GHz Beacon Enabled MAC 2006 for CM4 */ |
| 37 | +#define gMacFeatureSet_06BEM4_d 3 |
| 38 | +/*! 2.4 GHz Beacon Enabled MAC 2006 with GTS for CM4 */ |
| 39 | +#define gMacFeatureSet_06BEGTSM4_d 4 |
| 40 | + |
| 41 | +/*! Sub-GHZ MAC 2006 for CM0 */ |
| 42 | +#define gMacFeatureSet_06gM0_d 5 |
| 43 | +/*! Sub-GHZ MAC 2011 for CM0 */ |
| 44 | +#define gMacFeatureSet_11gM0_d 6 |
| 45 | +/*! Sub-GHZ MAC 2006 with CLS and RIT for CM0 */ |
| 46 | +#define gMacFeatureSet_06eLEgM0_d 7 |
| 47 | +/*! Sub-GHZ MAC 2011 with CLS and RIT for CM0 */ |
| 48 | +#define gMacFeatureSet_11eLEgM0_d 8 |
| 49 | +/*! Sub-GHZ MAC 2006 with TSCH for CM0 */ |
| 50 | +#define gMacFeatureSet_06eTSCHgM0_d 9 |
| 51 | +/*! Sub-GHZ MAC 2011 with TSCH for CM0 */ |
| 52 | +#define gMacFeatureSet_11eTSCHgM0_d 10 |
| 53 | + |
| 54 | +/*! 2.4 GHz MAC 2006 for CM0 */ |
| 55 | +#define gMacFeatureSet_06M0_d 11 |
| 56 | +/*! 2.4 GHz MAC 2011 for CM0 */ |
| 57 | +#define gMacFeatureSet_11M0_d 12 |
| 58 | +/*! 2.4 GHz ZigBee PRO MAC for CM0 */ |
| 59 | +#define gMacFeatureSet_ZPM0_d 13 |
| 60 | +/*! 2.4 GHz Beacon Enabled MAC 2006 for CM0 */ |
| 61 | +#define gMacFeatureSet_06BEM0_d 14 |
| 62 | +/*! 2.4 GHz Beacon Enabled MAC 2006 with GTS for CM0 */ |
| 63 | +#define gMacFeatureSet_06BEGTSM0_d 15 |
| 64 | + |
| 65 | +/*! 2.4 GHz Thread MAC for CM4 */ |
| 66 | +#define gMacFeatureSet_THR_M4_d 16 |
| 67 | +/*! 2.4 GHz Thread MAC for CM0 */ |
| 68 | +#define gMacFeatureSet_THR_M0_d 17 |
| 69 | +/*! 2.4 GHz RFD Thread MAC for CM4 */ |
| 70 | +#define gMacFeatureSet_THRRFD_M4_d 18 |
| 71 | +/*! 2.4 GHz RFD Thread MAC for CM0 */ |
| 72 | +#define gMacFeatureSet_THRRFD_M0_d 19 |
| 73 | + |
| 74 | +/*! 2.4 GHz RFD MAC 2006 for CM4 */ |
| 75 | +#define gMacFeatureSet_06RFD_M4_d 20 |
| 76 | +/*! 2.4 GHz RFD MAC 2006 for CM0 */ |
| 77 | +#define gMacFeatureSet_06RFD_M0_d 21 |
| 78 | + |
| 79 | +#define gMacFeatureSet_THR_CSL_d 22 |
| 80 | + |
| 81 | + |
| 82 | +/*! ********************************************************************************* |
| 83 | + MAC feature | Description |
| 84 | + -------------|------------- |
| 85 | + 06 | 2006 security |
| 86 | + 11 | 2011 security |
| 87 | + g | Used with g PHY |
| 88 | + e | features followed by listing (LE/TSCH/DSME) |
| 89 | + LE | 4e low energy features (CSL, RIT) |
| 90 | + TSCH | 4e Time Slotted Channel Hopping |
| 91 | + DSME | 4e Deterministic and Synchronous Multi-channel Extension |
| 92 | + BE | Beacon order !=15 (for code size reduction purposes) |
| 93 | + GTS | GTS support (for code size reduction purposes) |
| 94 | + ZP | ZigBee PRO customizations |
| 95 | + M0 | Cortex M0+ |
| 96 | + M4 | Cortex M4 |
| 97 | + |
| 98 | +********************************************************************************** */ |
| 99 | +#ifndef gMacFeatureSet_d |
| 100 | +#define gMacFeatureSet_d gMacFeatureSet_06M4_d |
| 101 | +#endif |
| 102 | + |
| 103 | +/*! \cond DOXY_SKIP_TAG */ |
| 104 | +#if (gMacFeatureSet_d == gMacFeatureSet_06M4_d) || (gMacFeatureSet_d == gMacFeatureSet_06M0_d) |
| 105 | + #define gMacInternalDataSize_c 320 /* [bytes] */ |
| 106 | + |
| 107 | +#elif (gMacFeatureSet_d == gMacFeatureSet_11M4_d) || (gMacFeatureSet_d == gMacFeatureSet_11M0_d) |
| 108 | + #define gMacInternalDataSize_c 336 /* [bytes] */ |
| 109 | + #define gMAC2011_d (1) |
| 110 | + |
| 111 | +#elif (gMacFeatureSet_d == gMacFeatureSet_06RFD_M4_d) || (gMacFeatureSet_d == gMacFeatureSet_06RFD_M0_d) |
| 112 | + #define gMacInternalDataSize_c 360 /* [bytes] */ |
| 113 | + #define gMacUseAssociation_d (1) |
| 114 | + #define gMacUseOrphanScan_d (0) |
| 115 | + #define gMacUsePromiscuous_d (0) |
| 116 | + #define gMacUseMlmeStart_d (0) |
| 117 | + #define gMacPanIdConflictDetect_d (0) |
| 118 | + #define gMacCoordinatorCapability_d (0) |
| 119 | + |
| 120 | +#elif (gMacFeatureSet_d == gMacFeatureSet_ZPM4_d) || (gMacFeatureSet_d == gMacFeatureSet_ZPM0_d) |
| 121 | + #define gMacInternalDataSize_c 376 /* [bytes] */ |
| 122 | + #define gMacUsePackedStructs_d (1) |
| 123 | + |
| 124 | +#elif (gMacFeatureSet_d == gMacFeatureSet_THR_M4_d) || (gMacFeatureSet_d == gMacFeatureSet_THR_M0_d) |
| 125 | + #define gMacInternalDataSize_c 344 /* [bytes] */ |
| 126 | + #define gMacUseAssociation_d (0) |
| 127 | + #define gMacUseOrphanScan_d (0) |
| 128 | + #define gMacUsePromiscuous_d (0) |
| 129 | + #define gMacPanIdConflictDetect_d (0) |
| 130 | + |
| 131 | +#elif (gMacFeatureSet_d == gMacFeatureSet_THR_CSL_d) |
| 132 | + #define gMacInternalDataSize_c 400 /* [bytes] */ |
| 133 | + #define gMacUseAssociation_d (0) |
| 134 | + #define gMacUseOrphanScan_d (0) |
| 135 | + #define gMacUsePromiscuous_d (0) |
| 136 | + #define gMacUseRxEnableRequest_d (1) |
| 137 | + #define gMacPanIdConflictDetect_d (0) |
| 138 | + |
| 139 | +#elif (gMacFeatureSet_d == gMacFeatureSet_THRRFD_M4_d) || (gMacFeatureSet_d == gMacFeatureSet_THRRFD_M0_d) |
| 140 | + #define gMacInternalDataSize_c 264 /* [bytes] */ |
| 141 | + #define gMacUseAssociation_d (0) |
| 142 | + #define gMacUseOrphanScan_d (0) |
| 143 | + #define gMacUsePromiscuous_d (0) |
| 144 | + #define gMacUseMlmeStart_d (0) |
| 145 | + #define gMacPanIdConflictDetect_d (0) |
| 146 | + #define gMacCoordinatorCapability_d (0) |
| 147 | + |
| 148 | +#elif (gMacFeatureSet_d == gMacFeatureSet_06BEM4_d) || (gMacFeatureSet_d == gMacFeatureSet_06BEM0_d) |
| 149 | + #define gMacInternalDataSize_c 560 /* [bytes] */ |
| 150 | + |
| 151 | +#elif (gMacFeatureSet_d == gMacFeatureSet_06BEGTSM4_d) || (gMacFeatureSet_d == gMacFeatureSet_06BEGTSM0_d) |
| 152 | + #define gMacInternalDataSize_c 600 /* [bytes] */ |
| 153 | + |
| 154 | +#elif (gMacFeatureSet_d == gMacFeatureSet_06gM0_d) |
| 155 | + #define gMacInternalDataSize_c 464 /* [bytes] */ |
| 156 | + |
| 157 | +#elif (gMacFeatureSet_d == gMacFeatureSet_06eLEgM0_d) |
| 158 | + #define gMacInternalDataSize_c 568 /* [bytes] */ |
| 159 | + |
| 160 | +#elif (gMacFeatureSet_d == gMacFeatureSet_06eTSCHgM0_d) |
| 161 | + #define gMacInternalDataSize_c 552 /* [bytes] */ |
| 162 | + |
| 163 | +#elif (gMacFeatureSet_d == gMacFeatureSet_11gM0_d) |
| 164 | + #define gMacInternalDataSize_c 448 /* [bytes] */ |
| 165 | + #define gMAC2011_d (1) |
| 166 | + |
| 167 | +#elif (gMacFeatureSet_d == gMacFeatureSet_11eLEgM0_d) |
| 168 | + #define gMacInternalDataSize_c 560 /* [bytes] */ |
| 169 | + #define gMAC2011_d (1) |
| 170 | + |
| 171 | +#elif (gMacFeatureSet_d == gMacFeatureSet_11eTSCHgM0_d) |
| 172 | + #define gMacInternalDataSize_c 544 /* [bytes] */ |
| 173 | + #define gMAC2011_d (1) |
| 174 | + |
| 175 | +#else |
| 176 | + #error Unsupported MAC Feature Set |
| 177 | + |
| 178 | +#endif |
| 179 | +/*! \endcond */ |
| 180 | + |
| 181 | +/*! PACK all data structures from MAC interface */ |
| 182 | +#ifndef gMacUsePackedStructs_d |
| 183 | +#define gMacUsePackedStructs_d (0) |
| 184 | +#endif |
| 185 | + |
| 186 | +/*! MAC Association/Disassociation support */ |
| 187 | +#ifndef gMacUseAssociation_d |
| 188 | +#define gMacUseAssociation_d (1) |
| 189 | +#endif |
| 190 | + |
| 191 | +/*! MAC Orphan Scan support */ |
| 192 | +#ifndef gMacUseOrphanScan_d |
| 193 | +#define gMacUseOrphanScan_d (1) |
| 194 | +#endif |
| 195 | + |
| 196 | +/*! MAC Rx Enable support */ |
| 197 | +#ifndef gMacUseRxEnableRequest_d |
| 198 | +#define gMacUseRxEnableRequest_d (1) |
| 199 | +#endif |
| 200 | + |
| 201 | +/*! Promiscuous mode support */ |
| 202 | +#ifndef gMacUsePromiscuous_d |
| 203 | +#define gMacUsePromiscuous_d (1) |
| 204 | +#endif |
| 205 | + |
| 206 | +/*! PAN creation support */ |
| 207 | +#ifndef gMacUseMlmeStart_d |
| 208 | +#define gMacUseMlmeStart_d (1) |
| 209 | +#endif |
| 210 | + |
| 211 | +/*! PAN Id conflict detection support */ |
| 212 | +#ifndef gMacPanIdConflictDetect_d |
| 213 | +#define gMacPanIdConflictDetect_d (1) |
| 214 | +#endif |
| 215 | + |
| 216 | +/*! MAC Coordinator functionality */ |
| 217 | +#ifndef gMacCoordinatorCapability_d |
| 218 | +#define gMacCoordinatorCapability_d (1) |
| 219 | +#endif |
| 220 | + |
| 221 | +#endif /* _MAC_FUNCTIONALITY_DEFINES_H_ */ |
| 222 | + |
| 223 | +/*! ********************************************************************************* |
| 224 | +* @} |
| 225 | +********************************************************************************** */ |
0 commit comments