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

Header file of AD9467 Driver. More...

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

Go to the source code of this file.

Classes

struct  ad9467_dev
 
struct  ad9467_init_param
 

Macros

#define AD9467_READ   (1 << 15)
 
#define AD9467_WRITE   (0 << 15)
 
#define AD9467_CNT(x)   (((x) - 1) << 13)
 
#define AD9467_ADDR(x)   ((x) & 0X1FFF)
 
#define AD9467_REG_CHIP_PORT_CFG   0x00
 
#define AD9467_REG_CHIP_ID   0x01
 
#define AD9467_REG_CHIP_GRADE   0x02
 
#define AD9467_REG_DEVICE_UPDATE   0xFF
 
#define AD9467_REG_MODES   0x08
 
#define AD9467_REG_TEST_IO   0x0D
 
#define AD9467_REG_ADC_INPUT   0x0F
 
#define AD9467_REG_OFFSET   0x10
 
#define AD9467_REG_OUT_MODE   0x14
 
#define AD9467_REG_OUT_ADJ   0x15
 
#define AD9467_REG_OUT_PHASE   0x16
 
#define AD9467_REG_OUT_DELAY   0x17
 
#define AD9467_REG_V_REF   0x18
 
#define AD9467_REG_ANALOG_INPUT   0x2C
 
#define AD9467_REG_BUFF_CURRENT_1   0x36
 
#define AD9467_REG_BUFF_CURRENT_2   0x107
 
#define AD9467_CHIP_PORT_CGF_LSB_FIRST   (1 << 6)
 
#define AD9467_CHIP_PORT_CGF_SOFT_RST   (1 << 5)
 
#define AD9467_CHIP_GRADE_BITS(x)   (((x) & 0x3) << 4)
 
#define AD9467_DEVICE_UPDATE_SW   (1 << 0)
 
#define AD9467_MODES_INT_PD_MODE(x)   (((x) & 0x3) << 0)
 
#define AD9467_TEST_IO_RST_PN_LONG   (1 << 5)
 
#define AD9467_TEST_IO_RST_PN_SHORT   (1 << 4)
 
#define AD9467_TEST_IO_OUT_TEST(x)   (((x) & 0xF) << 0)
 
#define AD9467_ADC_INPUT_XVREF   (1 << 7)
 
#define AD9467_ADC_INPUT_ANALOG_DSCN   (1 << 2)
 
#define AD9467_OUT_MODE_DOUT_DISBL   (1 << 4)
 
#define AD9467_OUT_MODE_OUT_INV   (1 << 2)
 
#define AD9467_OUT_MODE_DATA_FORMAT(x)   (((x) & 0x3) << 0)
 
#define AD9467_OUT_ADJ_LVDS   (1 << 3)
 
#define AD9467_OUT_ADJ_OUT_CURRENT(x)   (((x) & 0x7) << 0)
 
#define AD9467_OUT_PHASE_DCO_INV   (1 << 7)
 
#define AD9467_OUT_DELAY_DCO_DLY_EN   (1 << 7)
 
#define AD9467_OUT_DELAY_OUT_DLY(x)   (((x) & 0x1F) << 0)
 
#define AD9467_V_REF_IN_FS_RANGE(x)   (((x) & 0xF) << 0)
 
#define AD9467_ANALOG_INPUT_COUPLING   (1 << 2)
 
#define AD9467_BUFF_CURRENT_1(x)   (((x) & 0x3F) << 2)
 
#define AD9467_BUFF_CURRENT_2(x)   (((x) & 0x3F) << 2)
 

Functions

int32_t ad9467_setup (struct ad9467_dev **device, struct ad9467_init_param init_param)
 Configures the test mode and the output mode to a default state. More...
 
int32_t ad9467_remove (struct ad9467_dev *dev)
 Free the resources allocated by ad9467_setup(). More...
 
int32_t ad9467_write (struct ad9467_dev *dev, uint16_t reg_addr, uint8_t reg_val)
 Writes data into a register. More...
 
int32_t ad9467_read (struct ad9467_dev *dev, uint16_t reg_addr, uint8_t *reg_val)
 Reads data from a register. More...
 
