no-OS
Classes | Macros | Functions
ad9680.h File Reference

Header file of AD9680 Driver. More...

#include <stdint.h>
#include "no_os_delay.h"
#include "no_os_spi.h"
Include dependency graph for ad9680.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ad9680_dev
 
struct  ad9680_init_param
 

Macros

#define AD9680_REG_INTERFACE_CONF_A   0x000
 
#define AD9680_REG_INTERFACE_CONF_B   0x001
 
#define AD9680_REG_CHIP_ID_LOW   0x004
 
#define AD9680_REG_CHIP_ID_HIGH   0x005
 
#define AD9680_REG_DEVICE_INDEX   0x008
 
#define AD9680_REG_CHIP_DEC_RATIO   0x201
 
#define AD9680_REG_ADC_TEST_MODE   0x550
 
#define AD9680_REG_OUTPUT_MODE   0x561
 
#define AD9680_REG_LINK_CONTROL   0x571
 
#define AD9680_REG_JESD204B_LANE_RATE_CTRL   0x56e
 
#define AD9680_REG_JESD204B_PLL_LOCK_STATUS   0x56f
 
#define AD9680_REG_JESD204B_QUICK_CONFIG   0x570
 
#define AD9680_REG_JESD204B_MF_CTRL   0x58d
 
#define AD9680_REG_JESD204B_CSN_CONFIG   0x58f
 
#define AD9680_REG_JESD204B_SUBCLASS_CONFIG   0x590
 
#define AD9680_REG_JESD204B_LANE_SERD_OUT0_ASSIGN   0x5b2
 
#define AD9680_REG_JESD204B_LANE_SERD_OUT1_ASSIGN   0x5b3
 
#define AD9680_REG_JESD204B_LANE_SERD_OUT2_ASSIGN   0x5b5
 
#define AD9680_REG_JESD204B_LANE_SERD_OUT3_ASSIGN   0x5b6
 
#define AD9680_CHIP_ID   0x0C5
 
#define AD9680_TEST_OFF   0x000
 
#define AD9680_TEST_PN9   0x006
 
#define AD9680_TEST_PN23   0x005
 
#define AD9680_TEST_RAMP   0x00f
 
#define AD9680_FORMAT_2S_COMPLEMENT   0x001
 
#define AD9680_FORMAT_OFFSET_BINARY   0x000
 

Functions

int32_t ad9680_spi_read (struct ad9680_dev *dev, uint16_t reg_addr, uint8_t *reg_data)
 ad9680_spi_read More...
 
int32_t ad9680_spi_write (struct ad9680_dev *dev, uint16_t reg_addr, uint8_t reg_data)
 ad9680_spi_write More...
 
int32_t ad9680_setup (struct ad9680_dev **device, const struct ad9680_init_param *init_param)
 ad9680_setup More...
 
int32_t ad9680_remove (struct ad9680_dev *dev)
 Free the resources allocated by ad9680_setup(). More...
 
int32_t ad9680_test (struct ad9680_dev *dev, uint32_t test_mode)
 ad9680_setup More...
 

Detailed Description

Header file of AD9680 Driver.

Author
DBogdan (drago.nosp@m.s.bo.nosp@m.gdan@.nosp@m.anal.nosp@m.og.co.nosp@m.m)

Copyright 2014-2016(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

◆ AD9680_CHIP_ID

#define AD9680_CHIP_ID   0x0C5

◆ AD9680_FORMAT_2S_COMPLEMENT

#define AD9680_FORMAT_2S_COMPLEMENT   0x001

◆ AD9680_FORMAT_OFFSET_BINARY

#define AD9680_FORMAT_OFFSET_BINARY   0x000

◆ AD9680_REG_ADC_TEST_MODE

#define AD9680_REG_ADC_TEST_MODE   0x550

◆ AD9680_REG_CHIP_DEC_RATIO

#define AD9680_REG_CHIP_DEC_RATIO   0x201

◆ AD9680_REG_CHIP_ID_HIGH

#define AD9680_REG_CHIP_ID_HIGH   0x005

◆ AD9680_REG_CHIP_ID_LOW

#define AD9680_REG_CHIP_ID_LOW   0x004

◆ AD9680_REG_DEVICE_INDEX

#define AD9680_REG_DEVICE_INDEX   0x008

◆ AD9680_REG_INTERFACE_CONF_A

#define AD9680_REG_INTERFACE_CONF_A   0x000

◆ AD9680_REG_INTERFACE_CONF_B

#define AD9680_REG_INTERFACE_CONF_B   0x001

◆ AD9680_REG_JESD204B_CSN_CONFIG

#define AD9680_REG_JESD204B_CSN_CONFIG   0x58f

◆ AD9680_REG_JESD204B_LANE_RATE_CTRL

#define AD9680_REG_JESD204B_LANE_RATE_CTRL   0x56e

◆ AD9680_REG_JESD204B_LANE_SERD_OUT0_ASSIGN

#define AD9680_REG_JESD204B_LANE_SERD_OUT0_ASSIGN   0x5b2

◆ AD9680_REG_JESD204B_LANE_SERD_OUT1_ASSIGN

#define AD9680_REG_JESD204B_LANE_SERD_OUT1_ASSIGN   0x5b3

◆ AD9680_REG_JESD204B_LANE_SERD_OUT2_ASSIGN

#define AD9680_REG_JESD204B_LANE_SERD_OUT2_ASSIGN   0x5b5

◆ AD9680_REG_JESD204B_LANE_SERD_OUT3_ASSIGN

#define AD9680_REG_JESD204B_LANE_SERD_OUT3_ASSIGN   0x5b6

◆ AD9680_REG_JESD204B_MF_CTRL

#define AD9680_REG_JESD204B_MF_CTRL   0x58d

◆ AD9680_REG_JESD204B_PLL_LOCK_STATUS

#define AD9680_REG_JESD204B_PLL_LOCK_STATUS   0x56f

◆ AD9680_REG_JESD204B_QUICK_CONFIG

#define AD9680_REG_JESD204B_QUICK_CONFIG   0x570

◆ AD9680_REG_JESD204B_SUBCLASS_CONFIG

#define AD9680_REG_JESD204B_SUBCLASS_CONFIG   0x590

◆ AD9680_REG_LINK_CONTROL

#define AD9680_REG_LINK_CONTROL   0x571

◆ AD9680_REG_OUTPUT_MODE

#define AD9680_REG_OUTPUT_MODE   0x561

◆ AD9680_TEST_OFF

#define AD9680_TEST_OFF   0x000

◆ AD9680_TEST_PN23

#define AD9680_TEST_PN23   0x005

◆ AD9680_TEST_PN9

#define AD9680_TEST_PN9   0x006

◆ AD9680_TEST_RAMP

#define AD9680_TEST_RAMP   0x00f

Function Documentation

◆ ad9680_remove()

int32_t ad9680_remove ( struct ad9680_dev dev)

Free the resources allocated by ad9680_setup().

Parameters
dev- The device structure.
Returns
0 in case of success, negative error code otherwise.

◆ ad9680_setup()

int32_t ad9680_setup ( struct ad9680_dev **  device,
const struct ad9680_init_param init_param 
)

ad9680_setup

Here is the caller graph for this function:

◆ ad9680_spi_read()

int32_t ad9680_spi_read ( struct ad9680_dev dev,
uint16_t  reg_addr,
uint8_t *  reg_data 
)

ad9680_spi_read

Here is the caller graph for this function:

◆ ad9680_spi_write()

int32_t ad9680_spi_write ( struct ad9680_dev dev,
uint16_t  reg_addr,
uint8_t  reg_data 
)

ad9680_spi_write

Here is the caller graph for this function:

◆ ad9680_test()

int32_t ad9680_test ( struct ad9680_dev dev,
uint32_t  test_mode 
)

ad9680_setup

Here is the caller graph for this function: