Antenna Control
Basic APIs to control the Antenna functionality.
Modules |
|
EFR32 | |
EFR32 Antenna Control FunctionalityThese enumerations and structures are used with RAIL Antenna Control API.
|
Functions |
|
RAIL_Status_t | RAIL_ConfigAntenna ( RAIL_Handle_t railHandle, const RAIL_AntennaConfig_t *config) |
Configures antenna path and pin locations.
|
Detailed Description
Basic APIs to control the Antenna functionality.
Function Documentation
RAIL_Status_t RAIL_ConfigAntenna | ( | RAIL_Handle_t |
railHandle,
|
const RAIL_AntennaConfig_t * |
config
|
||
) |
Configures antenna path and pin locations.
- Warning
- This API must be called before any TX or RX takes place, otherwise the antenna configurations for those functions will not take effect.
- Parameters
-
[in] railHandle
A RAIL instance handle. [in] config
A configuration structure applied to the relevant Antenna Configuration registers. A NULL config will produce undefined behavior.
- Returns
- Status code indicating success of the function call.
This function tells RAIL how to select each antenna, but not when. Antenna selection for receive is controlled by the RAIL_RxOptions_t::RAIL_RX_OPTION_ANTENNA0 and RAIL_RxOptions_t::RAIL_RX_OPTION_ANTENNA1 options (and the RAIL_RxOptions_t::RAIL_RX_OPTION_ANTENNA_AUTO combination). Antenna selection for transmit is controlled by the RAIL_TxOptions_t::RAIL_TX_OPTION_ANTENNA0 and RAIL_TxOptions_t::RAIL_TX_OPTION_ANTENNA1 options.
Although a RAIL handle is included for potential future expansion of this function, it is currently not used. That is, there is only one Antenna configuration that can be active on a chip, regardless of the number of protocols (unless the application updates the configuration upon a protocol switch), and the configuration is not saved in the RAIL instance. For optimal future compatibility, pass in a chip-specific handle, such as RAIL_EFR32_HANDLE .