uint32_t ad9467_set_bits_to_reg (struct ad9467_dev *dev, uint16_t register_address, uint8_t bits_value, uint8_t mask)
 Sets a bit or a group of bits inside a register without modifying the other bits. More...
 
int32_t ad9467_pwr_mode (struct ad9467_dev *dev, int32_t mode, int32_t *ret_mode)
 Configures the power mode. More...
 
int32_t ad9467_test_mode (struct ad9467_dev *dev, int32_t mode, int32_t *ret_mode)
 Sets the ADC's test mode. More...
 
int32_t ad9467_reset_pn9 (struct ad9467_dev *dev, int32_t rst, int32_t *ret_stat)
 Sets (1) or clears (0) the reset short PN sequence bit(PN9). More...
 
int32_t ad9467_reset_pn23 (struct ad9467_dev *dev, int32_t rst, int32_t *ret_stat)
 Sets (1) or clears (0) the reset long PN sequence bit(PN23). More...
 
int32_t ad9467_external_ref (struct ad9467_dev *dev, int32_t en, int32_t *ret_stat)
 Enables (1) or disables (0) the external voltage reference. More...
 
int32_t ad9467_analog_input_disconnect (struct ad9467_dev *dev, int32_t en, int32_t *ret_stat)
 Disconnects (1) or connects (0) the analog input from or to the the ADC channel. More...
 
int32_t ad9467_offset_adj (struct ad9467_dev *dev, int32_t adj, int32_t *ret_stat)
 Sets the offset adjustment. More...
 
int32_t ad9467_output_disable (struct ad9467_dev *dev, int32_t en, int32_t *ret_stat)
 Disables (1) or enables (0) the data output. More...
 
int32_t ad9467_output_invert (struct ad9467_dev *dev, int32_t invert, int32_t *ret_stat)
 Activates the inverted (1) or normal (0) output mode. More...
 
int32_t ad9467_output_format (struct ad9467_dev *dev, int32_t format, int32_t *ret_stat)
 Specifies the output format. More...
 
int32_t ad9467_coarse_lvds_adj (struct ad9467_dev *dev, int32_t lvds_adj, int32_t *ret_stat)
 Determines LVDS output properties. More...
 
int32_t ad9467_output_current_adj (struct ad9467_dev *dev, int32_t adj, int32_t *ret_stat)
 Sets the output current adjustment. More...
 
int32_t ad9467_dco_clock_invert (struct ad9467_dev *dev, int32_t invert, int32_t *ret_stat)
 Activates the normal (0) or inverted (1) DCO clock. More...
 
int32_t ad9467_dco_output_clock_delay (struct ad9467_dev *dev, int32_t delay, int32_t *ret_stat)
 Configures the clock delay setting. More...
 
int32_t ad9467_full_scale_range (struct ad9467_dev *dev, float v_fs, float *ret_stat)
 Configures the full-scale input voltage selection. More...
 
int32_t ad9467_analog_input_coupling (struct ad9467_dev *dev, int32_t coupling_mode, int32_t *ret_stat)
 Sets the AC coupling(0) or DC coupling(1) mode. More...
 
int32_t ad9467_buffer_current_1 (struct ad9467_dev *dev, int32_t percentage, int32_t *ret_stat)
 Changes the input buffer current(1). More...
 
int32_t ad9467_buffer_current_2 (struct ad9467_dev *dev, int32_t percentage, int32_t *ret_stat)
 Changes the input buffer current(2). More...
 
int32_t ad9467_transfer (struct ad9467_dev *dev)
 Initiates a transfer and waits for the operation to end. More...
 

Detailed Description

Header file of AD9467 Driver.

Author
DNechita (Dan.N.nosp@m.echi.nosp@m.ta@an.nosp@m.alog.nosp@m..com)

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

◆ AD9467_ADC_INPUT_ANALOG_DSCN

#define AD9467_ADC_INPUT_ANALOG_DSCN   (1 << 2)

◆ AD9467_ADC_INPUT_XVREF

