wiki:RadioControllerAPI

Version 5 (modified by sgupta, 17 years ago) (diff)

--

Radio Controller API

The Radio Controller is a driver that enables the use of the Radio Boards. The full driver source code is in the repository at PlatformSupport/CustomPeripherals/drivers/radio_controller_v1_08_a/src.

Global defines

RADIO1_ADDR: Apply function to radio in slot 1.

RADIO2_ADDR: Apply function to radio in slot 2.

RADIO3_ADDR: Apply function to radio in slot 3.

RADIO4_ADDR: Apply function to radio in slot 4.

ICHAN: Apply function to one of the channel A of DAC or ADC.

QCHAN: Apply function to one of the channel B of DAC or ADC.

WARP_SUCCESS: Return value when function applied without errors.

INVALID_GAIN: Return value when given gain values for functions to apply gains are invalid.

INVALID_FREQ: Return value when functions to select center frequency was given an invalid frequency set.

INVALID_MODE: Return value when functions to select a mode were given an invalid mode value.

radio_controller_basic.h

!WarpRadio_v1_Reset(baseaddress): Resets and initializes the board to its default state.

!WarpRadio_v1_TxEnable(radios): Enable transmit on radios. Triggers Transmit State Machine. Forcibly turns of receive enable.

!WarpRadio_v1_RxEnable(radios): Enable receive on radios. Forcibly turn off transmit enable.

!WarpRadio_v1_TxRxDisable(radios): Put radios into standby state.

!WarpRadio_v1_SetCenterFreq2GHz(freqset,radios): Set center frequency of radios to freqset.

!WarpRadio_v1_DIPSW(radio): Read DIPSW of radio.

!WarpRadio_v1_DACOffsetAdj(chan,value,radios): Set the DC offset of ICHAN or QCHAN to value of the DACs on radios.

radio_controller_ext.h

!WarpRadio_v1_24AmpEnable(radios): Enable 2.4GHz amplifier on radios.

!WarpRadio_v1_24AmpDisable(radios): Disable 2.4GHz amplifier on radios.

!WarpRadio_v1_LockDetect(radios): Read Lock Detect of radios specified.

!WarpRadio_v1_SoftwareTxGainControl(mode,radios): Enable software control (mode=0) or hardware control (mode=1) of Tx gain for radios.

!WarpRadio_v1_BaseBandTxGain(value,radios): Set value to Base Band gain for transmission of radios. Must be done if different from default (0x3).

!WarpRadio_v1_TxVGAGainControl(value,radios): Set value to RF gain for transmission of radios if using software control for transmit gains (0x0->0x3F).

!WarpRadio_v1_SoftwareRxGainControl(mode,radios): Enable software control (mode=0) or hardware control (mode=1) of Rx gain for radios.

!WarpRadio_v1_RxLNAGainControl(value,radios): Set value to LNA gain for receive mode of radios if using software control for receive gains (0x0->0x3).

!WarpRadio_v1_RxVGAGainControl(value,radios): Set value to RF gain for receive mode of radios if using software control for receive gains (0x0->0x1F).

!WarpRadio_v1_SetTxTiming(radios,dly_TxEn,dly_TxStart,dly_GainRampEn,dly_PowerAmpEn): Set all delay thresholds for the different outputs of the Transmit State Machine.

!WarpRadio_v1_SetTxGainTiming(radios,TxGainTarget,TxGainStep,TxGainTimeStep): Set Gain ramp target and ramp rate for Transmit State Machine.

!WarpRadio_v1_TxLpfCornFreqCoarseAdj(value,radios): Set the corner frequency of LPF for transmit path to value for radios.

!WarpRadio_v1_RxLpfCornFreqCoarseAdj(value,radios): Set the coarse corner frequency of LPF for receive path to value for radios.

!WarpRadio_v1_RxLpfCornFreqFineAdj(value,radios): Set the fine corner frequency of LPF for receive path to value for radios.

!WarpRadio_v1_RxHighPassCornerFreq(value,radios): Set the corner frequency of HPF for receive path to value for radios.

radio_controller_adv.h

!WarpRadio_v1_SHDNEnable(radios): Shutdown the radios specified.

!WarpRadio_v1_SHDNDisable(radios): Bring radios out of shutdown mode into standby.

!WarpRadio_v1_SHDNSoftControlEnable(radios): Allow the shutdown of the radios be controlled by software function calls.

!WarpRadio_v1_SHDNSoftControlDisable(radios): Shutdown of radios controlled by SHDN_External on radio bridge.

!WarpRadio_v1_RxEnSoftControlEnable(radios): Allow the receive enable of the radios be controlled by software function calls.

!WarpRadio_v1_RxEnSoftControlDisable(radios): Receive enable of radios controlled by RxEn_External on radio bridge.

!WarpRadio_v1_TxEnSoftControlEnable(radios): Allow the transmit enable of the radios be controlled by software function calls.

!WarpRadio_v1_TxEnSoftControlDisable(radios): Receive enable of radios controlled by TxEn_External on radio bridge.

!WarpRadio_v1_RxHpSoftControlEnable(radios): Allow the RxHP of the radios be controlled by software function calls.

!WarpRadio_v1_RxHpSoftControlDisable(radios): Receive enable of radios controlled by RxHP_External on radio bridge.

!WarpRadio_v1_RxHpEnable(radios): Enable RxHP when controlled by software on radios.

!WarpRadio_v1_RxHpDisable(radios): Disable RxHP when controlled by software on radios.

!WarpRadio_v1_RssiHighBandwidth(mode,radios): Enable (mode=1) or disable (mode=0) high bandwidth mode on RSSI chips on radios.

!WarpRadio_v1_DACSleep(mode,radios): Sleep (mode=1) or bring out of sleep (mode=0) the DACs on radios specified.

!WarpRadio_v1_DACFineGainAdj(chan,value,radios): Adjust fine gain on ICHAN or QCHAN to value on radios.

!WarpRadio_v1_DACCoarseGainAdj(chan,value,radios): Adjust coarse gain on ICHAN or QCHAN to value on radios.

!WarpRadio_v1_ADCPdwn(chan,value,radios): Power down (value=1) or power up (value=0) ICHAN or QCHAN on radios