name=Antenna
description=Antenna diversity configuration routines, and example APIs. The diversity implementation is software-based transmit-side diversity. The antenna is switched via antenna select GPIO(s) toggles (GPIO configuration below, in plugin) when MAC-level ACK is not received. So, with each ACK event there are 3 MAC-level retries for a total of 4 MAC-level message attempts. When antenna diversity is enabled, both antenna paths will get 2 of these attempts.
category=HAL
quality=sample

includedByDefault=false

providedApis=antenna
api.antenna.header=$HAL/plugin/antenna/antenna.h

requiredApis=hal

setup(hwConfig) {
  dependentHwConfModules=ANTDIV
}

$HAL/plugin/antenna/antenna.c     (em346,em351,em355,em3555,em357,em3581,em3582,em3585,em3586,em3587,em3588,em3591,em3592,em3595,em3596,em3597,em3598)
$HAL/plugin/antenna-stub/antenna-stub.c (simulation)

options=                                                                 \
  antennaDiversityEnabled,antennaSelectGpioPort,antennaSelectGpioPin,    \
  antennaNDiversityEnabled,antennaNSelectGpioPort,antennaNSelectGpioPin

antennaDiversityEnabled.name=Enable antenna diversity
antennaDiversityEnabled.description=This option defines whether or not antenna diversity is enabled.
antennaDiversityEnabled.type=BOOLEAN
antennaDiversityEnabled.default=TRUE
antennaDiversityEnabled.override(efr32)=FALSE
antennaDiversityEnabled.enabledIf=!conf.architectureMatches("efr32")

antennaSelectGpioPort.name=Antenna select signal GPIO port
antennaSelectGpioPort.description=This is the GPIO port for the antenna select signal.
antennaSelectGpioPort.type=LIST:A,B,C,D,E,F,G,H
antennaSelectGpioPort.default=C
antennaSelectGpioPort.dependsOn=antennaDiversityEnabled
antennaSelectGpioPort.override(efr32)=NONE
antennaSelectGpioPort.enabledIf=!conf.architectureMatches("efr32")

antennaSelectGpioPin.name=Antenna select signal GPIO pin
antennaSelectGpioPin.description=This is the GPIO pin for the antenna select signal.
antennaSelectGpioPin.type=NUMBER:0,15
antennaSelectGpioPin.default=11
antennaSelectGpioPin.dependsOn=antennaDiversityEnabled
antennaSelectGpioPin.override(efr32)=_
antennaSelectGpioPin.enabledIf=!conf.architectureMatches("efr32")

antennaNDiversityEnabled.name=Enable inverted antenna diversity gpio
antennaNDiversityEnabled.description=This option defines whether or not an inverted antenna diversity GPIO is enabled.
antennaNDiversityEnabled.type=BOOLEAN
antennaNDiversityEnabled.default=TRUE
antennaNDiversityEnabled.dependsOn=antennaDiversityEnabled
antennaNDiversityEnabled.override(efr32)=FALSE
antennaNDiversityEnabled.enabledIf=!conf.architectureMatches("efr32")

antennaNSelectGpioPort.name=Inverted antenna diversity signal GPIO port
antennaNSelectGpioPort.description=This is the GPIO port for the inverted antenna select signal.
antennaNSelectGpioPort.type=LIST:A,B,C,D,E,F,G,H
antennaNSelectGpioPort.default=C
antennaNSelectGpioPort.dependsOn=antennaNDiversityEnabled
antennaNSelectGpioPort.override(efr32)=NONE
antennaNSelectGpioPort.enabledIf=!conf.architectureMatches("efr32")

antennaNSelectGpioPin.name=Inverted antenna diverstiy signal GPIO pin
antennaNSelectGpioPin.description=This is the GPIO pin for the inverted antenna select signal.
antennaNSelectGpioPin.type=NUMBER:0,15
antennaNSelectGpioPin.default=10
antennaNSelectGpioPin.dependsOn=antennaNDiversityEnabled
antennaNSelectGpioPin.override(efr32)=_
antennaNSelectGpioPin.enabledIf=!conf.architectureMatches("efr32")