#define AD9467_ADC_INPUT_XVREF   (1 << 7)

◆ AD9467_ADDR

#define AD9467_ADDR (   x)    ((x) & 0X1FFF)

◆ AD9467_ANALOG_INPUT_COUPLING

#define AD9467_ANALOG_INPUT_COUPLING   (1 << 2)

◆ AD9467_BUFF_CURRENT_1

#define AD9467_BUFF_CURRENT_1 (   x)    (((x) & 0x3F) << 2)

◆ AD9467_BUFF_CURRENT_2

#define AD9467_BUFF_CURRENT_2 (   x)    (((x) & 0x3F) << 2)

◆ AD9467_CHIP_GRADE_BITS

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

◆ AD9467_CHIP_PORT_CGF_LSB_FIRST

#define AD9467_CHIP_PORT_CGF_LSB_FIRST   (1 << 6)

◆ AD9467_CHIP_PORT_CGF_SOFT_RST

#define AD9467_CHIP_PORT_CGF_SOFT_RST   (1 << 5)

◆ AD9467_CNT

#define AD9467_CNT (   x)    (((x) - 1) << 13)

◆ AD9467_DEVICE_UPDATE_SW

#define AD9467_DEVICE_UPDATE_SW   (1 << 0)

◆ AD9467_MODES_INT_PD_MODE

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

◆ AD9467_OUT_ADJ_LVDS

#define AD9467_OUT_ADJ_LVDS   (1 << 3)

◆ AD9467_OUT_ADJ_OUT_CURRENT

#define AD9467_OUT_ADJ_OUT_CURRENT (   x)    (((x) & 0x7) << 0)

◆ AD9467_OUT_DELAY_DCO_DLY_EN

#define AD9467_OUT_DELAY_DCO_DLY_EN   (1 << 7)

◆ AD9467_OUT_DELAY_OUT_DLY

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

◆ AD9467_OUT_MODE_DATA_FORMAT

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

◆ AD9467_OUT_MODE_DOUT_DISBL

#define AD9467_OUT_MODE_DOUT_DISBL   (1 << 4)

◆ AD9467_OUT_MODE_OUT_INV

#define AD9467_OUT_MODE_OUT_INV   (1 << 2)

◆ AD9467_OUT_PHASE_DCO_INV

#define AD9467_OUT_PHASE_DCO_INV   (1 << 7)

◆ AD9467_READ

#define AD9467_READ   (1 << 15)

◆ AD9467_REG_ADC_INPUT

#define AD9467_REG_ADC_INPUT   0x0F

◆ AD9467_REG_ANALOG_INPUT

#define AD9467_REG_ANALOG_INPUT   0x2C

◆ AD9467_REG_BUFF_CURRENT_1

#define AD9467_REG_BUFF_CURRENT_1   0x36

◆ AD9467_REG_BUFF_CURRENT_2

#define AD9467_REG_BUFF_CURRENT_2   0x107

◆ AD9467_REG_CHIP_GRADE

#define AD9467_REG_CHIP_GRADE   0x02

◆ AD9467_REG_CHIP_ID

#define AD9467_REG_CHIP_ID   0x01

◆ AD9467_REG_CHIP_PORT_CFG

#define AD9467_REG_CHIP_PORT_CFG   0x00

◆ AD9467_REG_DEVICE_UPDATE

#define AD9467_REG_DEVICE_UPDATE   0xFF

◆ AD9467_REG_MODES

#define AD9467_REG_MODES   0x08

◆ AD9467_REG_OFFSET

#define AD9467_REG_OFFSET   0x10

◆ AD9467_REG_OUT_ADJ

#define AD9467_REG_OUT_ADJ   0x15

◆ AD9467_REG_OUT_DELAY

#define AD9467_REG_OUT_DELAY   0x17

◆ AD9467_REG_OUT_MODE

#define AD9467_REG_OUT_MODE   0x14

◆ AD9467_REG_OUT_PHASE

#define AD9467_REG_OUT_PHASE   0x16

◆ AD9467_REG_TEST_IO

#define AD9467_REG_TEST_IO   0x0D

