no-OS
Macros | Functions
ad9361_conv.c File Reference

Implementation of AD9361 Conv Driver. More...

#include <inttypes.h>
#include <string.h>
#include "ad9361.h"
#include "no_os_delay.h"
#include "ad9361_util.h"
#include "axi_adc_core.h"
#include "app_config.h"
Include dependency graph for ad9361_conv.c:

Macros

#define ADI_REG_ID   0x0004
 
#define PCORE_VERSION(major, minor, letter)   ((major << 16) | (minor << 8) | letter)
 
#define PCORE_VERSION_MAJOR(version)   (version >> 16)
 
#define PCORE_VERSION_MINOR(version)   ((version >> 8) & 0xff)
 
#define PCORE_VERSION_LETTER(version)   (version & 0xff)
 

Functions

int32_t ad9361_hdl_loopback (struct ad9361_rf_phy *phy, bool enable)
 
int32_t ad9361_dig_interface_timing_analysis (struct ad9361_rf_phy *phy, char *buf, int32_t buflen)
 
int32_t ad9361_dig_tune (struct ad9361_rf_phy *phy, uint32_t max_freq, enum dig_tune_flags flags)
 
int32_t ad9361_post_setup (struct ad9361_rf_phy *phy)
 

Detailed Description

Implementation of AD9361 Conv Driver.

Copyright 2014-2015(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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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.

Macro Definition Documentation

◆ ADI_REG_ID

#define ADI_REG_ID   0x0004

◆ PCORE_VERSION

#define PCORE_VERSION (   major,
  minor,
  letter 
)    ((major << 16) | (minor << 8) | letter)

◆ PCORE_VERSION_LETTER

#define PCORE_VERSION_LETTER (   version)    (version & 0xff)

◆ PCORE_VERSION_MAJOR

#define PCORE_VERSION_MAJOR (   version)    (version >> 16)

◆ PCORE_VERSION_MINOR

#define PCORE_VERSION_MINOR (   version)    ((version >> 8) & 0xff)

Function Documentation

◆ ad9361_dig_interface_timing_analysis()

int32_t ad9361_dig_interface_timing_analysis ( struct ad9361_rf_phy phy,
char *  buf,
int32_t  buflen 
)

Digital interface timing analysis.

Parameters
phyThe AD9361 state structure.
bufThe buffer.
buflenThe buffer length.
Returns
The size in case of success, negative error code otherwise.

◆ ad9361_dig_tune()

int32_t ad9361_dig_tune ( struct ad9361_rf_phy phy,
uint32_t  max_freq,
enum dig_tune_flags  flags 
)

Digital tune.

Parameters
phyThe AD9361 state structure.
max_freqMaximum frequency.
flagsFlags: BE_VERBOSE, BE_MOREVERBOSE, DO_IDELAY, DO_ODELAY.
Returns
0 in case of success, negative error code otherwise.
Here is the caller graph for this function:

◆ ad9361_hdl_loopback()

int32_t ad9361_hdl_loopback ( struct ad9361_rf_phy phy,
bool  enable 
)

HDL loopback enable/disable.

Parameters
phyThe AD9361 state structure.
enableEnable/disable option.
Returns
0 in case of success, negative error code otherwise.
Here is the caller graph for this function:

◆ ad9361_post_setup()

int32_t ad9361_post_setup ( struct ad9361_rf_phy phy)

Setup the AD9361 device.

Parameters
phyThe AD9361 state structure.
Returns
0 in case of success, negative error code otherwise.