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

Header file of AD9739A Driver. More...

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

Go to the source code of this file.

Classes

struct  ad9739a_dev
 
struct  ad9739a_init_param
 Driver Initialization parameters. More...
 

Macros

#define AD9739A_READ   (1 << 7)
 
#define AD9739A_WRITE   (0 << 7)
 
#define AD9739A_REG_MODE   0x00
 
#define AD9739A_REG_POWER_DOWN   0x01
 
#define AD9739A_REG_CNT_CLK_DIS   0x02
 
#define AD9739A_REG_IRQ_EN   0x03
 
#define AD9739A_REG_IRQ_REQ   0x04
 
#define AD9739A_REG_FSC_1   0x06
 
#define AD9739A_REG_FSC_2   0x07
 
#define AD9739A_REG_DEC_CNT   0x08
 
#define AD9739A_REG_LVDS_STAT1   0x0C
 
#define AD9739A_REG_LVDS_REC_CNT1   0x10
 
#define AD9739A_REG_LVDS_REC_CNT2   0x11
 
#define AD9739A_REG_LVDS_REC_CNT3   0x12
 
#define AD9739A_REG_LVDS_REC_CNT4   0x13
 
#define AD9739A_REG_LVDS_REC_CNT5   0x14
 
#define AD9739A_REG_LVDS_REC_STAT1   0x19
 
#define AD9739A_REG_LVDS_REC_STAT2   0x1A
 
#define AD9739A_REG_LVDS_REC_STAT3   0x1B
 
#define AD9739A_REG_LVDS_REC_STAT4   0x1C
 
#define AD9739A_REG_LVDS_REC_STAT9   0x21
 
#define AD9739A_REG_CROSS_CNT1   0x22
 
#define AD9739A_REG_CROSS_CNT2   0x23
 
#define AD9739A_REG_PHS_DET   0x24
 
#define AD9739A_REG_MU_DUTY   0x25
 
#define AD9739A_REG_MU_CNT1   0x26
 
#define AD9739A_REG_MU_CNT2   0x27
 
#define AD9739A_REG_MU_CNT3   0x28
 
#define AD9739A_REG_MU_CNT4   0x29
 
#define AD9739A_REG_MU_STAT1   0x2A
 
#define AD9739A_REG_PART_ID   0x35
 
#define AD9739A_CHIP_ID   0x24
 
#define AD9739A_MODE_SDIO_DIR   ((1 << 7) | (1 << 0))
 
#define AD9739A_MODE_LSB   ((1 << 6) | (1 << 1))
 
#define AD9739A_MODE_RESET   ((1 << 5) | (1 << 2))
 
#define AD9739A_POWER_DOWN_LVDS_DRVR_PD   (1 << 5)
 
#define AD9739A_POWER_DOWN_LVDS_RCVR_PD   (1 << 4)
 
#define AD9739A_POWER_DOWN_CLK_RCVR_PD   (1 << 1)
 
#define AD9739A_POWER_DOWN_DAC_BIAS_PD   (1 << 0)
 
#define AD9739A_CNT_CLK_DIS_CLKGEN_PD   (1 << 3)
 
#define AD9739A_CNT_CLK_DIS_REC_CNT_CLK   (1 << 1)
 
#define AD9739A_CNT_CLK_DIS_MU_CNT_CLK   (1 << 0)
 
#define AD9739A_IRQ_EN_MU_LST_EN   (1 << 3)
 
#define AD9739A_IRQ_EN_MU_LCK_EN   (1 << 2)
 
#define AD9739A_IRQ_EN_RCV_LST_EN   (1 << 1)
 
#define AD9739A_IRQ_EN_RCV_LCK_EN   (1 << 0)
 
#define AD9739A_IRQ_REQ_MU_LST_IRQ   (1 << 3)
 
#define AD9739A_IRQ_REQ_MU_LCK_IRQ   (1 << 2)
 
#define AD9739A_IRQ_REQ_RCV_LST_IRQ   (1 << 1)
 
#define AD9739A_IRQ_REQ_RCV_LCK_IRQ   (1 << 0)
 
#define AD9739A_FSC_1_FSC_1(x)   (((x) & 0xFF) << 0)
 
#define AD9739A_FSC_2_FSC_2(x)   (((x) & 0x3) << 0)
 
#define AD9739A_FSC_2_Sleep   (1 << 7)
 
#define AD9739A_DEC_CNT_DAC_DEC(x)   (((x) & 0x3) << 0)
 
#define AD9739A_DAC_DEC_NORMAL_BASEBAND   0
 
#define AD9739A_DAC_DEC_MIX_MODE   2
 
#define AD9739A_LVDS_STAT1_DCI_PRE_PH0   (1 << 2)
 
#define AD9739A_LVDS_STAT1_DCI_PST_PH0   (1 << 0)
 
#define AD9739A_LVDS_REC_CNT1_RCVR_FLG_RST   (1 << 2)
 
#define AD9739A_LVDS_REC_CNT1_RCVR_LOOP_ON   (1 << 1)
 
#define AD9739A_LVDS_REC_CNT1_RCVR_CNT_ENA   (1 << 0)
 
#define AD9739A_LVDS_REC_CNT2_SMP_DEL(x)   (((x) & 0x3) << 6)
 
#define AD9739A_LVDS_REC_CNT3_SMP_DEL(x)   (((x) & 0xFF) << 0)
 
#define AD9739A_LVDS_REC_CNT4_DCI_DEL(x)   (((x) & 0xF) << 4)
 
#define AD9739A_LVDS_REC_CNT4_FINE_DEL_SKEW(x)   (((x) & 0xF) << 0)
 
#define AD9739A_LVDS_REC_CNT5_DCI_DEL(x)   (((x) & 0x3F) << 0)
 
#define AD9739A_LVDS_REC_STAT1_SMP_DEL(x)   (((x) & 0x3) << 6)
 
#define AD9739A_LVDS_REC_STAT2_SMP_DEL(x)   (((x) & 0xFF) << 0)
 
#define AD9739A_LVDS_REC_STAT3_DCI_DEL(x)   (((x) & 0x3) << 6)
 
#define AD9739A_LVDS_REC_STAT4_DCI_DEL(x)   (((x) & 0xFF) << 0)
 
#define AD9739A_LVDS_REC_STAT9_RCVR_TRK_ON   (1 << 3)
 
#define AD9739A_LVDS_REC_STAT9_RCVR_FE_ON   (1 << 2)
 
#define AD9739A_LVDS_REC_STAT9_RCVR_LST   (1 << 1)
 
#define AD9739A_LVDS_REC_STAT9_RCVR_LCK   (1 << 0)
 
#define AD9739A_CROSS_CNT1_DIR_P   (1 << 4)
 
#define AD9739A_CROSS_CNT1_CLKP_OFFSET(x)   (((x) & 0xF) << 0)
 
#define AD9739A_CROSS_CNT2_DIR_N   (1 << 4)
 
#define AD9739A_CROSS_CNT2_CLKN_OFFSET(x)   (((x) & 0xF) << 0)
 
#define AD9739A_PHS_DET_CMP_BST   (1 << 5)
 
#define AD9739A_PHS_DET_PHS_DET_AUTO_EN   (1 << 4)
 
#define AD9739A_MU_DUTY_MU_DUTY_AUTO_EN   (1 << 7)
 
#define AD9739A_MU_CNT1_SLOPE   (1 << 6)
 
#define AD9739A_MU_CNT1_MODE(x)   (((x) & 0x3) << 4)
 
#define AD9739A_MU_CNT1_READ   (1 << 3)
 
#define AD9739A_MU_CNT1_GAIN(x)   (((x) & 0x3) << 1)
 
#define AD9739A_MU_CNT1_ENABLE   (1 << 0)
 
#define AD9739A_MU_CNT2_MUDEL   (1 << 7)
 
#define AD9739A_MU_CNT2_SRCH_MODE(x)   ((((x) & 0x3) << 5))
 