◆ AD9467_REG_V_REF

#define AD9467_REG_V_REF   0x18

◆ AD9467_TEST_IO_OUT_TEST

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

◆ AD9467_TEST_IO_RST_PN_LONG

#define AD9467_TEST_IO_RST_PN_LONG   (1 << 5)

◆ AD9467_TEST_IO_RST_PN_SHORT

#define AD9467_TEST_IO_RST_PN_SHORT   (1 << 4)

◆ AD9467_V_REF_IN_FS_RANGE

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

◆ AD9467_WRITE

#define AD9467_WRITE   (0 << 15)

Function Documentation

◆ ad9467_analog_input_coupling()

int32_t ad9467_analog_input_coupling ( struct ad9467_dev dev,
int32_t  coupling_mode,
int32_t *  ret_stat 
)

Sets the AC coupling(0) or DC coupling(1) mode.

Sets the AC coupling(0) or DC coupling(1) mode.

Parameters
dev- The device structure.
coupling_mode- Input coupling mode selection. Example: 0 - AC coupling; 1 - DC coupling(default).
ret_stat- Return parameter of the set coupling mode.
Returns
Error code.

◆ ad9467_analog_input_disconnect()

int32_t ad9467_analog_input_disconnect ( struct ad9467_dev dev,
int32_t  en,
int32_t *  ret_stat 
)

Disconnects (1) or connects (0) the analog input from or to the the ADC channel.

Disconnects (1) or connects (0) the analog input from or to the ADC channel.

Parameters
dev- The device structure.
en- Enable option. Example: 1 - Disconnects the analog input. 0 - Connects the analog input(default).
ret_stat- Return parameter of the set analog input disconnect status.
Returns
Error code.

◆ ad9467_buffer_current_1()

int32_t ad9467_buffer_current_1 ( struct ad9467_dev dev,
int32_t  percentage,
int32_t *  ret_stat 
)

Changes the input buffer current(1).

Changes the input buffer current(1).

Parameters
dev- The device structure.
percentage- Buffer current select 1. Example: +530% +520% ...
  • 80%(default) ...
  • 20%
  • 10%
  • 0%
  • 10%
  • 20% ...
  • 90% -100%
ret_stat- Return parameter of the set buffer current.
Returns
Error code.

◆ ad9467_buffer_current_2()

int32_t ad9467_buffer_current_2 ( struct ad9467_dev dev,
int32_t  percentage,
int32_t *  ret_stat 
)

Changes the input buffer current(2).

Changes the input buffer current(2).

Parameters
dev- The device structure.
percentage- Buffer current select 2. Example: +530% +520% ...
  • 80%(default) ...
  • 20%
  • 10%
  • 0%
  • 10%
  • 20% ...
  • 90% -100%
ret_stat- Return parameter of the set buffer current.
Returns
Error code.

◆ ad9467_coarse_lvds_adj()

int32_t ad9467_coarse_lvds_adj ( struct ad9467_dev dev,
int32_t  lvds_adj,
int32_t *  ret_stat 
)

Determines LVDS output properties.

Determines LVDS output properties.

Parameters
dev- The device structure.
lvds_adj- Coarse LVDS adjust. Example: 0 - 3.0 mA output current level(default); 1 - 1.71 mA output current level.
ret_stat- Return parameter of the set LVDS adjust state.
Returns
Error code.

◆ ad9467_dco_clock_invert()

int32_t ad9467_dco_clock_invert ( struct ad9467_dev dev,
int32_t  invert,
int32_t *  ret_stat 
)

Activates the normal (0) or inverted (1) DCO clock.

Activates the normal (0) or inverted (1) DCO clock.

Parameters
dev- The device structure.
invert- Invert option. Example: 0 - Activates the normal DCO clock(default); 1 - Activates the inverted DCO clock.
ret_stat- Return parameter of the set DCO clock inversion status.
Returns
Error code.

◆ ad9467_dco_output_clock_delay()

int32_t ad9467_dco_output_clock_delay ( struct ad9467_dev dev,
int32_t  delay,
int32_t *  ret_stat 
)

