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.

All rights reserved.

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 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, 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.