wiki:warpradio_max2829.c

Version 9 (modified by bratton, 18 years ago) (diff)

--

Maxim MAX2829 Control Library

The documentation for the library is included below.

warpradio_max2829.c

This file provides functions for controlling the WARP radio board's ADC and RF transceiver chips.

References
baseaddr refers to the base address of the SPI core.
radbaseaddr is base address of the Radio Controller peripheral.
radios is the value applied to the Slave Select Register to select the radios.

void WARPRadio_InitializeSPI(unsigned int* baseaddr)
Initializes the SPI controller. This function must be called before any radio setup functions can be used. baseaddr refers to the base address of the SPI core.

void WarpRadio_InitializeRadio(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)
Initiates the selected radios. This function must be called at the start of the program and needs to be called only once. baseaddr refers to the base address of the SPI core. radbaseaddr is base address of the Radio Controller peripheral. radios is the value applied to select the desired radios.

void WarpRadio_RxEnable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)
Enables the receive mode in the radio board. Forcibly turns off the transmit mode and amplifiers. baseaddr refers to the base address of the SPI core. radbaseaddr is base address of the Radio Controller peripheral. radios is the value applied to select the radios to be enabled.

void WarpRadio_RxDisable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)
Disables receive mode in the specified radios. baseaddr refers to the base address of the SPI core. radbaseaddr is base address of the Radio Controller peripheral. radios is the value applied to select the desired radios to be disabled.

void WarpRadio_24AmpEnable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)
Turns on the 2.4GHz amplifier for the radios selected based on the value applied in radios. baseaddr refers to the base address of the SPI core. radbaseaddr is base address of the Radio Controller peripheral.

void WarpRadio_24AmpDisable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)
Turns off the 2.4GHz amplifier for the radios selected based on the value applied in radios. baseaddr refers to the base address of the SPI core. radbaseaddr is base address of the Radio Controller peripheral.

void WarpRadio_TxEnable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)
Enables the transmit mode on the Radios specified and turns on the 2.4GHz amplifier. radios refers to the Radios in the slots whose transmit mode is turned on.
This code needs to be checked. Top-level-comment says 2.4GHz amp is turned on. In-code-comments say that the 5GHz amp is turned off but do not specify whether the 2.4GHz amp is actually turned on.

void WarpRadio_TxDisable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)
Disables the transmit mode on the Radios specified and turns off both amplifiers. radios refers to the Radios in the slots whose transmit mode is turned off. baseaddr refers to the base address of the SPI core. radbaseaddr is base address of the Radio Controller peripheral.

void WarpRadio_SHDNEnable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)
Shuts down the radios specified. Forcibly turns off transmit and receive modes and shuts down amplifiers. radios refers to the Radios in the slots affected . baseaddr refers to the base address of the SPI core. radbaseaddr is base address of the Radio Controller peripheral.

void WarpRadio_SHDNDisable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)
Disable the shutdown mode on the selected radios. radios refers to the Radios in the slots affected . baseaddr refers to the base address of the SPI core. radbaseaddr is base address of the Radio Controller peripheral.

void WarpRadio_Reset(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)
DESCRIPTION TO BE ADDED

void WarpRadio_RxHpEnable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)
DESCRIPTION TO BE ADDED

void WarpRadio_RxHpDisable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)
DESCRIPTION TO BE ADDED

int WarpRadio_SetCenterFreq2GHz(unsigned int* baseaddr, char freqset, unsigned char radios)
DESCRIPTION TO BE ADDED

int WarpRadio_SetCenterFreq5GHz(unsigned int* baseaddr, char freqset, unsigned char radios)
DESCRIPTION TO BE ADDED

void WarpRadio_TxCalibration(unsigned int* baseaddr, unsigned char radios)
DESCRIPTION TO BE ADDED

void WarpRadio_RxCalibration(unsigned int* baseaddr, unsigned char radios)
DESCRIPTION TO BE ADDED

void WarpRadio_NoCalibration(unsigned int* baseaddr, unsigned char radios)
DESCRIPTION TO BE ADDED

int WarpRadio_TxCalGain(unsigned int* baseaddr, char gain, unsigned char radios)
DESCRIPTION TO BE ADDED

int WarpRadio_TxCalRxEnable(unsigned int* baseaddr, char mode, unsigned char radios)
DESCRIPTION TO BE ADDED

int WarpRadio_SetMimoMode(unsigned int* baseaddr, char mode, unsigned char radios)
DESCRIPTION TO BE ADDED

int WarpRadio_RssiHighBandwidth(unsigned int* baseaddr, char mode, unsigned char radios)
DESCRIPTION TO BE ADDED

void WarpRadio_TxLpfCornFreqCoarseAdj(unsigned int* baseaddr, char value, unsigned char radios)
DESCRIPTION TO BE ADDED

void WarpRadio_RxLpfCornFreqCoarseAdj(unsigned int* baseaddr, char value, unsigned char radios)
DESCRIPTION TO BE ADDED

int WarpRadio_RxLpfCornFreqFineAdj(unsigned int* baseaddr, char value, unsigned char radios)
DESCRIPTION TO BE ADDED

void WarpRadio_RxHighPassCornerFreq(unsigned int* baseaddr, char value, unsigned char radios)
DESCRIPTION TO BE ADDED

int WarpRadio_SerialRxGain(unsigned int* baseaddr, short mode, unsigned char radios)
DESCRIPTION TO BE ADDED

int WarpRadio_SerialTxGain(unsigned int* baseaddr, short mode, unsigned char radios)
DESCRIPTION TO BE ADDED

void WarpRadio_BaseBandTxGain(unsigned int* baseaddr, char value, unsigned char radios)
DESCRIPTION TO BE ADDED

void WarpRadio_RxLNAGainControl(unsigned int* baseaddr, char value, unsigned char radios)
DESCRIPTION TO BE ADDED

void WarpRadio_RxVGAGainControl(unsigned int* baseaddr, char value, unsigned char radios)
DESCRIPTION TO BE ADDED

void WarpRadio_TxVGAGainControl(unsigned int* baseaddr, char value, unsigned char radios)
DESCRIPTION TO BE ADDED