Configures the clock delay setting.

Configures the clock delay setting.

Parameters
dev- The device structure.
delay- The clock delay setting in ps {0, 100, 200, ..., 3200}. Setting the delay to 0 disables the DCO output clock delay.
ret_stat- Return parameter of the set clock delay.
Returns
Error code.

◆ ad9467_external_ref()

int32_t ad9467_external_ref ( struct ad9467_dev dev,
int32_t  en,
int32_t *  ret_stat 
)

Enables (1) or disables (0) the external voltage reference.

Enables (1) or disables (0) the external voltage reference.

Parameters
dev- The device structure.
en- Enable option. Example: 1 - Enables the external reference; 0 - Disables the external reference(default).
ret_stat- Return parameter of the set external reference enable state.
Returns
Error code.

◆ ad9467_full_scale_range()

int32_t ad9467_full_scale_range ( struct ad9467_dev dev,
float  v_fs,
float *  ret_stat 
)

Configures the full-scale input voltage selection.

Configures the full-scale input voltage selection.

Parameters
dev- The device structure.
v_fs- Full-scale input voltage selection. Example: 2.0 V p-p 2.1 V p-p 2.2 V p-p 2.3 V p-p 2.4 V p-p 2.5 V p-p(default)
ret_stat- Return parameter of the set input voltage selection.
Returns
Error code.

◆ ad9467_offset_adj()

int32_t ad9467_offset_adj ( struct ad9467_dev dev,
int32_t  adj,
int32_t *  ret_stat 
)

Sets the offset adjustment.

Sets the offset adjustment.

Parameters
dev- The device structure.
adj- The offset adjust value in LSBs from +127 to -128.
ret_stat- Return parameter of the set offset adjustment.
Returns
Error code.

◆ ad9467_output_current_adj()

int32_t ad9467_output_current_adj ( struct ad9467_dev dev,
int32_t  adj,
int32_t *  ret_stat 
)

Sets the output current adjustment.

Sets the output current adjustment.

Parameters
dev- The device structure.
adj- The output current adjustment. Example: 001 = 3.0 mA output drive current (default); 010 = 2.79 mA output drive current; 011 = 2.57 mA output drive current; 100 = 2.35 mA output drive current; 101 = 2.14 mA output drive current; 110 = 1.93 mA output drive current; 111 = 1.71 mA output drive current;
ret_stat- Return parameter of the set current adjustment.
Returns
Error code.

◆ ad9467_output_disable()

int32_t ad9467_output_disable ( struct ad9467_dev dev,
int32_t  en,
int32_t *  ret_stat 
)

Disables (1) or enables (0) the data output.

Disables (1) or enables (0) the data output.

Parameters
dev- The device structure.
en- Enable option. Example: 1 - Disables the data output; 0 - Enables the data output(default).
ret_stat- Return parameter of the set output disable state.
Returns
Error code.

◆ ad9467_output_format()

int32_t ad9467_output_format ( struct ad9467_dev dev,
int32_t  format,
int32_t *  ret_stat 
)

Specifies the output format.

Specifies the output format.

Parameters
dev- The device structure.
format- The output format. Example: 0 � offset binary(default); 1 � two's complement; 2 � gray code; 3 � reserved.
ret_stat- Return parameter of the set output format.
Returns
Negative error code or the set output format.
Here is the caller graph for this function:

◆ ad9467_output_invert()

int32_t ad9467_output_invert ( struct ad9467_dev dev,
int32_t  invert,
int32_t *  ret_stat 
)

Activates the inverted (1) or normal (0) output mode.

Activates the inverted (1) or normal (0) output mode.

Parameters
dev- The device structure.
invert- Invert option. Example: 1 - Activates the inverted output mode; 0 - Activates the normal output mode(default).
ret_stat- Return parameter of the set output mode.
Returns
Error code.
Here is the caller graph for this function:

◆ ad9467_pwr_mode()

int32_t ad9467_pwr_mode ( struct ad9467_dev dev,
int32_t  mode,
int32_t *  ret_mode 
)

Configures the power mode.

Configures the power mode.

Parameters
dev- The device structure.
mode- The power mode. Example: 00 � normal operation(default); 01 � full power-down;
ret_mode- Return parameter of the set power mode.
Returns
Error code.

◆ ad9467_read()

int32_t ad9467_read ( struct ad9467_dev dev,
uint16_t  reg_addr,
uint8_t *  reg_val 
)

Reads data from a register.

Reads data from a register.

Parameters
dev- The device structure.
reg_addr- The address of the register to be read.
reg_val- The value read from the register.
Returns
Returns the read data or negative error code.
Here is the caller graph for this function:

◆ ad9467_remove()

int32_t ad9467_remove ( struct ad9467_dev dev)

Free the resources allocated by ad9467_setup().

Free the resources allocated by ad9467_setup().

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

◆ ad9467_reset_pn23()

int32_t ad9467_reset_pn23 ( struct ad9467_dev dev,
int32_t  rst,
int32_t *  ret_stat 
)

Sets (1) or clears (0) the reset long PN sequence bit(PN23).

Sets (1) or clears (0) the reset long PN sequence bit(PN23).

Parameters
dev- The device structure.
rst- Reset option. Example: 1 - The PN sequence is held in reset; 0 - The PN sequence resumes from the seed value(0x3AFF).
ret_stat- Return parameter of the set PN23 status.
Returns
Error code.
Here is the caller graph for this function:

◆ ad9467_reset_pn9()

int32_t ad9467_reset_pn9 ( struct ad9467_dev dev,
int32_t  rst,
int32_t *  ret_stat 
)

Sets (1) or clears (0) the reset short PN sequence bit(PN9).

Sets (1) or clears (0) the reset short PN sequence bit(PN9).

Parameters
dev- The device structure.
rst- Reset option. Example: 1 - The PN sequence is held in reset; 0 - The PN sequence resumes from the seed value(0x92).
ret_stat- Return parameter of the set PN9 status.
Returns
Error code.
Here is the caller graph for this function:

◆ ad9467_set_bits_to_reg()

uint32_t ad9467_set_bits_to_reg ( struct ad9467_dev dev,
uint16_t  register_address,
uint8_t  bits_value,
uint8_t  mask 
)

Sets a bit or a group of bits inside a register without modifying the other bits.

Sets a bit or a group of bits inside a register without modifying the other bits.

Parameters
dev- The device structure.
register_address- The address of the register to be written.
bits_value- The value of the bit/bits.
mask- The bit/bits position in the register.
Returns
Negative error code or 0 in case of success.
Here is the caller graph for this function:

◆ ad9467_setup()

int32_t ad9467_setup ( struct ad9467_dev **  device,
struct ad9467_init_param  init_param 
)

Configures the test mode and the output mode to a default state.

Configures the test mode and the output mode to a default state.

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

◆ ad9467_test_mode()

int32_t ad9467_test_mode ( struct ad9467_dev dev,
int32_t  mode,
int32_t *  ret_mode 
)

Sets the ADC's test mode.

Sets the ADC's test mode.

Parameters
dev- The device structure.
mode- ADC test mode. Example: 0 -> off(default) 1 -> midscale short 2 -> +FS short 3 -> -FS short 4 -> checkerboard output 5 -> PN 23 sequence 6 -> PN 9 sequence 7 -> one/zero word toggle
ret_mode- Return parameter of the set test mode.
Returns
Error code.
Here is the caller graph for this function:

◆ ad9467_transfer()

int32_t ad9467_transfer ( struct ad9467_dev dev)

Initiates a transfer and waits for the operation to end.

Initiates a transfer and waits for the operation to end.

Returns
Negative error code or 0 in case of success.
Here is the caller graph for this function:

◆ ad9467_write()

int32_t ad9467_write ( struct ad9467_dev dev,
uint16_t  reg_addr,
uint8_t  reg_val 
)

Writes data into a register.

Writes data into a register.

Parameters
dev- The device structure.
reg_addr- The address of the register to be written.
reg_val- The value to be written into the register.
Returns
Returns 0 in case of success or negative error code.
Here is the caller graph for this function: