C/C++ Reference API#
Structures#
-
struct rx_radio_channel_config#
RX channel configuration.
A structure containing the configuration for a single RX channel
Public Members
-
bool enabled#
Enable channel
-
bool adc_high_performance_mode#
Enable high performance ADC, otherwise use low-power ADC
-
bool frequency_offset_correction_enable#
Enable ADC frequency offset correction
-
uint8_t analog_filter_power_mode#
Power mode of front-end analog filter Options are: 0 - Low power 1 - Medium power 2 - High power
-
bool analog_filter_biquad#
Use second order (Biquad) analog filter, otherwise first order TIA is used
-
uint32_t analog_filter_bandwidth_hz#
Front-end analog filter 1dB (Biquad) or 3 dB (TIA) bandwidth in Hz
-
uint32_t channel_bandwidth_hz#
Channel bandwidth of interest at ADC in Hz
-
uint32_t sample_rate_hz#
RX channel sample rate at digital interface
-
bool nco_enable#
Enable NCO to perform frequency translation
-
int32_t nco_frequency_hz#
NCO frequency in Hz
-
uint8_t rf_port#
RF port source used for channel Options are: 0 - RX_A 1 - RX_B
-
bool enabled#
-
struct tx_radio_channel_config#
TX channel configuration.
A structure containing the configuration for a single TX channel
Public Members
-
bool enabled#
Enable channel
-
uint32_t sample_rate_hz#
Data rate at digital interface in Hz
-
bool frequency_offset_correction_enable#
Enable DAC frequency offset correction
-
uint8_t analog_filter_power_mode#
Power mode of front-end analog filter Options are: 0 - Low power 1 - Medium power 2 - High power
-
uint32_t channel_bandwidth_hz#
Channel bandwidth of interest at DAC in Hz
-
bool orx_enabled#
Enable observation path
-
uint8_t elb_type#
Set external loopback mode. Options are: 0 - Disabled 1 - Before PA 2 - After PA
-
bool enabled#
-
struct radio_config#
Device configuration.
A structure containing the configuration for the top-level device
Public Members
-
uint8_t ssi_lanes#
SSI lanes to use Valid cases: 1 (CMOS/LVDS) 2 (LVDS) 4 (CMOS)
-
bool ddr#
Use DDR mode at digital interface, false will use SDR
-
bool short_strobe#
Use short strobe mode at digital interface, false will use long strobe
-
bool lvds#
Use LVDS mode at digital interface, false will use CMOS
-
uint8_t adc_rate_mode#
ADC clock rate mode select. Options are: 1 = LOW 2 = MEDIUM 3 = HIGH
-
bool fdd#
Use FDD duplex mode, false will use TDD
-
rx_radio_channel_config rx_config[2]#
Channel configurations for RX1 and RX2
-
tx_radio_channel_config tx_config[2]#
Channel configurations for TX1 and TX2
-
uint8_t ssi_lanes#
-
struct clock_config#
Clock configuration.
A structure containing the configuration for the device clock
Public Members
-
uint32_t device_clock_frequency_khz#
Device clock frequency in kHz
-
bool clock_pll_high_performance_enable#
Enable high performance PLL mode, otherwise low-power mode is used
-
uint8_t clock_pll_power_mode#
PLL power mode. Options: 0 = low power 1 = medium performance 2 = high performance
-
uint8_t processor_clock_divider#
Processor clock divider. Valid values are 1, 2, 4, 8, 16, 32, 64, 128, 256
-
uint32_t device_clock_frequency_khz#
-
struct adrv9002_config#
Top-level configuration.
A structure containing the configuration for the top-level device
Functions#
-
int adrv9002_generate_profile(adrv9002_config *cfg, char **profile, size_t *profile_num_bytes, char **stream_image, size_t *stream_image_num_bytes)#
Generate profile from configuration.
- Parameters:
cfg – Nested struct of device configuration for shared and individual channels
profile – Resulting json profile
profile_num_bytes – Number of bytes in profile array
stream_image – Stream image for ARM stream processor
stream_image_num_bytes – Number of bytes in stream image array
- Returns:
On success, 0 is returned
- Returns:
On error, a negative errno code is returned
-
char *get_message_from_error_code(int error_code)#
Get error message from error codes. This also includes profile specific codes.
- Parameters:
error_code – Error code to lookup and return message for
- Returns:
On code found, message is returned
- Returns:
On code not found, an empty string is returned
-
int adrv9002_generate_load_profile_iio(adrv9002_config *ac, struct iio_device *dev)#
Generate profile from configuration and load it to device with IIO driver.
- Parameters:
ac – Nested struct of device configuration for shared and individual channels
dev – A pointer to the iio_device structure of the adrv9002-phy
- Returns:
On success, 0 is returned
- Returns:
On error, a negative errno code is returned