#define AD9739A_MU_CNT2_SET_PHS(x)   ((((x) & 0x1F) << 0))
 
#define AD9739A_MU_CNT3_MUDEL(x)   ((((x) & 0xFF) << 0))
 
#define AD9739A_MU_CNT4_SEARCH_TOL   (1 << 7)
 
#define AD9739A_MU_CNT4_RETRY   (1 << 6)
 
#define AD9739A_MU_CNT4_CONTRST   (1 << 5)
 
#define AD9739A_MU_CNT4_GUARD(x)   ((((x) & 0x1F) << 0))
 
#define AD9739A_MU_STAT1_MU_LST   (1 << 1)
 
#define AD9739A_MU_STAT1_MU_LKD   (1 << 0)
 
#define AD9739A_PART_ID_PART_ID(x)   ((((x) & 0xFF) << 0))
 

Functions

int32_t ad9739a_write (struct ad9739a_dev *dev, uint8_t register_address, uint8_t register_value)
 Writes a value to the selected register. More...
 
int32_t ad9739a_read (struct ad9739a_dev *dev, uint8_t register_address, uint8_t *register_value)
 Reads the value of the selected register. More...
 
int32_t ad9739a_reset (struct ad9739a_dev *dev)
 Resets the device. More...
 
int32_t ad9739a_power_down (struct ad9739a_dev *dev, uint8_t pwr_config)
 Powers down LVDS interface and TxDAC. More...
 
int32_t ad9739a_operation_mode (struct ad9739a_dev *dev, uint8_t mode)
 
float ad9739a_dac_fs_current (struct ad9739a_dev *dev, float fs_val)
 Sets the full-scale output current for the DAC. More...
 
int32_t delay_fdata_cycles (uint32_t cycles)
 Delay for a number of fdata clock cycles. More...
 
int32_t ad9739a_setup (struct ad9739a_dev **device, struct ad9739a_init_param init_param)
 Initializes the AD9739A. More...
 
int32_t ad9739a_remove (struct ad9739a_dev *dev)
 Free the resources allocated by ad9739a_setup(). More...
 

Detailed Description

Header file of AD9739A Driver.

Author
Bancisor Mihai

Copyright 2012(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.

SVN Revision: $WCREV$

Macro Definition Documentation

◆ AD9739A_CHIP_ID

#define AD9739A_CHIP_ID   0x24

◆ AD9739A_CNT_CLK_DIS_CLKGEN_PD

#define AD9739A_CNT_CLK_DIS_CLKGEN_PD   (1 << 3)

◆ AD9739A_CNT_CLK_DIS_MU_CNT_CLK

#define AD9739A_CNT_CLK_DIS_MU_CNT_CLK   (1 << 0)

◆ AD9739A_CNT_CLK_DIS_REC_CNT_CLK

#define AD9739A_CNT_CLK_DIS_REC_CNT_CLK   (1 << 1)

◆ AD9739A_CROSS_CNT1_CLKP_OFFSET

#define AD9739A_CROSS_CNT1_CLKP_OFFSET (   x)    (((x) & 0xF) << 0)

◆ AD9739A_CROSS_CNT1_DIR_P

#define AD9739A_CROSS_CNT1_DIR_P   (1 << 4)

◆ AD9739A_CROSS_CNT2_CLKN_OFFSET

#define AD9739A_CROSS_CNT2_CLKN_OFFSET (   x)    (((x) & 0xF) << 0)

◆ AD9739A_CROSS_CNT2_DIR_N

#define AD9739A_CROSS_CNT2_DIR_N   (1 << 4)

◆ AD9739A_DAC_DEC_MIX_MODE

#define AD9739A_DAC_DEC_MIX_MODE   2

◆ AD9739A_DAC_DEC_NORMAL_BASEBAND

#define AD9739A_DAC_DEC_NORMAL_BASEBAND   0

◆ AD9739A_DEC_CNT_DAC_DEC

#define AD9739A_DEC_CNT_DAC_DEC (   x)    (((x) & 0x3) << 0)

◆ AD9739A_FSC_1_FSC_1

#define AD9739A_FSC_1_FSC_1 (   x)    (((x) & 0xFF) << 0)

◆ AD9739A_FSC_2_FSC_2

#define AD9739A_FSC_2_FSC_2 (   x)    (((x) & 0x3) << 0)

◆ AD9739A_FSC_2_Sleep

#define AD9739A_FSC_2_Sleep   (1 << 7)

◆ AD9739A_IRQ_EN_MU_LCK_EN

#define AD9739A_IRQ_EN_MU_LCK_EN   (1 << 2)

◆ AD9739A_IRQ_EN_MU_LST_EN

#define AD9739A_IRQ_EN_MU_LST_EN   (1 << 3)

◆ AD9739A_IRQ_EN_RCV_LCK_EN

#define AD9739A_IRQ_EN_RCV_LCK_EN   (1 << 0)

◆ AD9739A_IRQ_EN_RCV_LST_EN

#define AD9739A_IRQ_EN_RCV_LST_EN   (1 << 1)

◆ AD9739A_IRQ_REQ_MU_LCK_IRQ

#define AD9739A_IRQ_REQ_MU_LCK_IRQ   (1 << 2)

◆ AD9739A_IRQ_REQ_MU_LST_IRQ

#define AD9739A_IRQ_REQ_MU_LST_IRQ   (1 << 3)

◆ AD9739A_IRQ_REQ_RCV_LCK_IRQ

#define AD9739A_IRQ_REQ_RCV_LCK_IRQ   (1 << 0)

◆ AD9739A_IRQ_REQ_RCV_LST_IRQ

#define AD9739A_IRQ_REQ_RCV_LST_IRQ   (1 << 1)

◆ AD9739A_LVDS_REC_CNT1_RCVR_CNT_ENA

#define AD9739A_LVDS_REC_CNT1_RCVR_CNT_ENA   (1 << 0)

◆ AD9739A_LVDS_REC_CNT1_RCVR_FLG_RST

#define AD9739A_LVDS_REC_CNT1_RCVR_FLG_RST   (1 << 2)

◆ AD9739A_LVDS_REC_CNT1_RCVR_LOOP_ON

#define AD9739A_LVDS_REC_CNT1_RCVR_LOOP_ON   (1 << 1)

◆ AD9739A_LVDS_REC_CNT2_SMP_DEL

#define AD9739A_LVDS_REC_CNT2_SMP_DEL (   x)    (((x) & 0x3) << 6)

◆ AD9739A_LVDS_REC_CNT3_SMP_DEL

#define AD9739A_LVDS_REC_CNT3_SMP_DEL (   x)    (((x) & 0xFF) << 0)

◆ AD9739A_LVDS_REC_CNT4_DCI_DEL

#define AD9739A_LVDS_REC_CNT4_DCI_DEL (   x)    (((x) & 0xF) << 4)

◆ AD9739A_LVDS_REC_CNT4_FINE_DEL_SKEW

#define AD9739A_LVDS_REC_CNT4_FINE_DEL_SKEW (   x)    (((x) & 0xF) << 0)

◆ AD9739A_LVDS_REC_CNT5_DCI_DEL

#define AD9739A_LVDS_REC_CNT5_DCI_DEL (   x)    (((x) & 0x3F) << 0)

◆ AD9739A_LVDS_REC_STAT1_SMP_DEL

#define AD9739A_LVDS_REC_STAT1_SMP_DEL (   x)    (((x) & 0x3) << 6)

◆ AD9739A_LVDS_REC_STAT2_SMP_DEL

#define AD9739A_LVDS_REC_STAT2_SMP_DEL (   x)    (((x) & 0xFF) << 0)

◆ AD9739A_LVDS_REC_STAT3_DCI_DEL

#define AD9739A_LVDS_REC_STAT3_DCI_DEL (   x)    (((x) & 0x3) << 6)

◆ AD9739A_LVDS_REC_STAT4_DCI_DEL

#define AD9739A_LVDS_REC_STAT4_DCI_DEL (   x)    (((x) & 0xFF) << 0)

◆ AD9739A_LVDS_REC_STAT9_RCVR_FE_ON

#define AD9739A_LVDS_REC_STAT9_RCVR_FE_ON   (1 << 2)

◆ AD9739A_LVDS_REC_STAT9_RCVR_LCK

#define AD9739A_LVDS_REC_STAT9_RCVR_LCK   (1 << 0)

◆ AD9739A_LVDS_REC_STAT9_RCVR_LST

#define AD9739A_LVDS_REC_STAT9_RCVR_LST   (1 << 1)

◆ AD9739A_LVDS_REC_STAT9_RCVR_TRK_ON

#define AD9739A_LVDS_REC_STAT9_RCVR_TRK_ON   (1 << 3)

◆ AD9739A_LVDS_STAT1_DCI_PRE_PH0

#define AD9739A_LVDS_STAT1_DCI_PRE_PH0   (1 << 2)

◆ AD9739A_LVDS_STAT1_DCI_PST_PH0

#define AD9739A_LVDS_STAT1_DCI_PST_PH0   (1 << 0)

◆ AD9739A_MODE_LSB

#define AD9739A_MODE_LSB   ((1 << 6) | (1 << 1))

◆ AD9739A_MODE_RESET

#define AD9739A_MODE_RESET   ((1 << 5) | (1 << 2))

◆ AD9739A_MODE_SDIO_DIR

#define AD9739A_MODE_SDIO_DIR   ((1 << 7) | (1 << 0))

◆ AD9739A_MU_CNT1_ENABLE

#define AD9739A_MU_CNT1_ENABLE   (1 << 0)

◆ AD9739A_MU_CNT1_GAIN

#define AD9739A_MU_CNT1_GAIN (   x)    (((x) & 0x3) << 1)

◆ AD9739A_MU_CNT1_MODE

#define AD9739A_MU_CNT1_MODE (   x)    (((x) & 0x3) << 4)

◆ AD9739A_MU_CNT1_READ

#define AD9739A_MU_CNT1_READ   (1 << 3)

◆ AD9739A_MU_CNT1_SLOPE

#define AD9739A_MU_CNT1_SLOPE   (1 << 6)

◆ AD9739A_MU_CNT2_MUDEL

#define AD9739A_MU_CNT2_MUDEL   (1 << 7)

◆ AD9739A_MU_CNT2_SET_PHS

#define AD9739A_MU_CNT2_SET_PHS (   x)    ((((x) & 0x1F) << 0))

◆ AD9739A_MU_CNT2_SRCH_MODE

#define AD9739A_MU_CNT2_SRCH_MODE (   x)    ((((x) & 0x3) << 5))

◆ AD9739A_MU_CNT3_MUDEL

#define AD9739A_MU_CNT3_MUDEL (   x)    ((((x) & 0xFF) << 0))

◆ AD9739A_MU_CNT4_CONTRST

#define AD9739A_MU_CNT4_CONTRST   (1 << 5)

◆ AD9739A_MU_CNT4_GUARD

#define AD9739A_MU_CNT4_GUARD (   x)    ((((x) & 0x1F) << 0))

◆ AD9739A_MU_CNT4_RETRY

#define AD9739A_MU_CNT4_RETRY   (1 << 6)

◆ AD9739A_MU_CNT4_SEARCH_TOL

#define AD9739A_MU_CNT4_SEARCH_TOL   (1 << 7)

◆ AD9739A_MU_DUTY_MU_DUTY_AUTO_EN

#define AD9739A_MU_DUTY_MU_DUTY_AUTO_EN   (1 << 7)

◆ AD9739A_MU_STAT1_MU_LKD

#define AD9739A_MU_STAT1_MU_LKD   (1 << 0)

◆ AD9739A_MU_STAT1_MU_LST

#define AD9739A_MU_STAT1_MU_LST   (1 << 1)

◆ AD9739A_PART_ID_PART_ID

#define AD9739A_PART_ID_PART_ID (   x)    ((((x) & 0xFF) << 0))

◆ AD9739A_PHS_DET_CMP_BST

#define AD9739A_PHS_DET_CMP_BST   (1 << 5)

◆ AD9739A_PHS_DET_PHS_DET_AUTO_EN

#define AD9739A_PHS_DET_PHS_DET_AUTO_EN   (1 << 4)

◆ AD9739A_POWER_DOWN_CLK_RCVR_PD

#define AD9739A_POWER_DOWN_CLK_RCVR_PD   (1 << 1)

◆ AD9739A_POWER_DOWN_DAC_BIAS_PD

#define AD9739A_POWER_DOWN_DAC_BIAS_PD   (1 << 0)

◆ AD9739A_POWER_DOWN_LVDS_DRVR_PD

#define AD9739A_POWER_DOWN_LVDS_DRVR_PD   (1 << 5)

◆ AD9739A_POWER_DOWN_LVDS_RCVR_PD

#define AD9739A_POWER_DOWN_LVDS_RCVR_PD   (1 << 4)

◆ AD9739A_READ

#define AD9739A_READ   (1 << 7)

◆ AD9739A_REG_CNT_CLK_DIS

#define AD9739A_REG_CNT_CLK_DIS   0x02

◆ AD9739A_REG_CROSS_CNT1

#define AD9739A_REG_CROSS_CNT1   0x22

◆ AD9739A_REG_CROSS_CNT2

#define AD9739A_REG_CROSS_CNT2   0x23

◆ AD9739A_REG_DEC_CNT

#define AD9739A_REG_DEC_CNT   0x08

◆ AD9739A_REG_FSC_1

#define AD9739A_REG_FSC_1   0x06

◆ AD9739A_REG_FSC_2

#define AD9739A_REG_FSC_2   0x07

◆ AD9739A_REG_IRQ_EN

#define AD9739A_REG_IRQ_EN   0x03

◆ AD9739A_REG_IRQ_REQ

#define AD9739A_REG_IRQ_REQ   0x04

◆ AD9739A_REG_LVDS_REC_CNT1

#define AD9739A_REG_LVDS_REC_CNT1   0x10

◆ AD9739A_REG_LVDS_REC_CNT2

#define AD9739A_REG_LVDS_REC_CNT2   0x11

◆ AD9739A_REG_LVDS_REC_CNT3

#define AD9739A_REG_LVDS_REC_CNT3   0x12

◆ AD9739A_REG_LVDS_REC_CNT4

#define AD9739A_REG_LVDS_REC_CNT4   0x13

◆ AD9739A_REG_LVDS_REC_CNT5

#define AD9739A_REG_LVDS_REC_CNT5   0x14

◆ AD9739A_REG_LVDS_REC_STAT1

#define AD9739A_REG_LVDS_REC_STAT1   0x19

◆ AD9739A_REG_LVDS_REC_STAT2

#define AD9739A_REG_LVDS_REC_STAT2   0x1A

◆ AD9739A_REG_LVDS_REC_STAT3

#define AD9739A_REG_LVDS_REC_STAT3   0x1B

◆ AD9739A_REG_LVDS_REC_STAT4

#define AD9739A_REG_LVDS_REC_STAT4   0x1C

◆ AD9739A_REG_LVDS_REC_STAT9

#define AD9739A_REG_LVDS_REC_STAT9   0x21

◆ AD9739A_REG_LVDS_STAT1

#define AD9739A_REG_LVDS_STAT1   0x0C

◆ AD9739A_REG_MODE

#define AD9739A_REG_MODE   0x00

◆ AD9739A_REG_MU_CNT1

#define AD9739A_REG_MU_CNT1   0x26

◆ AD9739A_REG_MU_CNT2

#define AD9739A_REG_MU_CNT2   0x27

◆ AD9739A_REG_MU_CNT3

#define AD9739A_REG_MU_CNT3   0x28

◆ AD9739A_REG_MU_CNT4

#define AD9739A_REG_MU_CNT4   0x29

◆ AD9739A_REG_MU_DUTY

#define AD9739A_REG_MU_DUTY   0x25

◆ AD9739A_REG_MU_STAT1

#define AD9739A_REG_MU_STAT1   0x2A

◆ AD9739A_REG_PART_ID

#define AD9739A_REG_PART_ID   0x35

◆ AD9739A_REG_PHS_DET

#define AD9739A_REG_PHS_DET   0x24

◆ AD9739A_REG_POWER_DOWN

#define AD9739A_REG_POWER_DOWN   0x01

◆ AD9739A_WRITE

#define AD9739A_WRITE   (0 << 7)

Function Documentation

◆ ad9739a_dac_fs_current()

float ad9739a_dac_fs_current ( struct ad9739a_dev dev,
float  fs_val 
)

Sets the full-scale output current for the DAC.

Sets the full-scale output current for the DAC.

Parameters
dev- The device structure.
fs_val- The desired full-scale output current. Accepted values: 8.7 to 32.7 (mA) and 0. When fs_val is set to 0 the DAC output is disabled(sleep).
Returns
Returns the actual set full-scale current or negative error code.
Here is the caller graph for this function:

◆ ad9739a_operation_mode()

int32_t ad9739a_operation_mode ( struct ad9739a_dev dev,
uint8_t  mode 
)

Sets the normal baseband mode or mix-mode.

◆ ad9739a_power_down()

int32_t ad9739a_power_down ( struct ad9739a_dev dev,
uint8_t  pwr_config 
)

Powers down LVDS interface and TxDAC.

Powers down LVDS interface and TxDAC.

Parameters
dev- The device structure.
pwr_config- Selects the modules to be powered-down. Example: AD9739A_POWER_DOWN_LVDS_DRVR_PD | AD9739A_POWER_DOWN_LVDS_RCVR_PD
Returns
Returns negative error code or 0 in case of success.

◆ ad9739a_read()

int32_t ad9739a_read ( struct ad9739a_dev dev,
uint8_t  register_address,
uint8_t *  register_value 
)

Reads the value of the selected register.

Reads the value of the selected register.

Parameters
dev- The device structure.
register_address- The address of the register to read.
register_value- The value read from the register.
Returns
registerValue - The register's value or negative error code.
Here is the caller graph for this function:

◆ ad9739a_remove()

int32_t ad9739a_remove ( struct ad9739a_dev dev)

Free the resources allocated by ad9739a_setup().

Free the resources allocated by ad9739a_setup().

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

◆ ad9739a_reset()

int32_t ad9739a_reset ( struct ad9739a_dev dev)

Resets the device.

Resets the device.

Parameters
dev- The device structure.
Returns
Returns negative error code or 0 in case of success.
Here is the caller graph for this function:

◆ ad9739a_setup()

int32_t ad9739a_setup ( struct ad9739a_dev **  device,
struct ad9739a_init_param  init_param 
)

Initializes the AD9739A.

Initializes the AD9739A.

Parameters
device- The device structure.
init_param- The structure that contains the device initial parameters.
Returns
Returns negative error code or 0 in case of success.
Here is the caller graph for this function:

◆ ad9739a_write()

int32_t ad9739a_write ( struct ad9739a_dev dev,
uint8_t  register_address,
uint8_t  register_value 
)

Writes a value to the selected register.

Writes a value to the selected register.

Parameters
dev- The device structure.
register_address- The address of the register to write to.
register_value- The value to write to the register.
Returns
Returns 0 in case of success or negative error code.
Here is the caller graph for this function:

◆ delay_fdata_cycles()

int32_t delay_fdata_cycles ( uint32_t  cycles)

Delay for a number of fdata clock cycles.

Delay for a number of fdata clock cycles.

Parameters
cycles- Number of cycles to wait for.
Returns
Returns negative error code or 0 in case of success.
Here is the caller graph for this function: