1 /***************************************************************************//** 2 * @file 3 * @brief Auxiliary header for the RAIL library. Includes consistent definitions 4 * of features available across different chips. 5 ******************************************************************************* 6 * # License 7 * <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b> 8 ******************************************************************************* 9 * 10 * SPDX-License-Identifier: Zlib 11 * 12 * The licensor of this software is Silicon Laboratories Inc. 13 * 14 * This software is provided 'as-is', without any express or implied 15 * warranty. In no event will the authors be held liable for any damages 16 * arising from the use of this software. 17 * 18 * Permission is granted to anyone to use this software for any purpose, 19 * including commercial applications, and to alter it and redistribute it 20 * freely, subject to the following restrictions: 21 * 22 * 1. The origin of this software must not be misrepresented; you must not 23 * claim that you wrote the original software. If you use this software 24 * in a product, an acknowledgment in the product documentation would be 25 * appreciated but is not required. 26 * 2. Altered source versions must be plainly marked as such, and must not be 27 * misrepresented as being the original software. 28 * 3. This notice may not be removed or altered from any source distribution. 29 * 30 ******************************************************************************/ 31 32 #ifndef __RAIL_FEATURES_H__ 33 #define __RAIL_FEATURES_H__ 34 35 #include "em_device.h" 36 37 #ifdef __cplusplus 38 extern "C" { 39 #endif 40 41 /** 42 * @addtogroup RAIL_API RAIL API 43 * @{ 44 */ 45 46 /****************************************************************************** 47 * RAIL Features 48 *****************************************************************************/ 49 /** 50 * @addtogroup Features 51 * @brief Overview of support for various features across hardware platforms. 52 * These defines can be used at compile time to determine which 53 * features are available on your platform. However, keep in mind that 54 * these defines hold true for chip families. Your specific part 55 * may have further restrictions (band limitations, power amplifier 56 * restrictions, and so on) on top of those listed below, for which 57 * runtime RAIL_Supports*() APIs can be used to check availability 58 * on a particular chip (after \ref RAIL_Init() has been called). 59 * In general, an attempt to call an API that is not supported on your 60 * chip family as listed below will result in a 61 * \ref RAIL_STATUS_INVALID_CALL. 62 * @{ 63 */ 64 65 /// Boolean to indicate whether the selected chip supports both SubGHz and 2.4 GHz bands. 66 /// See also runtime refinement \ref RAIL_SupportsDualBand(). 67 #if ((_SILICON_LABS_EFR32_RADIO_TYPE == _SILICON_LABS_EFR32_RADIO_DUALBAND) \ 68 || ((FEAT_RF_2G4 == 1) && (FEAT_RF_SUBG == 1))) 69 #define RAIL_SUPPORTS_DUAL_BAND 1 70 #else 71 #define RAIL_SUPPORTS_DUAL_BAND 0 72 #endif 73 /// Backwards-compatible synonym of \ref RAIL_SUPPORTS_DUAL_BAND. 74 #define RAIL_FEAT_DUAL_BAND_RADIO RAIL_SUPPORTS_DUAL_BAND 75 76 /// Boolean to indicate whether the selected chip supports the 2.4 GHz band. 77 /// See also runtime refinement \ref RAIL_Supports2p4GHzBand(). 78 #if (((_SILICON_LABS_EFR32_RADIO_TYPE == _SILICON_LABS_EFR32_RADIO_DUALBAND) \ 79 || (_SILICON_LABS_EFR32_RADIO_TYPE == _SILICON_LABS_EFR32_RADIO_2G4HZ)) \ 80 || (FEAT_RF_2G4 == 1)) 81 #define RAIL_SUPPORTS_2P4GHZ_BAND 1 82 #else 83 #define RAIL_SUPPORTS_2P4GHZ_BAND 0 84 #endif 85 /// Backwards-compatible synonym of \ref RAIL_SUPPORTS_2P4GHZ_BAND. 86 #define RAIL_FEAT_2G4_RADIO RAIL_SUPPORTS_2P4GHZ_BAND 87 88 /// Boolean to indicate whether the selected chip supports SubGHz bands. 89 /// See also runtime refinement \ref RAIL_SupportsSubGHzBand(). 90 #if (((_SILICON_LABS_EFR32_RADIO_TYPE == _SILICON_LABS_EFR32_RADIO_DUALBAND) \ 91 || (_SILICON_LABS_EFR32_RADIO_TYPE == _SILICON_LABS_EFR32_RADIO_SUBGHZ)) \ 92 || (FEAT_RF_SUBG == 1)) 93 #define RAIL_SUPPORTS_SUBGHZ_BAND 1 94 #else 95 #define RAIL_SUPPORTS_SUBGHZ_BAND 0 96 #endif 97 /// Backwards-compatible synonym of \ref RAIL_SUPPORTS_SUBGHZ_BAND. 98 #define RAIL_FEAT_SUBGIG_RADIO RAIL_SUPPORTS_SUBGHZ_BAND 99 100 /// Boolean to indicate whether the selected chip supports OFDM PA. 101 /// See also runtime refinement \ref RAIL_SupportsOFDMPA(). 102 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 5) 103 #define RAIL_SUPPORTS_OFDM_PA 1 104 #else 105 #define RAIL_SUPPORTS_OFDM_PA 0 106 #endif 107 108 /// Boolean to indicate whether the selected chip supports 109 /// bit masked address filtering. 110 /// See also runtime refinement \ref RAIL_SupportsAddrFilterAddressBitMask(). 111 #if (_SILICON_LABS_32B_SERIES_2_CONFIG >= 2) 112 #define RAIL_SUPPORTS_ADDR_FILTER_ADDRESS_BIT_MASK 1 113 #else 114 #define RAIL_SUPPORTS_ADDR_FILTER_ADDRESS_BIT_MASK 0 115 #endif 116 117 /// Boolean to indicate whether the selected chip supports 118 /// address filter mask information for incoming packets in 119 /// \ref RAIL_RxPacketInfo_t::filterMask and 120 /// \ref RAIL_IEEE802154_Address_t::filterMask. 121 /// See also runtime refinement \ref RAIL_SupportsAddrFilterMask(). 122 #if (_SILICON_LABS_32B_SERIES_1_CONFIG != 1) 123 #define RAIL_SUPPORTS_ADDR_FILTER_MASK 1 124 #else 125 #define RAIL_SUPPORTS_ADDR_FILTER_MASK 0 126 #endif 127 128 /// Boolean to indicate whether the selected chip supports 129 /// alternate power settings for the Power Amplifier. 130 /// See also runtime refinement \ref RAIL_SupportsAlternateTxPower(). 131 #if (_SILICON_LABS_32B_SERIES_1_CONFIG > 1) \ 132 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 3) \ 133 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 8) 134 #define RAIL_SUPPORTS_ALTERNATE_TX_POWER 1 135 #else 136 #define RAIL_SUPPORTS_ALTERNATE_TX_POWER 0 137 #endif 138 /// Backwards-compatible synonym of \ref RAIL_SUPPORTS_ALTERNATE_TX_POWER. 139 #define RAIL_FEAT_ALTERNATE_POWER_TX_SUPPORTED RAIL_SUPPORTS_ALTERNATE_TX_POWER 140 141 /// Boolean to indicate whether the selected chip supports antenna diversity. 142 /// See also runtime refinement \ref RAIL_SupportsAntennaDiversity(). 143 #if ((_SILICON_LABS_32B_SERIES_1_CONFIG >= 2) \ 144 || (_SILICON_LABS_32B_SERIES == 2)) 145 #define RAIL_SUPPORTS_ANTENNA_DIVERSITY 1 146 #else 147 #define RAIL_SUPPORTS_ANTENNA_DIVERSITY 0 148 #endif 149 /// Backwards-compatible synonym of \ref RAIL_SUPPORTS_ANTENNA_DIVERSITY. 150 #define RAIL_FEAT_ANTENNA_DIVERSITY RAIL_SUPPORTS_ANTENNA_DIVERSITY 151 152 /// Boolean to indicate whether the selected chip supports path diversity. 153 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 3) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 8) 154 #define RAIL_SUPPORTS_PATH_DIVERSITY 1 155 #else 156 #define RAIL_SUPPORTS_PATH_DIVERSITY 0 157 #endif 158 159 /// Boolean to indicate whether the selected chip supports channel hopping. 160 /// See also runtime refinement \ref RAIL_SupportsChannelHopping(). 161 #if ((_SILICON_LABS_32B_SERIES_1_CONFIG >= 2) || (_SILICON_LABS_32B_SERIES_2_CONFIG >= 1)) 162 #define RAIL_SUPPORTS_CHANNEL_HOPPING 1 163 #else 164 #define RAIL_SUPPORTS_CHANNEL_HOPPING 0 165 #endif 166 /// Backwards-compatible synonym of \ref RAIL_SUPPORTS_CHANNEL_HOPPING. 167 #define RAIL_FEAT_CHANNEL_HOPPING RAIL_SUPPORTS_CHANNEL_HOPPING 168 169 /// Boolean to indicate whether the selected chip supports dual sync words. 170 /// See also runtime refinement \ref RAIL_SupportsDualSyncWords(). 171 #if 1 172 #define RAIL_SUPPORTS_DUAL_SYNC_WORDS 1 173 #else 174 #define RAIL_SUPPORTS_DUAL_SYNC_WORDS 0 175 #endif 176 177 /// Boolean to indicate whether the selected chip supports automatic transitions 178 /// from TX to TX. 179 /// See also runtime refinement \ref RAIL_SupportsTxToTx(). 180 #if (_SILICON_LABS_32B_SERIES_1_CONFIG != 1) 181 #define RAIL_SUPPORTS_TX_TO_TX 1 182 #else 183 #define RAIL_SUPPORTS_TX_TO_TX 0 184 #endif 185 186 /// Boolean to indicate whether the selected chip supports thermistor measurements. 187 /// See also runtime refinement \ref RAIL_SupportsExternalThermistor(). 188 #if ((_SILICON_LABS_32B_SERIES_2_CONFIG == 2) \ 189 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 3) \ 190 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 5) \ 191 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 7) \ 192 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 8)) 193 #define RAIL_SUPPORTS_EXTERNAL_THERMISTOR 1 194 #else 195 #define RAIL_SUPPORTS_EXTERNAL_THERMISTOR 0 196 #endif 197 /// Backwards-compatible synonym of \ref RAIL_SUPPORTS_EXTERNAL_THERMISTOR. 198 #define RAIL_FEAT_EXTERNAL_THERMISTOR RAIL_SUPPORTS_EXTERNAL_THERMISTOR 199 200 /// Boolean to indicate whether the selected chip supports HFXO compensation. 201 /// See also runtime refinement \ref RAIL_SupportsHFXOCompensation(). 202 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 5) 203 #define RAIL_SUPPORTS_HFXO_COMPENSATION RAIL_SUPPORTS_EXTERNAL_THERMISTOR 204 #else 205 #define RAIL_SUPPORTS_HFXO_COMPENSATION 0 206 #endif 207 208 /// Boolean to indicate whether the selected chip supports AUXADC measurements. 209 /// See also runtime refinement \ref RAIL_SupportsAuxAdc(). 210 #if ((_SILICON_LABS_32B_SERIES_2_CONFIG == 2) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 3) \ 211 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 5) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 7) \ 212 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 8)) 213 #define RAIL_SUPPORTS_AUXADC 1 214 #else 215 #define RAIL_SUPPORTS_AUXADC 0 216 #endif 217 218 /// Boolean to indicate whether the selected chip supports a high-precision 219 /// LFRCO. 220 /// Best to use the runtime refinement \ref RAIL_SupportsPrecisionLFRCO() 221 /// because some chip revisions do not support it. 222 #if ((_SILICON_LABS_32B_SERIES_1_CONFIG == 3) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 2) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 7)) 223 #define RAIL_SUPPORTS_PRECISION_LFRCO 1 224 #else 225 #define RAIL_SUPPORTS_PRECISION_LFRCO 0 226 #endif 227 228 /// Boolean to indicate whether the selected chip supports radio entropy. 229 /// See also runtime refinement \ref RAIL_SupportsRadioEntropy(). 230 #if 1 231 #define RAIL_SUPPORTS_RADIO_ENTROPY 1 232 #else 233 #define RAIL_SUPPORTS_RADIO_ENTROPY 0 234 #endif 235 236 /// Boolean to indicate whether the selected chip supports 237 /// RFSENSE Energy Detection Mode. 238 /// See also runtime refinement \ref RAIL_SupportsRfSenseEnergyDetection(). 239 #if ((_SILICON_LABS_32B_SERIES == 1) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 2) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 7)) 240 #define RAIL_SUPPORTS_RFSENSE_ENERGY_DETECTION 1 241 #else 242 #define RAIL_SUPPORTS_RFSENSE_ENERGY_DETECTION 0 243 #endif 244 245 /// Boolean to indicate whether the selected chip supports 246 /// RFSENSE Selective(OOK) Mode. 247 /// See also runtime refinement \ref RAIL_SupportsRfSenseSelectiveOok(). 248 #if ((_SILICON_LABS_32B_SERIES_2_CONFIG == 2) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 7)) 249 #define RAIL_SUPPORTS_RFSENSE_SELECTIVE_OOK 1 250 #else 251 #define RAIL_SUPPORTS_RFSENSE_SELECTIVE_OOK 0 252 #endif 253 /// Backwards-compatible synonym of \ref RAIL_SUPPORTS_RFSENSE_SELECTIVE_OOK. 254 #define RAIL_FEAT_RFSENSE_SELECTIVE_OOK_MODE_SUPPORTED \ 255 RAIL_SUPPORTS_RFSENSE_SELECTIVE_OOK 256 257 /// Boolean to indicate whether the selected chip supports the Energy Friendly 258 /// Front End Module (EFF). 259 /// See also runtime refinement \ref RAIL_SupportsEff(). 260 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 5) 261 #define RAIL_SUPPORTS_EFF 1 262 #else 263 #define RAIL_SUPPORTS_EFF 0 264 #endif 265 266 // BLE features 267 // Some features may not be available on all platforms 268 // due to radio hardware limitations. 269 270 /// Boolean to indicate whether the selected chip supports BLE. 271 /// See also runtime refinement \ref RAIL_SupportsProtocolBLE(). 272 #if 1 273 #define RAIL_SUPPORTS_PROTOCOL_BLE RAIL_SUPPORTS_2P4GHZ_BAND 274 #else 275 #define RAIL_SUPPORTS_PROTOCOL_BLE 0 276 #endif 277 278 /// Boolean to indicate whether the selected chip supports BLE 1Mbps 279 /// Non-Viterbi PHY. 280 /// See also runtime refinement \ref RAIL_BLE_Supports1MbpsNonViterbi(). 281 #if (_SILICON_LABS_32B_SERIES_1_CONFIG >= 1) 282 #define RAIL_BLE_SUPPORTS_1MBPS_NON_VITERBI RAIL_SUPPORTS_PROTOCOL_BLE 283 #else 284 #define RAIL_BLE_SUPPORTS_1MBPS_NON_VITERBI 0 285 #endif 286 287 /// Boolean to indicate whether the selected chip supports BLE 1Mbps Viterbi 288 /// PHY. 289 /// See also runtime refinement \ref RAIL_BLE_Supports1MbpsViterbi(). 290 #if (_SILICON_LABS_32B_SERIES_1_CONFIG != 1) 291 #define RAIL_BLE_SUPPORTS_1MBPS_VITERBI RAIL_SUPPORTS_PROTOCOL_BLE 292 #else 293 #define RAIL_BLE_SUPPORTS_1MBPS_VITERBI 0 294 #endif 295 296 /// Boolean to indicate whether the selected chip supports BLE 1Mbps operation. 297 /// See also runtime refinement \ref RAIL_BLE_Supports1Mbps(). 298 #define RAIL_BLE_SUPPORTS_1MBPS \ 299 (RAIL_BLE_SUPPORTS_1MBPS_NON_VITERBI || RAIL_BLE_SUPPORTS_1MBPS_VITERBI) 300 301 /// Boolean to indicate whether the selected chip supports BLE 2Mbps 302 /// Non-Viterbi PHY. 303 /// See also runtime refinement \ref RAIL_BLE_Supports2MbpsNonViterbi(). 304 #if (_SILICON_LABS_32B_SERIES_1_CONFIG >= 2) 305 #define RAIL_BLE_SUPPORTS_2MBPS_NON_VITERBI RAIL_SUPPORTS_PROTOCOL_BLE 306 #else 307 #define RAIL_BLE_SUPPORTS_2MBPS_NON_VITERBI 0 308 #endif 309 310 /// Boolean to indicate whether the selected chip supports BLE 2Mbps Viterbi 311 /// PHY. 312 /// See also runtime refinement \ref RAIL_BLE_Supports2MbpsViterbi(). 313 #if (_SILICON_LABS_32B_SERIES_1_CONFIG != 1) 314 #define RAIL_BLE_SUPPORTS_2MBPS_VITERBI RAIL_SUPPORTS_PROTOCOL_BLE 315 #else 316 #define RAIL_BLE_SUPPORTS_2MBPS_VITERBI 0 317 #endif 318 319 /// Boolean to indicate whether the selected chip supports BLE 2Mbps operation. 320 /// See also runtime refinement \ref RAIL_BLE_Supports2Mbps(). 321 #define RAIL_BLE_SUPPORTS_2MBPS \ 322 (RAIL_BLE_SUPPORTS_2MBPS_NON_VITERBI || RAIL_BLE_SUPPORTS_2MBPS_VITERBI) 323 324 /// Boolean to indicate whether the selected chip supports BLE 325 /// Antenna Switching needed for Angle-of-Arrival receives or 326 /// Angle-of-Departure transmits. 327 /// See also runtime refinement \ref RAIL_BLE_SupportsAntennaSwitching(). 328 #if ((_SILICON_LABS_32B_SERIES_2_CONFIG == 2) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 4) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 7)) 329 #define RAIL_BLE_SUPPORTS_ANTENNA_SWITCHING RAIL_SUPPORTS_PROTOCOL_BLE 330 #else 331 #define RAIL_BLE_SUPPORTS_ANTENNA_SWITCHING 0 332 #endif 333 334 /// Boolean to indicate whether the selected chip supports the BLE Coded PHY 335 /// used for Long-Range. 336 /// See also runtime refinement \ref RAIL_BLE_SupportsCodedPhy(). 337 #if ((_SILICON_LABS_32B_SERIES_1_CONFIG == 3) \ 338 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 1) \ 339 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 2) \ 340 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 4) \ 341 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 7)) 342 #define RAIL_BLE_SUPPORTS_CODED_PHY RAIL_SUPPORTS_PROTOCOL_BLE 343 #else 344 #define RAIL_BLE_SUPPORTS_CODED_PHY 0 345 #endif 346 /// Backwards-compatible synonym of \ref RAIL_BLE_SUPPORTS_CODED_PHY. 347 #define RAIL_FEAT_BLE_CODED RAIL_BLE_SUPPORTS_CODED_PHY 348 349 /// Boolean to indicate whether the selected chip supports the BLE Simulscan PHY 350 /// used for simultaneous BLE 1Mbps and Coded PHY reception. 351 /// See also runtime refinement \ref RAIL_BLE_SupportsSimulscanPhy(). 352 #if ((_SILICON_LABS_32B_SERIES_2_CONFIG == 2) \ 353 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 4) \ 354 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 7)) 355 #define RAIL_BLE_SUPPORTS_SIMULSCAN_PHY RAIL_SUPPORTS_PROTOCOL_BLE 356 #else 357 #define RAIL_BLE_SUPPORTS_SIMULSCAN_PHY 0 358 #endif 359 360 /// Boolean to indicate whether the selected chip supports BLE 361 /// CTE (Constant Tone Extension) needed for Angle-of-Arrival/Departure 362 /// transmits. 363 /// See also runtime refinement \ref RAIL_BLE_SupportsCte(). 364 #if ((_SILICON_LABS_32B_SERIES_2_CONFIG == 2) \ 365 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 4) \ 366 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 7)) 367 #define RAIL_BLE_SUPPORTS_CTE RAIL_SUPPORTS_PROTOCOL_BLE 368 #else 369 #define RAIL_BLE_SUPPORTS_CTE 0 370 #endif 371 372 /// Boolean to indicate whether the selected chip supports the 373 /// Quuppa PHY. 374 /// See also runtime refinement \ref RAIL_BLE_SupportsQuuppa(). 375 #if ((_SILICON_LABS_32B_SERIES_2_CONFIG == 2) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 7)) 376 #define RAIL_BLE_SUPPORTS_QUUPPA RAIL_SUPPORTS_PROTOCOL_BLE 377 #else 378 #define RAIL_BLE_SUPPORTS_QUUPPA 0 379 #endif 380 381 /// Boolean to indicate whether the selected chip supports BLE 382 /// IQ Sampling needed for Angle-of-Arrival/Departure receives. 383 /// See also runtime refinement \ref RAIL_BLE_SupportsIQSampling(). 384 #if ((_SILICON_LABS_32B_SERIES_2_CONFIG == 2) \ 385 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 4) \ 386 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 7)) 387 #define RAIL_BLE_SUPPORTS_IQ_SAMPLING RAIL_SUPPORTS_PROTOCOL_BLE 388 #else 389 #define RAIL_BLE_SUPPORTS_IQ_SAMPLING 0 390 #endif 391 392 /// Boolean to indicate whether the selected chip supports some BLE AOX 393 /// features. 394 #define RAIL_BLE_SUPPORTS_AOX \ 395 (RAIL_BLE_SUPPORTS_ANTENNA_SWITCHING \ 396 || RAIL_BLE_SUPPORTS_IQ_SAMPLING \ 397 || RAIL_BLE_SUPPORTS_CTE) 398 399 /// Backwards-compatible synonym of \ref RAIL_BLE_SUPPORTS_AOX 400 #define RAIL_FEAT_BLE_AOX_SUPPORTED RAIL_BLE_SUPPORTS_AOX 401 402 /// Boolean to indicate whether the selected chip supports BLE PHY switch to RX 403 /// functionality, which is used to switch BLE PHYs at a specific time 404 /// to receive auxiliary packets. 405 /// See also runtime refinement \ref RAIL_BLE_SupportsPhySwitchToRx(). 406 #if (_SILICON_LABS_32B_SERIES_1_CONFIG != 1) 407 #define RAIL_BLE_SUPPORTS_PHY_SWITCH_TO_RX RAIL_SUPPORTS_PROTOCOL_BLE 408 #else 409 #define RAIL_BLE_SUPPORTS_PHY_SWITCH_TO_RX 0 410 #endif 411 /// Backwards-compatible synonym of \ref RAIL_BLE_SUPPORTS_PHY_SWITCH_TO_RX. 412 #define RAIL_FEAT_BLE_PHY_SWITCH_TO_RX RAIL_BLE_SUPPORTS_PHY_SWITCH_TO_RX 413 414 // IEEE 802.15.4 features 415 // Some features may not be available on all platforms 416 // due to radio hardware limitations. 417 418 /// Boolean to indicate whether the selected chip supports IEEE 802.15.4. 419 /// See also runtime refinement \ref RAIL_SupportsProtocolIEEE802154(). 420 #if 1 421 #define RAIL_SUPPORTS_PROTOCOL_IEEE802154 1 422 #else 423 #define RAIL_SUPPORTS_PROTOCOL_IEEE802154 0 424 #endif 425 426 /// Boolean to indicate whether the selected chip supports the 427 /// 802.15.4 Wi-Fi Coexistence PHY. 428 /// See also runtime refinement \ref RAIL_IEEE802154_SupportsCoexPhy(). 429 #if (_SILICON_LABS_32B_SERIES_1_CONFIG > 1) 430 #define RAIL_IEEE802154_SUPPORTS_COEX_PHY (RAIL_SUPPORTS_PROTOCOL_IEEE802154 && RAIL_SUPPORTS_2P4GHZ_BAND) 431 #else 432 #define RAIL_IEEE802154_SUPPORTS_COEX_PHY 0 433 #endif 434 /// Backwards-compatible synonym of \ref RAIL_IEEE802154_SUPPORTS_COEX_PHY. 435 #define RAIL_FEAT_802154_COEX_PHY RAIL_IEEE802154_SUPPORTS_COEX_PHY 436 437 /// Boolean to indicate whether the selected chip supports 438 /// the IEEE 802.15.4 2.4 GHz band variant. 439 /// See also runtime refinement \ref RAIL_SupportsIEEE802154Band2P4(). 440 #if (_SILICON_LABS_32B_SERIES_2_CONFIG != 3) && (_SILICON_LABS_32B_SERIES_2_CONFIG != 8) 441 #define RAIL_SUPPORTS_IEEE802154_BAND_2P4 (RAIL_SUPPORTS_PROTOCOL_IEEE802154 && RAIL_SUPPORTS_2P4GHZ_BAND) 442 #else 443 #define RAIL_SUPPORTS_IEEE802154_BAND_2P4 0 444 #endif 445 446 /// Boolean to indicate whether the selected chip supports 447 /// the IEEE 802.15.4 2.4 RX channel switching. 448 /// See also runtime refinement \ref RAIL_IEEE802154_SupportsRxChannelSwitching(). 449 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 4) 450 #define RAIL_IEEE802154_SUPPORTS_RX_CHANNEL_SWITCHING (RAIL_SUPPORTS_IEEE802154_BAND_2P4) 451 #else 452 #define RAIL_IEEE802154_SUPPORTS_RX_CHANNEL_SWITCHING 0 453 #endif 454 455 /// Boolean to indicate whether the selected chip supports a front end module. 456 /// See also runtime refinement \ref RAIL_IEEE802154_SupportsFemPhy(). 457 #define RAIL_IEEE802154_SUPPORTS_FEM_PHY (RAIL_SUPPORTS_IEEE802154_BAND_2P4) 458 459 /// Boolean to indicate whether the selected chip supports 460 /// IEEE 802.15.4E-2012 feature subset needed for Zigbee R22 GB868. 461 /// See also runtime refinement \ref 462 /// RAIL_IEEE802154_SupportsESubsetGB868(). 463 #if 1 464 #define RAIL_IEEE802154_SUPPORTS_E_SUBSET_GB868 RAIL_SUPPORTS_PROTOCOL_IEEE802154 465 #else 466 #define RAIL_IEEE802154_SUPPORTS_E_SUBSET_GB868 0 467 #endif 468 /// Backwards-compatible synonym of \ref 469 /// RAIL_IEEE802154_SUPPORTS_E_SUBSET_GB868. 470 #define RAIL_FEAT_IEEE802154_E_GB868_SUPPORTED \ 471 RAIL_IEEE802154_SUPPORTS_E_SUBSET_GB868 472 473 /// Boolean to indicate whether the selected chip supports 474 /// IEEE 802.15.4E-2012 Enhanced ACKing. 475 /// See also runtime refinement \ref 476 /// RAIL_IEEE802154_SupportsEEnhancedAck(). 477 #if 1 478 #define RAIL_IEEE802154_SUPPORTS_E_ENHANCED_ACK RAIL_IEEE802154_SUPPORTS_E_SUBSET_GB868 479 #else 480 #define RAIL_IEEE802154_SUPPORTS_E_ENHANCED_ACK 0 481 #endif 482 /// Backwards-compatible synonym of \ref 483 /// RAIL_IEEE802154_SUPPORTS_E_ENHANCED_ACK. 484 #define RAIL_FEAT_IEEE802154_E_ENH_ACK_SUPPORTED \ 485 RAIL_IEEE802154_SUPPORTS_E_ENHANCED_ACK 486 487 /// Boolean to indicate whether the selected chip supports 488 /// receiving IEEE 802.15.4E-2012 Multipurpose frames. 489 /// See also runtime refinement \ref 490 /// RAIL_IEEE802154_SupportsEMultipurposeFrames(). 491 #if (_SILICON_LABS_32B_SERIES_1_CONFIG != 1) 492 #define RAIL_IEEE802154_SUPPORTS_E_MULTIPURPOSE_FRAMES RAIL_IEEE802154_SUPPORTS_E_SUBSET_GB868 493 #else 494 #define RAIL_IEEE802154_SUPPORTS_E_MULTIPURPOSE_FRAMES 0 495 #endif 496 /// Backwards-compatible synonym of \ref 497 /// RAIL_IEEE802154_SUPPORTS_E_MULTIPURPOSE_FRAMES. 498 #define RAIL_FEAT_IEEE802154_MULTIPURPOSE_FRAME_SUPPORTED \ 499 RAIL_IEEE802154_SUPPORTS_E_MULTIPURPOSE_FRAMES 500 501 /// Boolean to indicate whether the selected chip supports 502 /// IEEE 802.15.4G-2012 feature subset needed for Zigbee R22 GB868. 503 /// See also runtime refinement \ref 504 /// RAIL_IEEE802154_SupportsGSubsetGB868(). 505 #if (_SILICON_LABS_32B_SERIES_2_CONFIG != 3) 506 #define RAIL_IEEE802154_SUPPORTS_G_SUBSET_GB868 \ 507 ((RAIL_SUPPORTS_PROTOCOL_IEEE802154 != 0) && (RAIL_SUPPORTS_SUBGHZ_BAND != 0)) 508 #else 509 #define RAIL_IEEE802154_SUPPORTS_G_SUBSET_GB868 0 510 #endif 511 /// Backwards-compatible synonym of \ref 512 /// RAIL_IEEE802154_SUPPORTS_G_SUBSET_GB868. 513 #define RAIL_FEAT_IEEE802154_G_GB868_SUPPORTED \ 514 RAIL_IEEE802154_SUPPORTS_G_SUBSET_GB868 515 516 /// Boolean to indicate whether the selected chip supports 517 /// dynamic FEC 518 /// See also runtime refinement \ref 519 /// RAIL_IEEE802154_SupportsGDynFec(). 520 #if (_SILICON_LABS_32B_SERIES_2_CONFIG > 1) || (_SILICON_LABS_32B_SERIES_1_CONFIG == 2) 521 #define RAIL_IEEE802154_SUPPORTS_G_DYNFEC \ 522 RAIL_IEEE802154_SUPPORTS_G_SUBSET_GB868 // limit to SUBGHZ for now 523 #else 524 #define RAIL_IEEE802154_SUPPORTS_G_DYNFEC 0 525 #endif 526 527 /// Boolean to indicate whether the selected chip supports 528 /// Wi-SUN mode switching 529 /// See also runtime refinement \ref 530 /// RAIL_IEEE802154_SupportsGModeSwitch(). 531 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 5) 532 #define RAIL_IEEE802154_SUPPORTS_G_MODESWITCH \ 533 RAIL_IEEE802154_SUPPORTS_G_SUBSET_GB868 // limit to SUBGHZ for now 534 #else 535 #define RAIL_IEEE802154_SUPPORTS_G_MODESWITCH 0 536 #endif 537 538 /// Boolean to indicate whether the selected chip supports 539 /// IEEE 802.15.4G-2012 reception and transmission of frames 540 /// with 4-byte CRC. 541 /// See also runtime refinement \ref RAIL_IEEE802154_SupportsG4ByteCrc(). 542 #if (_SILICON_LABS_32B_SERIES_1_CONFIG != 1) 543 #define RAIL_IEEE802154_SUPPORTS_G_4BYTE_CRC RAIL_IEEE802154_SUPPORTS_G_SUBSET_GB868 544 #else 545 #define RAIL_IEEE802154_SUPPORTS_G_4BYTE_CRC 0 546 #endif 547 /// Backwards-compatible synonym of \ref RAIL_IEEE802154_SUPPORTS_G_4BYTE_CRC. 548 #define RAIL_FEAT_IEEE802154_G_4BYTE_CRC_SUPPORTED \ 549 RAIL_IEEE802154_SUPPORTS_G_4BYTE_CRC 550 551 /// Boolean to indicate whether the selected chip supports 552 /// IEEE 802.15.4G-2012 reception of unwhitened frames. 553 /// See also runtime refinement \ref 554 /// RAIL_IEEE802154_SupportsGUnwhitenedRx(). 555 #if (_SILICON_LABS_32B_SERIES_1_CONFIG != 1) 556 #define RAIL_IEEE802154_SUPPORTS_G_UNWHITENED_RX RAIL_IEEE802154_SUPPORTS_G_SUBSET_GB868 557 #else 558 #define RAIL_IEEE802154_SUPPORTS_G_UNWHITENED_RX 0 559 #endif 560 /// Backwards-compatible synonym of \ref 561 /// RAIL_IEEE802154_SUPPORTS_G_UNWHITENED_RX. 562 #define RAIL_FEAT_IEEE802154_G_UNWHITENED_RX_SUPPORTED \ 563 RAIL_IEEE802154_SUPPORTS_G_UNWHITENED_RX 564 565 /// Boolean to indicate whether the selected chip supports 566 /// IEEE 802.15.4G-2012 transmission of unwhitened frames. 567 /// See also runtime refinement \ref 568 /// RAIL_IEEE802154_SupportsGUnwhitenedTx(). 569 #if (_SILICON_LABS_32B_SERIES_1_CONFIG != 1) 570 #define RAIL_IEEE802154_SUPPORTS_G_UNWHITENED_TX RAIL_IEEE802154_SUPPORTS_G_SUBSET_GB868 571 #else 572 #define RAIL_IEEE802154_SUPPORTS_G_UNWHITENED_TX 0 573 #endif 574 /// Backwards-compatible synonym of \ref 575 /// RAIL_IEEE802154_SUPPORTS_G_UNWHITENED_TX. 576 #define RAIL_FEAT_IEEE802154_G_UNWHITENED_TX_SUPPORTED \ 577 RAIL_IEEE802154_SUPPORTS_G_UNWHITENED_TX 578 579 /// Boolean to indicate whether the selected chip supports 580 /// canceling the frame-pending lookup event 581 /// \ref RAIL_EVENT_IEEE802154_DATA_REQUEST_COMMAND 582 /// when the radio transitions to a state that renders the 583 /// the reporting of this event moot (i.e., too late for 584 /// the stack to influence the outgoing ACK). 585 /// See also runtime refinement \ref 586 /// RAIL_IEEE802154_SupportsCancelFramePendingLookup(). 587 #if 1 588 #define RAIL_IEEE802154_SUPPORTS_CANCEL_FRAME_PENDING_LOOKUP RAIL_SUPPORTS_PROTOCOL_IEEE802154 589 #else 590 #define RAIL_IEEE802154_SUPPORTS_CANCEL_FRAME_PENDING_LOOKUP 0 591 #endif 592 /// Backwards-compatible synonym of \ref 593 /// RAIL_IEEE802154_SUPPORTS_CANCEL_FRAME_PENDING_LOOKUP. 594 #define RAIL_FEAT_IEEE802154_CANCEL_FP_LOOKUP_SUPPORTED \ 595 RAIL_IEEE802154_SUPPORTS_CANCEL_FRAME_PENDING_LOOKUP 596 597 /// Boolean to indicate whether the selected chip supports 598 /// early triggering of the frame-pending lookup event 599 /// \ref RAIL_EVENT_IEEE802154_DATA_REQUEST_COMMAND 600 /// just after MAC address fields have been received. 601 /// See also runtime refinement \ref 602 /// RAIL_IEEE802154_SupportsEarlyFramePendingLookup(). 603 #if 1 604 #define RAIL_IEEE802154_SUPPORTS_EARLY_FRAME_PENDING_LOOKUP RAIL_SUPPORTS_PROTOCOL_IEEE802154 605 #else 606 #define RAIL_IEEE802154_SUPPORTS_EARLY_FRAME_PENDING_LOOKUP 0 607 #endif 608 /// Backwards-compatible synonym of \ref 609 /// RAIL_IEEE802154_SUPPORTS_EARLY_FRAME_PENDING_LOOKUP. 610 #define RAIL_FEAT_IEEE802154_EARLY_FP_LOOKUP_SUPPORTED \ 611 RAIL_IEEE802154_SUPPORTS_EARLY_FRAME_PENDING_LOOKUP 612 613 /// Boolean to indicate whether the selected chip supports dual PA configs for mode switch 614 /// or concurrent mode. 615 /// See also runtime refinement \ref RAIL_IEEE802154_SupportsDualPaConfig(). 616 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 5) 617 #define RAIL_IEEE802154_SUPPORTS_DUAL_PA_CONFIG 1 618 #else 619 #define RAIL_IEEE802154_SUPPORTS_DUAL_PA_CONFIG 0 620 #endif 621 622 /// Boolean to indicate whether the selected chip supports the pa power setting table. 623 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 5) 624 #define RAIL_SUPPORTS_DBM_POWERSETTING_MAPPING_TABLE 1 625 #else 626 #define RAIL_SUPPORTS_DBM_POWERSETTING_MAPPING_TABLE 0 627 #endif 628 629 /// Boolean to indicate whether the selected chip supports IEEE 802.15.4 PHY 630 /// with custom settings 631 #if ((_SILICON_LABS_32B_SERIES_1_CONFIG == 2) || (_SILICON_LABS_32B_SERIES_1_CONFIG == 3)) 632 #define RAIL_IEEE802154_SUPPORTS_CUSTOM1_PHY (RAIL_SUPPORTS_PROTOCOL_IEEE802154 && RAIL_SUPPORTS_2P4GHZ_BAND) 633 #else 634 #define RAIL_IEEE802154_SUPPORTS_CUSTOM1_PHY 0 635 #endif 636 637 // Z-Wave features 638 // Some features may not be available on all platforms 639 // due to radio hardware limitations. 640 641 /// Boolean to indicate whether the selected chip supports Z-Wave. 642 /// See also runtime refinement \ref RAIL_SupportsProtocolZWave(). 643 #if ((_SILICON_LABS_32B_SERIES_1_CONFIG >= 3) \ 644 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 3) \ 645 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 8)) 646 #define RAIL_SUPPORTS_PROTOCOL_ZWAVE RAIL_SUPPORTS_SUBGHZ_BAND 647 #else 648 #define RAIL_SUPPORTS_PROTOCOL_ZWAVE 0 649 #endif 650 /// Backwards-compatible synonym of \ref RAIL_SUPPORTS_PROTOCOL_ZWAVE. 651 #define RAIL_FEAT_ZWAVE_SUPPORTED RAIL_SUPPORTS_PROTOCOL_ZWAVE 652 653 /// Boolean to indicate whether the selected chip supports energy detect PHY. 654 /// See also runtime refinement \ref RAIL_ZWAVE_SupportsEnergyDetectPhy(). 655 #if (_SILICON_LABS_32B_SERIES_1_CONFIG >= 3) 656 #define RAIL_ZWAVE_SUPPORTS_ED_PHY RAIL_SUPPORTS_PROTOCOL_ZWAVE 657 #else 658 #define RAIL_ZWAVE_SUPPORTS_ED_PHY 0 659 #endif 660 661 /// Boolean to indicate whether the selected chip supports concurrent PHY. 662 /// See also runtime refinement \ref RAIL_ZWAVE_SupportsConcPhy(). 663 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 3) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 8) 664 #define RAIL_ZWAVE_SUPPORTS_CONC_PHY RAIL_SUPPORTS_PROTOCOL_ZWAVE 665 #else 666 #define RAIL_ZWAVE_SUPPORTS_CONC_PHY 0 667 #endif 668 669 /// Boolean to indicate whether the selected chip supports SQ-based PHY. 670 /// See also runtime refinement \ref RAIL_SupportsSQPhy(). 671 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 3) \ 672 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 4) \ 673 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 5) \ 674 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 8) 675 #define RAIL_SUPPORTS_SQ_PHY 1 676 #else 677 #define RAIL_SUPPORTS_SQ_PHY 0 678 #endif 679 680 /// Boolean to indicate whether the code supports Z-Wave 681 /// region information in PTI and 682 /// newer RAIL_ZWAVE_RegionConfig_t structure 683 /// See also runtime refinement \ref RAIL_ZWAVE_SupportsRegionPti(). 684 #if 1 685 #define RAIL_ZWAVE_SUPPORTS_REGION_PTI RAIL_SUPPORTS_PROTOCOL_ZWAVE 686 #else 687 #define RAIL_ZWAVE_SUPPORTS_REGION_PTI 0 688 #endif 689 /// Backwards-compatible synonym of \ref RAIL_ZWAVE_SUPPORTS_REGION_PTI. 690 #define RAIL_FEAT_ZWAVE_REGION_PTI RAIL_ZWAVE_SUPPORTS_REGION_PTI 691 692 /// Boolean to indicate whether the selected chip supports raw RX data 693 /// sources other than \ref RAIL_RxDataSource_t::RX_PACKET_DATA. 694 /// See also runtime refinement \ref RAIL_SupportsRxRawData(). 695 #if 1 696 #define RAIL_SUPPORTS_RX_RAW_DATA 1 697 #else 698 #define RAIL_SUPPORTS_RX_RAW_DATA 0 699 #endif 700 701 /// Boolean to indicate whether the selected chip supports 702 /// direct mode. 703 /// See also runtime refinement \ref RAIL_SupportsDirectMode(). 704 #if ((_SILICON_LABS_32B_SERIES == 1) \ 705 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 3) \ 706 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 8)) 707 #define RAIL_SUPPORTS_DIRECT_MODE 1 708 #else 709 #define RAIL_SUPPORTS_DIRECT_MODE 0 710 #endif 711 712 /// Boolean to indicate whether the selected chip supports 713 /// RX direct mode data to FIFO. 714 /// See also runtime refinement \ref RAIL_SupportsRxDirectModeDataToFifo(). 715 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 3) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 8) 716 #define RAIL_SUPPORTS_RX_DIRECT_MODE_DATA_TO_FIFO 1 717 #else 718 #define RAIL_SUPPORTS_RX_DIRECT_MODE_DATA_TO_FIFO 0 719 #endif 720 721 /// Boolean to indicate whether the selected chip supports 722 /// MFM protocol. 723 /// See also runtime refinement \ref RAIL_SupportsMfm(). 724 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 3) || (_SILICON_LABS_32B_SERIES_2_CONFIG == 8) 725 #define RAIL_SUPPORTS_MFM 1 726 #else 727 #define RAIL_SUPPORTS_MFM 0 728 #endif 729 730 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 4) 731 /// Boolean to indicate whether the selected chip supports 732 /// 802.15.4 signal detection 733 #define RAIL_IEEE802154_SUPPORTS_SIGNAL_IDENTIFIER (RAIL_SUPPORTS_PROTOCOL_IEEE802154) 734 /// Boolean to indicate whether the selected chip supports 735 /// BLE signal detection 736 #define RAIL_BLE_SUPPORTS_SIGNAL_IDENTIFIER (RAIL_SUPPORTS_PROTOCOL_BLE) 737 #else 738 /// Boolean to indicate whether the selected chip supports 739 /// 802.15.4 signal detection 740 #define RAIL_IEEE802154_SUPPORTS_SIGNAL_IDENTIFIER 0 741 /// Boolean to indicate whether the selected chip supports 742 /// BLE signal detection 743 #define RAIL_BLE_SUPPORTS_SIGNAL_IDENTIFIER 0 744 #endif 745 746 /// Boolean to indicate whether the selected chip supports 747 /// configurable RSSI threshold set by \ref RAIL_SetRssiDetectThreshold(). 748 /// See also runtime refinement \ref RAIL_SupportsRssiDetectThreshold(). 749 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 3) \ 750 || (_SILICON_LABS_32B_SERIES_2_CONFIG == 5) 751 #define RAIL_SUPPORTS_RSSI_DETECT_THRESHOLD (1U) 752 #else 753 #define RAIL_SUPPORTS_RSSI_DETECT_THRESHOLD (0U) 754 #endif 755 756 /// Boolean to indicate whether the selected chip supports 757 /// thermal protection set by \ref RAIL_ConfigThermalProtection(). 758 /// See also runtime refinement \ref RAIL_SupportsThermalProtection(). 759 #if (_SILICON_LABS_32B_SERIES_2_CONFIG == 5) 760 #define RAIL_SUPPORTS_THERMAL_PROTECTION (1U) 761 #else 762 #define RAIL_SUPPORTS_THERMAL_PROTECTION (0U) 763 #endif 764 765 /** @} */ // end of group Features 766 767 /** @} */ // end of group RAIL_API 768 769 #ifdef __cplusplus 770 } 771 #endif 772 773 #ifdef RAIL_INTERNAL_BUILD 774 #include "rail_features_internal.h" 775 #endif 776 777 #endif // __RAIL_FEATURES_H__ 778