no-OS
|
Header file of AD9361 API Driver. More...
Go to the source code of this file.
Classes | |
struct | AD9361_InitParam |
struct | AD9361_RXFIRConfig |
struct | AD9361_TXFIRConfig |
Macros | |
#define | ENABLE 1 |
#define | DISABLE 0 |
#define | RX1 0 |
#define | RX2 1 |
#define | TX1 0 |
#define | TX2 1 |
#define | A_BALANCED 0 |
#define | B_BALANCED 1 |
#define | C_BALANCED 2 |
#define | A_N 3 |
#define | A_P 4 |
#define | B_N 5 |
#define | B_P 6 |
#define | C_N 7 |
#define | C_P 8 |
#define | TX_MON1 9 |
#define | TX_MON2 10 |
#define | TX_MON1_2 11 |
#define | TXA 0 |
#define | TXB 1 |
#define | MODE_1x1 1 |
#define | MODE_2x2 2 |
#define | HIGHEST_OSR 0 |
#define | NOMINAL_OSR 1 |
#define | INT_LO 0 |
#define | EXT_LO 1 |
#define | ON 0 |
#define | OFF 1 |
Enumerations | |
enum | ad9361_ensm_mode { ENSM_MODE_TX, ENSM_MODE_RX, ENSM_MODE_ALERT, ENSM_MODE_FDD, ENSM_MODE_WAIT, ENSM_MODE_SLEEP, ENSM_MODE_PINCTRL, ENSM_MODE_PINCTRL_FDD_INDEP } |
Functions | |
int32_t | ad9361_init (struct ad9361_rf_phy **ad9361_phy, AD9361_InitParam *init_param) |
int32_t | ad9361_remove (struct ad9361_rf_phy *phy) |
int32_t | ad9361_set_en_state_machine_mode (struct ad9361_rf_phy *phy, uint32_t mode) |
int32_t | ad9361_get_en_state_machine_mode (struct ad9361_rf_phy *phy, uint32_t *mode) |
int32_t | ad9361_set_rx_rf_gain (struct ad9361_rf_phy *phy, uint8_t ch, int32_t gain_db) |
int32_t | ad9361_get_rx_rf_gain (struct ad9361_rf_phy *phy, uint8_t ch, int32_t *gain_db) |
int32_t | ad9361_set_rx_rf_bandwidth (struct ad9361_rf_phy *phy, uint32_t bandwidth_hz) |
int32_t | ad9361_get_rx_rf_bandwidth (struct ad9361_rf_phy *phy, uint32_t *bandwidth_hz) |
int32_t | ad9361_set_rx_sampling_freq (struct ad9361_rf_phy *phy, uint32_t sampling_freq_hz) |
int32_t | ad9361_get_rx_sampling_freq (struct ad9361_rf_phy *phy, uint32_t *sampling_freq_hz) |
int32_t | ad9361_set_rx_lo_freq (struct ad9361_rf_phy *phy, uint64_t lo_freq_hz) |
int32_t | ad9361_get_rx_lo_freq (struct ad9361_rf_phy *phy, uint64_t *lo_freq_hz) |
int32_t | ad9361_set_rx_lo_int_ext (struct ad9361_rf_phy *phy, uint8_t int_ext) |
int32_t | ad9361_get_rx_rssi (struct ad9361_rf_phy *phy, uint8_t ch, struct rf_rssi *rssi) |
int32_t | ad9361_set_rx_gain_control_mode (struct ad9361_rf_phy *phy, uint8_t ch, uint8_t gc_mode) |
int32_t | ad9361_get_rx_gain_control_mode (struct ad9361_rf_phy *phy, uint8_t ch, uint8_t *gc_mode) |
int32_t | ad9361_set_rx_fir_config (struct ad9361_rf_phy *phy, AD9361_RXFIRConfig fir_cfg) |
int32_t | ad9361_get_rx_fir_config (struct ad9361_rf_phy *phy, uint8_t rx_ch, AD9361_RXFIRConfig *fir_cfg) |
int32_t | ad9361_set_rx_fir_en_dis (struct ad9361_rf_phy *phy, uint8_t en_dis) |
int32_t | ad9361_get_rx_fir_en_dis (struct ad9361_rf_phy *phy, uint8_t *en_dis) |
int32_t | ad9361_set_rx_rfdc_track_en_dis (struct ad9361_rf_phy *phy, uint8_t en_dis) |
int32_t | ad9361_get_rx_rfdc_track_en_dis (struct ad9361_rf_phy *phy, uint8_t *en_dis) |
int32_t | ad9361_set_rx_bbdc_track_en_dis (struct ad9361_rf_phy *phy, uint8_t en_dis) |
int32_t | ad9361_get_rx_bbdc_track_en_dis (struct ad9361_rf_phy *phy, uint8_t *en_dis) |
int32_t | ad9361_set_rx_quad_track_en_dis (struct ad9361_rf_phy *phy, uint8_t en_dis) |
int32_t | ad9361_get_rx_quad_track_en_dis (struct ad9361_rf_phy *phy, uint8_t *en_dis) |
int32_t | ad9361_set_rx_rf_port_input (struct ad9361_rf_phy *phy, uint32_t mode) |
int32_t | ad9361_get_rx_rf_port_input (struct ad9361_rf_phy *phy, uint32_t *mode) |
int32_t | ad9361_rx_fastlock_store (struct ad9361_rf_phy *phy, uint32_t profile) |
int32_t | ad9361_rx_fastlock_recall (struct ad9361_rf_phy *phy, uint32_t profile) |
int32_t | ad9361_rx_fastlock_load (struct ad9361_rf_phy *phy, uint32_t profile, uint8_t *values) |
int32_t | ad9361_rx_fastlock_save (struct ad9361_rf_phy *phy, uint32_t profile, uint8_t *values) |
int32_t | ad9361_rx_lo_powerdown (struct ad9361_rf_phy *phy, uint8_t option) |
int32_t | ad9361_get_rx_lo_power (struct ad9361_rf_phy *phy, uint8_t *option) |
int32_t | ad9361_set_tx_attenuation (struct ad9361_rf_phy *phy, uint8_t ch, uint32_t attenuation_mdb) |
int32_t | ad9361_get_tx_attenuation (struct ad9361_rf_phy *phy, uint8_t ch, uint32_t *attenuation_mdb) |
int32_t | ad9361_set_tx_rf_bandwidth (struct ad9361_rf_phy *phy, uint32_t bandwidth_hz) |
int32_t | ad9361_get_tx_rf_bandwidth (struct ad9361_rf_phy *phy, uint32_t *bandwidth_hz) |
int32_t | ad9361_set_tx_sampling_freq (struct ad9361_rf_phy *phy, uint32_t sampling_freq_hz) |
int32_t | ad9361_get_tx_sampling_freq (struct ad9361_rf_phy *phy, uint32_t *sampling_freq_hz) |
int32_t | ad9361_set_tx_lo_freq (struct ad9361_rf_phy *phy, uint64_t lo_freq_hz) |
int32_t | ad9361_get_tx_lo_freq (struct ad9361_rf_phy *phy, uint64_t *lo_freq_hz) |
int32_t | ad9361_set_tx_lo_int_ext (struct ad9361_rf_phy *phy, uint8_t int_ext) |
int32_t | ad9361_set_tx_fir_config (struct ad9361_rf_phy *phy, AD9361_TXFIRConfig fir_cfg) |
int32_t | ad9361_get_tx_fir_config (struct ad9361_rf_phy *phy, uint8_t tx_ch, AD9361_TXFIRConfig *fir_cfg) |
int32_t | ad9361_set_tx_fir_en_dis (struct ad9361_rf_phy *phy, uint8_t en_dis) |
int32_t | ad9361_get_tx_fir_en_dis (struct ad9361_rf_phy *phy, uint8_t *en_dis) |
int32_t | ad9361_get_tx_rssi (struct ad9361_rf_phy *phy, uint8_t ch, uint32_t *rssi_db_x_1000) |
int32_t | ad9361_set_tx_rf_port_output (struct ad9361_rf_phy *phy, uint32_t mode) |
int32_t | ad9361_get_tx_rf_port_output (struct ad9361_rf_phy *phy, uint32_t *mode) |
int32_t | ad9361_set_tx_auto_cal_en_dis (struct ad9361_rf_phy *phy, uint8_t en_dis) |
int32_t | ad9361_get_tx_auto_cal_en_dis (struct ad9361_rf_phy *phy, uint8_t *en_dis) |
int32_t | ad9361_tx_fastlock_store (struct ad9361_rf_phy *phy, uint32_t profile) |
int32_t | ad9361_tx_fastlock_recall (struct ad9361_rf_phy *phy, uint32_t profile) |
int32_t | ad9361_tx_fastlock_load (struct ad9361_rf_phy *phy, uint32_t profile, uint8_t *values) |
int32_t | ad9361_tx_fastlock_save (struct ad9361_rf_phy *phy, uint32_t profile, uint8_t *values) |
int32_t | ad9361_tx_lo_powerdown (struct ad9361_rf_phy *phy, uint8_t option) |
int32_t | ad9361_get_tx_lo_power (struct ad9361_rf_phy *phy, uint8_t *option) |
int32_t | ad9361_set_trx_path_clks (struct ad9361_rf_phy *phy, uint32_t *rx_path_clks, uint32_t *tx_path_clks) |
int32_t | ad9361_get_trx_path_clks (struct ad9361_rf_phy *phy, uint32_t *rx_path_clks, uint32_t *tx_path_clks) |
int32_t | ad9361_set_no_ch_mode (struct ad9361_rf_phy *phy, uint8_t no_ch_mode) |
int32_t | ad9361_do_mcs (struct ad9361_rf_phy *phy_master, struct ad9361_rf_phy *phy_slave) |
int32_t | ad9361_set_trx_fir_en_dis (struct ad9361_rf_phy *phy, uint8_t en_dis) |
int32_t | ad9361_set_trx_rate_gov (struct ad9361_rf_phy *phy, uint32_t rate_gov) |
int32_t | ad9361_get_trx_rate_gov (struct ad9361_rf_phy *phy, uint32_t *rate_gov) |
int32_t | ad9361_do_calib (struct ad9361_rf_phy *phy, uint32_t cal, int32_t arg) |
int32_t | ad9361_trx_load_enable_fir (struct ad9361_rf_phy *phy, AD9361_RXFIRConfig rx_fir_cfg, AD9361_TXFIRConfig tx_fir_cfg) |
int32_t | ad9361_do_dcxo_tune_coarse (struct ad9361_rf_phy *phy, uint32_t coarse) |
int32_t | ad9361_do_dcxo_tune_fine (struct ad9361_rf_phy *phy, uint32_t fine) |
int32_t | ad9361_get_temperature (struct ad9361_rf_phy *phy, int32_t *temp) |
Header file of AD9361 API Driver.
Copyright 2013(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define A_BALANCED 0 |
#define A_N 3 |
#define A_P 4 |
#define B_BALANCED 1 |
#define B_N 5 |
#define B_P 6 |
#define C_BALANCED 2 |
#define C_N 7 |
#define C_P 8 |
#define DISABLE 0 |
#define ENABLE 1 |
#define EXT_LO 1 |
#define HIGHEST_OSR 0 |
#define INT_LO 0 |
#define MODE_1x1 1 |
#define MODE_2x2 2 |
#define NOMINAL_OSR 1 |
#define OFF 1 |
#define ON 0 |
#define RX1 0 |
#define RX2 1 |
#define TX1 0 |
#define TX2 1 |
#define TX_MON1 9 |
#define TX_MON1_2 11 |
#define TX_MON2 10 |
#define TXA 0 |
#define TXB 1 |
enum ad9361_ensm_mode |
int32_t ad9361_do_calib | ( | struct ad9361_rf_phy * | phy, |
uint32_t | cal, | ||
int32_t | arg | ||
) |
Perform the selected calibration.
phy | The AD9361 state structure. |
cal | The selected calibration (TX_QUAD_CAL, RFDC_CAL). Accepted values: TX_QUAD_CAL RFDC_CAL |
arg | For TX_QUAD_CAL - the optional RX phase value overwrite (set to zero). |
Note: This function will/may affect the data path.
int32_t ad9361_do_dcxo_tune_coarse | ( | struct ad9361_rf_phy * | phy, |
uint32_t | coarse | ||
) |
Do DCXO coarse tuning.
phy | The AD9361 current state structure. |
coarse | The DCXO coarse tuning value. |
int32_t ad9361_do_dcxo_tune_fine | ( | struct ad9361_rf_phy * | phy, |
uint32_t | fine | ||
) |
Do DCXO fine tuning.
phy | The AD9361 current state structure. |
fine | The DCXO fine tuning value. |
int32_t ad9361_do_mcs | ( | struct ad9361_rf_phy * | phy_master, |
struct ad9361_rf_phy * | phy_slave | ||
) |
Do multi chip synchronization.
phy_master | The AD9361 Master state structure. |
phy_slave | The AD9361 Slave state structure. |
Note: This function will/may affect the data path.
int32_t ad9361_get_en_state_machine_mode | ( | struct ad9361_rf_phy * | phy, |
uint32_t * | mode | ||
) |
Get the Enable State Machine (ENSM) mode.
phy | The AD9361 current state structure. |
mode | A variable to store the selected ENSM mode. |
int32_t ad9361_get_rx_bbdc_track_en_dis | ( | struct ad9361_rf_phy * | phy, |
uint8_t * | en_dis | ||
) |
Get the status of the RX BasebandDC Tracking.
phy | The AD9361 current state structure. |
en_dis | The enable/disable status buffer. |
int32_t ad9361_get_rx_fir_config | ( | struct ad9361_rf_phy * | phy, |
uint8_t | rx_ch, | ||
AD9361_RXFIRConfig * | fir_cfg | ||
) |
Get the RX FIR filter configuration.
phy | The AD9361 current state structure. |
rx_ch | The selected RX channel (RX1, RX2). Accepted values: RX1 (0) RX2 (1) |
fir_cfg | FIR filter configuration output file. |
int32_t ad9361_get_rx_fir_en_dis | ( | struct ad9361_rf_phy * | phy, |
uint8_t * | en_dis | ||
) |
Get the status of the RX FIR filter.
phy | The AD9361 current state structure. |
en_dis | The enable/disable status buffer. |
int32_t ad9361_get_rx_gain_control_mode | ( | struct ad9361_rf_phy * | phy, |
uint8_t | ch, | ||
uint8_t * | gc_mode | ||
) |
Get the gain control mode for the selected channel.
phy | The AD9361 current state structure. |
ch | The desired channel (RX1, RX2). Accepted values: RX1 (0) RX2 (1) |
gc_mode | A variable to store the gain control mode. |
int32_t ad9361_get_rx_lo_freq | ( | struct ad9361_rf_phy * | phy, |
uint64_t * | lo_freq_hz | ||
) |
Get current RX LO frequency.
phy | The AD9361 current state structure. |
lo_freq_hz | A variable to store the frequency value (Hz). |
int32_t ad9361_get_rx_lo_power | ( | struct ad9361_rf_phy * | phy, |
uint8_t * | option | ||
) |
Get the RX Local Oscillator power status.
phy | The AD9361 state structure. |
option | Store the option (ON, OFF). |
int32_t ad9361_get_rx_quad_track_en_dis | ( | struct ad9361_rf_phy * | phy, |
uint8_t * | en_dis | ||
) |
Get the status of the RX Quadrature Tracking.
phy | The AD9361 current state structure. |
en_dis | The enable/disable status buffer. |
int32_t ad9361_get_rx_rf_bandwidth | ( | struct ad9361_rf_phy * | phy, |
uint32_t * | bandwidth_hz | ||
) |
Get the RX RF bandwidth.
phy | The AD9361 current state structure. |
bandwidth_hz | A variable to store the bandwidth value (Hz). |
int32_t ad9361_get_rx_rf_gain | ( | struct ad9361_rf_phy * | phy, |
uint8_t | ch, | ||
int32_t * | gain_db | ||
) |
Get current receive RF gain for the selected channel.
phy | The AD9361 current state structure. |
ch | The desired channel number (RX1, RX2). Accepted values in 2x2 mode: RX1 (0) RX2 (1) Accepted values in 1x1 mode: RX1 (0) |
gain_db | A variable to store the RF gain (dB). |
int32_t ad9361_get_rx_rf_port_input | ( | struct ad9361_rf_phy * | phy, |
uint32_t * | mode | ||
) |
Get the selected RX RF input port.
phy | The AD9361 current state structure. |
mode | The RF port. |
int32_t ad9361_get_rx_rfdc_track_en_dis | ( | struct ad9361_rf_phy * | phy, |
uint8_t * | en_dis | ||
) |
Get the status of the RX RFDC Tracking.
phy | The AD9361 current state structure. |
en_dis | The enable/disable status buffer. |
int32_t ad9361_get_rx_rssi | ( | struct ad9361_rf_phy * | phy, |
uint8_t | ch, | ||
struct rf_rssi * | rssi | ||
) |
Get the RSSI for the selected channel.
phy | The AD9361 current state structure. |
ch | The desired channel (RX1, RX2). Accepted values in 2x2 mode: RX1 (0) RX2 (1) Accepted values in 1x1 mode: RX1 (0) |
rssi | A variable to store the RSSI. |
int32_t ad9361_get_rx_sampling_freq | ( | struct ad9361_rf_phy * | phy, |
uint32_t * | sampling_freq_hz | ||
) |
Get current RX sampling frequency.
phy | The AD9361 current state structure. |
sampling_freq_hz | A variable to store the frequency value (Hz). |
int32_t ad9361_get_temperature | ( | struct ad9361_rf_phy * | phy, |
int32_t * | temp | ||
) |
Get the temperature.
phy | The AD9361 current state structure. |
temp | The temperature (degrees C * 1000). |
int32_t ad9361_get_trx_path_clks | ( | struct ad9361_rf_phy * | phy, |
uint32_t * | rx_path_clks, | ||
uint32_t * | tx_path_clks | ||
) |
Get the RX and TX path rates.
phy | The AD9361 state structure. |
rx_path_clks | RX path rates buffer. |
tx_path_clks | TX path rates buffer. |
int32_t ad9361_get_trx_rate_gov | ( | struct ad9361_rf_phy * | phy, |
uint32_t * | rate_gov | ||
) |
Get the OSR rate governor.
phy | The AD9361 current state structure. |
rate_gov | Option buffer. |
int32_t ad9361_get_tx_attenuation | ( | struct ad9361_rf_phy * | phy, |
uint8_t | ch, | ||
uint32_t * | attenuation_mdb | ||
) |
Get current transmit attenuation for the selected channel.
phy | The AD9361 current state structure. |
ch | The desired channel number (TX1, TX2). Accepted values in 2x2 mode: TX1 (0) TX2 (1) Accepted values in 1x1 mode: TX1 (0) |
attenuation_mdb | A variable to store the attenuation value (mdB). |
int32_t ad9361_get_tx_auto_cal_en_dis | ( | struct ad9361_rf_phy * | phy, |
uint8_t * | en_dis | ||
) |
Get the status of the auto calibration flag.
phy | The AD9361 current state structure. |
en_dis | The enable/disable status buffer. |
int32_t ad9361_get_tx_fir_config | ( | struct ad9361_rf_phy * | phy, |
uint8_t | tx_ch, | ||
AD9361_TXFIRConfig * | fir_cfg | ||
) |
Get the TX FIR filter configuration.
phy | The AD9361 current state structure. |
tx_ch | The selected TX channel (TX1, TX2). Accepted values: TX1 (0) TX2 (1) |
fir_cfg | FIR filter configuration output file. |
int32_t ad9361_get_tx_fir_en_dis | ( | struct ad9361_rf_phy * | phy, |
uint8_t * | en_dis | ||
) |
Get the status of the TX FIR filter.
phy | The AD9361 current state structure. |
en_dis | The enable/disable status buffer. |
int32_t ad9361_get_tx_lo_freq | ( | struct ad9361_rf_phy * | phy, |
uint64_t * | lo_freq_hz | ||
) |
Get current TX LO frequency.
phy | The AD9361 current state structure. |
lo_freq_hz | A variable to store the frequency value (Hz). |
int32_t ad9361_get_tx_lo_power | ( | struct ad9361_rf_phy * | phy, |
uint8_t * | option | ||
) |
Get the TX Local Oscillator power status.
phy | The AD9361 state structure. |
option | Store the option (ON, OFF). |
int32_t ad9361_get_tx_rf_bandwidth | ( | struct ad9361_rf_phy * | phy, |
uint32_t * | bandwidth_hz | ||
) |
Get the TX RF bandwidth.
phy | The AD9361 current state structure. |
bandwidth_hz | A variable to store the bandwidth value (Hz). |
int32_t ad9361_get_tx_rf_port_output | ( | struct ad9361_rf_phy * | phy, |
uint32_t * | mode | ||
) |
Get the selected TX RF output port.
phy | The AD9361 current state structure. |
mode | The RF port. |
int32_t ad9361_get_tx_rssi | ( | struct ad9361_rf_phy * | phy, |
uint8_t | ch, | ||
uint32_t * | rssi_db_x_1000 | ||
) |
Get the TX RSSI for the selected channel (TX_MON should be enabled).
phy | The AD9361 current state structure. |
ch | The desired channel (TX1, TX2). Accepted values: TX1 (0) TX2 (1) |
rssi_db_x_1000 | A variable to store the RSSI. |
int32_t ad9361_get_tx_sampling_freq | ( | struct ad9361_rf_phy * | phy, |
uint32_t * | sampling_freq_hz | ||
) |
Get current TX sampling frequency.
phy | The AD9361 current state structure. |
sampling_freq_hz | A variable to store the frequency value (Hz). |
int32_t ad9361_init | ( | struct ad9361_rf_phy ** | ad9361_phy, |
AD9361_InitParam * | init_param | ||
) |
Initialize the AD9361 part.
ad9361_phy | The AD9361 device structure. |
init_param | The structure that contains the AD9361 initial parameters. |
Note: This function will/may affect the data path.
int32_t ad9361_remove | ( | struct ad9361_rf_phy * | phy | ) |
Free the allocated resources.
phy | The AD9361 current state structure. |
int32_t ad9361_rx_fastlock_load | ( | struct ad9361_rf_phy * | phy, |
uint32_t | profile, | ||
uint8_t * | values | ||
) |
Load RX fastlock profile. A previously saved profile can be loaded in any of the 8 available slots.
phy | The AD9361 state structure. |
profile | The profile number (0 - 7). Accepted values: 0 - 7 |
values | Fastlock profile program data. Example: val0,val1,val2, ,val15 |
int32_t ad9361_rx_fastlock_recall | ( | struct ad9361_rf_phy * | phy, |
uint32_t | profile | ||
) |
Recall specified RX fastlock profile. When in fastlock pin select mode (init_param->rx_fastlock_pincontrol_enable), the function needs to be called before then the pin-control can be used.
phy | The AD9361 state structure. |
profile | The profile number (0 - 7). Accepted values: 0 - 7 |
int32_t ad9361_rx_fastlock_save | ( | struct ad9361_rf_phy * | phy, |
uint32_t | profile, | ||
uint8_t * | values | ||
) |
Save RX fastlock profile. In order to use more than 8 Profiles, an existing profile can be read back and stored by the user application.
phy | The AD9361 state structure. |
profile | The profile number (0 - 7). Accepted values: 0 - 7 |
values | Fastlock profile program data. |
int32_t ad9361_rx_fastlock_store | ( | struct ad9361_rf_phy * | phy, |
uint32_t | profile | ||
) |
Store RX fastlock profile. To create a profile tune the synthesizer (ad9361_set_rx_lo_freq()) and then call this function specifying the target profile number.
phy | The AD9361 state structure. |
profile | The profile number (0 - 7). Accepted values: 0 - 7 |
int32_t ad9361_rx_lo_powerdown | ( | struct ad9361_rf_phy * | phy, |
uint8_t | option | ||
) |
Power down the RX Local Oscillator.
phy | The AD9361 state structure. |
option | The option (ON, OFF). Accepted values: ON (0) OFF (1) |
int32_t ad9361_set_en_state_machine_mode | ( | struct ad9361_rf_phy * | phy, |
uint32_t | mode | ||
) |
Set the Enable State Machine (ENSM) mode.
phy | The AD9361 current state structure. |
mode | The ENSM mode. Accepted values: ENSM_MODE_TX ENSM_MODE_RX ENSM_MODE_ALERT ENSM_MODE_FDD ENSM_MODE_WAIT ENSM_MODE_SLEEP ENSM_MODE_PINCTRL ENSM_MODE_PINCTRL_FDD_INDEP |
Note: This function will/may affect the data path.
int32_t ad9361_set_no_ch_mode | ( | struct ad9361_rf_phy * | phy, |
uint8_t | no_ch_mode | ||
) |
Set the number of channels mode.
phy | The AD9361 state structure. Note: This function also resets the device, some additional configurations might be necessary |
no_ch_mode | Number of channels mode (MODE_1x1, MODE_2x2). Accepted values: MODE_1x1 (1) MODE_2x2 (2) |
int32_t ad9361_set_rx_bbdc_track_en_dis | ( | struct ad9361_rf_phy * | phy, |
uint8_t | en_dis | ||
) |
Enable/disable the RX BasebandDC Tracking.
phy | The AD9361 current state structure. |
en_dis | The option (ENABLE, DISABLE). Accepted values: ENABLE (1) DISABLE (0) |
int32_t ad9361_set_rx_fir_config | ( | struct ad9361_rf_phy * | phy, |
AD9361_RXFIRConfig | fir_cfg | ||
) |
Set the RX FIR filter configuration.
phy | The AD9361 current state structure. |
fir_cfg | FIR filter configuration. |
Note: This function will/may affect the data path.
int32_t ad9361_set_rx_fir_en_dis | ( | struct ad9361_rf_phy * | phy, |
uint8_t | en_dis | ||
) |
Enable/disable the RX FIR filter.
phy | The AD9361 current state structure. |
en_dis | The option (ENABLE, DISABLE). Accepted values: ENABLE (1) DISABLE (0) |
Note: This function will/may affect the data path.
int32_t ad9361_set_rx_gain_control_mode | ( | struct ad9361_rf_phy * | phy, |
uint8_t | ch, | ||
uint8_t | gc_mode | ||
) |
Set the gain control mode for the selected channel.
phy | The AD9361 current state structure. |
ch | The desired channel (RX1, RX2). Accepted values in 2x2 mode: RX1 (0) RX2 (1) Accepted values in 1x1 mode: RX1 (0) |
gc_mode | The gain control mode (manual, fast_attack, slow_attack, hybrid). Accepted values: RF_GAIN_MGC (manual) RF_GAIN_FASTATTACK_AGC (fast_attack) RF_GAIN_SLOWATTACK_AGC (slow_attack) RF_GAIN_HYBRID_AGC (hybrid) |
int32_t ad9361_set_rx_lo_freq | ( | struct ad9361_rf_phy * | phy, |
uint64_t | lo_freq_hz | ||
) |
Set the RX LO frequency.
phy | The AD9361 current state structure. |
lo_freq_hz | The desired frequency (Hz). Example: 2400000000 (2.4 GHz) |
Note: This function will/may affect the data path.
int32_t ad9361_set_rx_lo_int_ext | ( | struct ad9361_rf_phy * | phy, |
uint8_t | int_ext | ||
) |
Switch between internal and external LO.
phy | The AD9361 state structure. |
int_ext | The selected lo (INT_LO, EXT_LO). Accepted values: INT_LO EXT_LO |
int32_t ad9361_set_rx_quad_track_en_dis | ( | struct ad9361_rf_phy * | phy, |
uint8_t | en_dis | ||
) |
Enable/disable the RX Quadrature Tracking.
phy | The AD9361 current state structure. |
en_dis | The option (ENABLE, DISABLE). Accepted values: ENABLE (1) DISABLE (0) |
int32_t ad9361_set_rx_rf_bandwidth | ( | struct ad9361_rf_phy * | phy, |
uint32_t | bandwidth_hz | ||
) |
Set the RX RF bandwidth.
phy | The AD9361 current state structure. |
bandwidth_hz | The desired bandwidth (Hz). Example: 18000000 (18 MHz) |
Note: This function will/may affect the data path.
int32_t ad9361_set_rx_rf_gain | ( | struct ad9361_rf_phy * | phy, |
uint8_t | ch, | ||
int32_t | gain_db | ||
) |
Set the receive RF gain for the selected channel.
phy | The AD9361 current state structure. |
ch | The desired channel number (RX1, RX2). Accepted values in 2x2 mode: RX1 (0) RX2 (1) Accepted values in 1x1 mode: RX1 (0) |
gain_db | The RF gain (dB). Example: 10 (10 dB) |
int32_t ad9361_set_rx_rf_port_input | ( | struct ad9361_rf_phy * | phy, |
uint32_t | mode | ||
) |
Set the RX RF input port.
phy | The AD9361 current state structure. |
mode | The RF port. Accepted values: A_BALANCED (0 - (RX1A_N & RX1A_P) and (RX2A_N & RX2A_P) enabled; balanced) B_BALANCED (1 - (RX1B_N & RX1B_P) and (RX2B_N & RX2B_P) enabled; balanced) C_BALANCED (2 - (RX1C_N & RX1C_P) and (RX2C_N & RX2C_P) enabled; balanced) A_N (3 - RX1A_N and RX2A_N enabled; unbalanced) A_P (4 - RX1A_P and RX2A_P enabled; unbalanced) B_N (5 - RX1B_N and RX2B_N enabled; unbalanced) B_P (6 - RX1B_P and RX2B_P enabled; unbalanced) C_N (7 - RX1C_N and RX2C_N enabled; unbalanced) C_P (8 - RX1C_P and RX2C_P enabled; unbalanced) TX_MON1 (9 - TX_MONITOR1) TX_MON2 (10 - TX_MONITOR2) TX_MON1_2 (11 - TX_MONITOR1 & TX_MONITOR2) |
int32_t ad9361_set_rx_rfdc_track_en_dis | ( | struct ad9361_rf_phy * | phy, |
uint8_t | en_dis | ||
) |
Enable/disable the RX RFDC Tracking.
phy | The AD9361 current state structure. |
en_dis | The option (ENABLE, DISABLE). Accepted values: ENABLE (1) DISABLE (0) |
int32_t ad9361_set_rx_sampling_freq | ( | struct ad9361_rf_phy * | phy, |
uint32_t | sampling_freq_hz | ||
) |
Set the RX sampling frequency.
phy | The AD9361 current state structure. |
sampling_freq_hz | The desired frequency (Hz). Example: 30720000 (30.72 MHz) |
Note: This function will/may affect the data path.
int32_t ad9361_set_trx_fir_en_dis | ( | struct ad9361_rf_phy * | phy, |
uint8_t | en_dis | ||
) |
Enable/disable the TRX FIR filters.
phy | The AD9361 current state structure. |
en_dis | The option (ENABLE, DISABLE). Accepted values: ENABLE (1) DISABLE (0) |
Note: This function will/may affect the data path.
int32_t ad9361_set_trx_path_clks | ( | struct ad9361_rf_phy * | phy, |
uint32_t * | rx_path_clks, | ||
uint32_t * | tx_path_clks | ||
) |
Set the RX and TX path rates.
phy | The AD9361 state structure. |
rx_path_clks | RX path rates buffer. |
tx_path_clks | TX path rates buffer. |
Note: This function will/may affect the data path.
int32_t ad9361_set_trx_rate_gov | ( | struct ad9361_rf_phy * | phy, |
uint32_t | rate_gov | ||
) |
Set the OSR rate governor.
phy | The AD9361 current state structure. |
rate_gov | OSR rate governor (highest, nominal). Accepted values: HIGHEST_OSR (0 - highest OSR) NOMINAL_OSR (1 - nominal) |
int32_t ad9361_set_tx_attenuation | ( | struct ad9361_rf_phy * | phy, |
uint8_t | ch, | ||
uint32_t | attenuation_mdb | ||
) |
Set the transmit attenuation for the selected channel.
phy | The AD9361 current state structure. |
ch | The desired channel number (TX1, TX2). Accepted values in 2x2 mode: TX1 (0) TX2 (1) Accepted values in 1x1 mode: TX1 (0) |
attenuation_mdb | The attenuation (mdB). Example: 10000 (10 dB) |
int32_t ad9361_set_tx_auto_cal_en_dis | ( | struct ad9361_rf_phy * | phy, |
uint8_t | en_dis | ||
) |
Enable/disable the auto calibration.
phy | The AD9361 current state structure. |
en_dis | The option (ENABLE, DISABLE). Accepted values: ENABLE (1) DISABLE (0) |
int32_t ad9361_set_tx_fir_config | ( | struct ad9361_rf_phy * | phy, |
AD9361_TXFIRConfig | fir_cfg | ||
) |
Set the TX FIR filter configuration.
phy | The AD9361 current state structure. |
fir_cfg | FIR filter configuration. |
Note: This function will/may affect the data path.
int32_t ad9361_set_tx_fir_en_dis | ( | struct ad9361_rf_phy * | phy, |
uint8_t | en_dis | ||
) |
Enable/disable the TX FIR filter.
phy | The AD9361 current state structure. |
en_dis | The option (ENABLE, DISABLE). Accepted values: ENABLE (1) DISABLE (0) |
Note: This function will/may affect the data path.
int32_t ad9361_set_tx_lo_freq | ( | struct ad9361_rf_phy * | phy, |
uint64_t | lo_freq_hz | ||
) |
Set the TX LO frequency.
phy | The AD9361 current state structure. |
lo_freq_hz | The desired frequency (Hz). Example: 2400000000 (2.4 GHz) |
Note: This function will/may affect the data path.
int32_t ad9361_set_tx_lo_int_ext | ( | struct ad9361_rf_phy * | phy, |
uint8_t | int_ext | ||
) |
Switch between internal and external LO.
phy | The AD9361 state structure. |
int_ext | The selected lo (INT_LO, EXT_LO). Accepted values: INT_LO EXT_LO |
int32_t ad9361_set_tx_rf_bandwidth | ( | struct ad9361_rf_phy * | phy, |
uint32_t | bandwidth_hz | ||
) |
Set the TX RF bandwidth.
phy | The AD9361 current state structure. |
bandwidth_hz | The desired bandwidth (Hz). Example: 18000000 (18 MHz) |
Note: This function will/may affect the data path.
int32_t ad9361_set_tx_rf_port_output | ( | struct ad9361_rf_phy * | phy, |
uint32_t | mode | ||
) |
Set the TX RF output port.
phy | The AD9361 current state structure. |
mode | The RF port. Accepted values: TXA (0) TXB (1) |
int32_t ad9361_set_tx_sampling_freq | ( | struct ad9361_rf_phy * | phy, |
uint32_t | sampling_freq_hz | ||
) |
Set the TX sampling frequency.
phy | The AD9361 current state structure. |
sampling_freq_hz | The desired frequency (Hz). Example: 30720000 (30.72 MHz) |
Note: This function will/may affect the data path.
int32_t ad9361_trx_load_enable_fir | ( | struct ad9361_rf_phy * | phy, |
AD9361_RXFIRConfig | rx_fir_cfg, | ||
AD9361_TXFIRConfig | tx_fir_cfg | ||
) |
Load and enable TRX FIR filters configurations.
phy | The AD9361 current state structure. |
rx_fir_cfg | RX FIR filter configuration. |
tx_fir_cfg | TX FIR filter configuration. |
Note: This function will/may affect the data path.
int32_t ad9361_tx_fastlock_load | ( | struct ad9361_rf_phy * | phy, |
uint32_t | profile, | ||
uint8_t * | values | ||
) |
Load TX fastlock profile. A previously saved profile can be loaded in any of the 8 available slots.
phy | The AD9361 state structure. |
profile | The profile number (0 - 7). Accepted values: 0 - 7 |
values | Fastlock profile program data. Example: val0,val1,val2, ,val15 |
int32_t ad9361_tx_fastlock_recall | ( | struct ad9361_rf_phy * | phy, |
uint32_t | profile | ||
) |
Recall specified TX fastlock profile. When in fastlock pin select mode (init_param->tx_fastlock_pincontrol_enable), the function needs to be called before then the pin-control can be used.
phy | The AD9361 state structure. |
profile | The profile number (0 - 7). Accepted values: 0 - 7 |
int32_t ad9361_tx_fastlock_save | ( | struct ad9361_rf_phy * | phy, |
uint32_t | profile, | ||
uint8_t * | values | ||
) |
Save TX fastlock profile. In order to use more than 8 Profiles, an existing profile can be read back and stored by the user application.
phy | The AD9361 state structure. |
profile | The profile number (0 - 7). Accepted values: 0 - 7 |
values | Fastlock profile program data. |
int32_t ad9361_tx_fastlock_store | ( | struct ad9361_rf_phy * | phy, |
uint32_t | profile | ||
) |
Store TX fastlock profile. To create a profile tune the synthesizer (ad9361_set_tx_lo_freq()) and then call this function specifying the target profile number.
phy | The AD9361 state structure. |
profile | The profile number (0 - 7). Accepted values: 0 - 7 |
int32_t ad9361_tx_lo_powerdown | ( | struct ad9361_rf_phy * | phy, |
uint8_t | option | ||
) |
Power down the TX Local Oscillator.
phy | The AD9361 state structure. |
option | The option (ON, OFF). Accepted values: ON (0) OFF (1) |