![]() |
no-OS
|
Header file of ADAQ8092 Driver. More...
#include <stdint.h>#include <string.h>#include "no_os_util.h"#include "no_os_spi.h"#include "no_os_gpio.h"Classes | |
| struct | adaq8092_init_param |
| ADAQ8092 Device initialization parameters. More... | |
| struct | adaq8092_dev |
| ADAQ8092 Device structure. More... | |
Macros | |
| #define | ADAQ8092_SPI_READ NO_OS_BIT(7) |
| #define | ADAQ8092_ADDR(x) |
| #define | ADAQ8092_REG_RESET 0x00 |
| #define | ADAQ8092_REG_POWERDOWN 0x01 |
| #define | ADAQ8092_REG_TIMING 0x02 |
| #define | ADAQ8092_REG_OUTPUT_MODE 0x03 |
| #define | ADAQ8092_REG_DATA_FORMAT 0x04 |
| #define | ADAQ8092_RESET NO_OS_BIT(7) |
| #define | ADAQ8092_POWERDOWN_MODE NO_OS_GENMASK(1, 0) |
| #define | ADAQ8092_CLK_INVERT NO_OS_BIT(3) |
| #define | ADAQ8092_CLK_PHASE NO_OS_GENMASK(2, 1) |
| #define | ADAQ8092_CLK_DUTYCYCLE NO_OS_BIT(0) |
| #define | ADAQ8092_ILVDS NO_OS_GENMASK(6, 4) |
| #define | ADAQ8092_TERMON NO_OS_BIT(3) |
| #define | ADAQ8092_OUTOFF NO_OS_BIT(2) |
| #define | ADAQ8092_OUTMODE NO_OS_GENMASK(1, 0) |
| #define | ADAQ8092_OUTTEST NO_OS_GENMASK(5, 3) |
| #define | ADAQ8092_ABP NO_OS_BIT(2) |
| #define | ADAQ8092_RAND NO_OS_BIT(1) |
| #define | ADAQ8092_TWOSCOMP NO_OS_BIT(0) |
Functions | |
| int | adaq8092_read (struct adaq8092_dev *dev, uint8_t reg_addr, uint8_t *reg_data) |
| Read device register. | |
| int | adaq8092_write (struct adaq8092_dev *dev, uint8_t reg_addr, uint8_t reg_data) |
| Write device register. | |
| int | adaq8092_update_bits (struct adaq8092_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t reg_data) |
| Update specific register bits. | |
| int | adaq8092_init (struct adaq8092_dev **device, struct adaq8092_init_param init_param) |
| Initialize the device. | |
| int | adaq8092_remove (struct adaq8092_dev *dev) |
| Remove the device and release resources. | |
| int | adaq8092_set_pd_mode (struct adaq8092_dev *dev, enum adaq8092_powerdown_modes mode) |
| Set the device powerodown mode. | |
| enum adaq8092_powerdown_modes | adaq8092_get_pd_mode (struct adaq8092_dev *dev) |
| Get the device powerdown mode. | |
| int | adaq8092_set_clk_pol_mode (struct adaq8092_dev *dev, enum adaq8092_clk_invert mode) |
| Set the clock polarity mode. | |
| enum adaq8092_clk_invert | adaq8092_get_clk_pol_mode (struct adaq8092_dev *dev) |
| Get the clock polarity mode. | |
| int | adaq8092_set_clk_phase_mode (struct adaq8092_dev *dev, enum adaq8092_clk_phase_delay mode) |
| Set the clock phase delay mode. | |
| enum adaq8092_clk_phase_delay | adaq8092_get_clk_phase_mode (struct adaq8092_dev *dev) |
| Get the clock phase delay mode. | |
| int | adaq8092_set_clk_dc_mode (struct adaq8092_dev *dev, enum adaq8092_clk_dutycycle mode) |
| Set the clock duty cycle stabilizer mode. | |
| enum adaq8092_clk_dutycycle | adaq8092_get_clk_dc_mode (struct adaq8092_dev *dev) |
| Get the clock duty cycle stabilizer mode. | |
| int | adaq8092_set_lvds_cur_mode (struct adaq8092_dev *dev, enum adaq8092_lvds_out_current mode) |
| Set the LVDS output current mode. | |
| enum adaq8092_lvds_out_current | adaq8092_get_lvds_cur_mode (struct adaq8092_dev *dev) |
| Get the LVDS output current mode. | |
| int | adaq8092_set_lvds_term_mode (struct adaq8092_dev *dev, enum adaq8092_internal_term mode) |
| Set the LVDS internal temination mode. | |
| enum adaq8092_internal_term | adaq8092_get_lvds_term_mode (struct adaq8092_dev *dev) |
| Get the LVDS internal temination device mode. | |
| int | adaq8092_set_dout_en (struct adaq8092_dev *dev, enum adaq8092_dout_enable mode) |
| Set digital outputs. | |
| enum adaq8092_dout_enable | adaq8092_get_dout_en (struct adaq8092_dev *dev) |
| Get digital outputs. | |
| int | adaq8092_set_dout_mode (struct adaq8092_dev *dev, enum adaq8092_dout_modes mode) |
| Set the digital output mode. | |
| enum adaq8092_dout_modes | adaq8092_get_dout_mode (struct adaq8092_dev *dev) |
| Get the digital output mode. | |
| int | adaq8092_set_test_mode (struct adaq8092_dev *dev, enum adaq8092_out_test_modes mode) |
| Set digital output test pattern mode. | |
| enum adaq8092_out_test_modes | adaq8092_get_test_mode (struct adaq8092_dev *dev) |
| Get digital output test pattern mode. | |
| int | adaq8092_set_alt_pol_en (struct adaq8092_dev *dev, enum adaq8092_alt_bit_pol mode) |
| Set the alternate bit polarity mode. | |
| enum adaq8092_alt_bit_pol | adaq8092_get_alt_pol_en (struct adaq8092_dev *dev) |
| Get the alternate bit polarity mode. | |
| int | adaq8092_set_data_rand_en (struct adaq8092_dev *dev, enum adaq8092_data_rand mode) |
| Set the data output randomizer mode. | |
| enum adaq8092_data_rand | adaq8092_get_data_rand_en (struct adaq8092_dev *dev) |
| Get the data output randomizer mode. | |
| int | adaq8092_set_twos_comp (struct adaq8092_dev *dev, enum adaq8092_twoscomp mode) |
| Set the Tows Complement mode. | |
| enum adaq8092_twoscomp | adaq8092_get_twos_comp (struct adaq8092_dev *dev) |
| Get the Tows Complement mode. | |
Header file of ADAQ8092 Driver.
Copyright 2022(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
| #define ADAQ8092_ABP NO_OS_BIT(2) |
| #define ADAQ8092_ADDR | ( | x | ) |
| #define ADAQ8092_CLK_DUTYCYCLE NO_OS_BIT(0) |
| #define ADAQ8092_CLK_INVERT NO_OS_BIT(3) |
| #define ADAQ8092_CLK_PHASE NO_OS_GENMASK(2, 1) |
| #define ADAQ8092_ILVDS NO_OS_GENMASK(6, 4) |
| #define ADAQ8092_OUTMODE NO_OS_GENMASK(1, 0) |
| #define ADAQ8092_OUTOFF NO_OS_BIT(2) |
| #define ADAQ8092_OUTTEST NO_OS_GENMASK(5, 3) |
| #define ADAQ8092_POWERDOWN_MODE NO_OS_GENMASK(1, 0) |
| #define ADAQ8092_RAND NO_OS_BIT(1) |
| #define ADAQ8092_REG_DATA_FORMAT 0x04 |
| #define ADAQ8092_REG_OUTPUT_MODE 0x03 |
| #define ADAQ8092_REG_POWERDOWN 0x01 |
| #define ADAQ8092_REG_RESET 0x00 |
| #define ADAQ8092_REG_TIMING 0x02 |
| #define ADAQ8092_RESET NO_OS_BIT(7) |
| #define ADAQ8092_SPI_READ NO_OS_BIT(7) |
| #define ADAQ8092_TERMON NO_OS_BIT(3) |
| #define ADAQ8092_TWOSCOMP NO_OS_BIT(0) |
| enum adaq8092_alt_bit_pol |
| enum adaq8092_clk_invert |
| enum adaq8092_data_rand |
| enum adaq8092_dout_enable |
| enum adaq8092_dout_modes |
| enum adaq8092_twoscomp |
| enum adaq8092_alt_bit_pol adaq8092_get_alt_pol_en | ( | struct adaq8092_dev * | dev | ) |
Get the alternate bit polarity mode.
| dev | - The device structure. |
| enum adaq8092_clk_dutycycle adaq8092_get_clk_dc_mode | ( | struct adaq8092_dev * | dev | ) |
Get the clock duty cycle stabilizer mode.
| dev | - The device structure. |
| enum adaq8092_clk_phase_delay adaq8092_get_clk_phase_mode | ( | struct adaq8092_dev * | dev | ) |
Get the clock phase delay mode.
| dev | - The device structure. |
| enum adaq8092_clk_invert adaq8092_get_clk_pol_mode | ( | struct adaq8092_dev * | dev | ) |
Get the clock polarity mode.
| dev | - The device structure. |
| enum adaq8092_data_rand adaq8092_get_data_rand_en | ( | struct adaq8092_dev * | dev | ) |
Get the data output randomizer mode.
| dev | - The device structure. |
| enum adaq8092_dout_enable adaq8092_get_dout_en | ( | struct adaq8092_dev * | dev | ) |
Get digital outputs.
| dev | - The device structure. |
| enum adaq8092_dout_modes adaq8092_get_dout_mode | ( | struct adaq8092_dev * | dev | ) |
Get the digital output mode.
| dev | - The device structure. |
| enum adaq8092_lvds_out_current adaq8092_get_lvds_cur_mode | ( | struct adaq8092_dev * | dev | ) |
Get the LVDS output current mode.
| dev | - The device structure. |
| enum adaq8092_internal_term adaq8092_get_lvds_term_mode | ( | struct adaq8092_dev * | dev | ) |
Get the LVDS internal temination device mode.
| dev | - The device structure. |
| enum adaq8092_powerdown_modes adaq8092_get_pd_mode | ( | struct adaq8092_dev * | dev | ) |
Get the device powerdown mode.
| dev | - The device structure. |
| enum adaq8092_out_test_modes adaq8092_get_test_mode | ( | struct adaq8092_dev * | dev | ) |
Get digital output test pattern mode.
| dev | - The device structure. |
| enum adaq8092_twoscomp adaq8092_get_twos_comp | ( | struct adaq8092_dev * | dev | ) |
Get the Tows Complement mode.
| dev | - The device structure. |
| int adaq8092_init | ( | struct adaq8092_dev ** | device, |
| struct adaq8092_init_param | init_param ) |
Initialize the device.
| device | - The device structure. |
| init_param | - The structure that contains the device initial parameters. |
| int adaq8092_read | ( | struct adaq8092_dev * | dev, |
| uint8_t | reg_addr, | ||
| uint8_t * | reg_data ) |
Read device register.
| dev | - The device structure. |
| reg_addr | - The register address. |
| reg_data | - The data read from the register. |
| int adaq8092_remove | ( | struct adaq8092_dev * | dev | ) |
Remove the device and release resources.
| dev | - The device structure. |
| int adaq8092_set_alt_pol_en | ( | struct adaq8092_dev * | dev, |
| enum adaq8092_alt_bit_pol | mode ) |
Set the alternate bit polarity mode.
| dev | - The device structure. |
| mode | - The device mode. |
| int adaq8092_set_clk_dc_mode | ( | struct adaq8092_dev * | dev, |
| enum adaq8092_clk_dutycycle | mode ) |
Set the clock duty cycle stabilizer mode.
| dev | - The device structure. |
| mode | - The device mode. |
| int adaq8092_set_clk_phase_mode | ( | struct adaq8092_dev * | dev, |
| enum adaq8092_clk_phase_delay | mode ) |
Set the clock phase delay mode.
| dev | - The device structure. |
| mode | - The device mode. |
| int adaq8092_set_clk_pol_mode | ( | struct adaq8092_dev * | dev, |
| enum adaq8092_clk_invert | mode ) |
Set the clock polarity mode.
| dev | - The device structure. |
| mode | - The device mode. |
| int adaq8092_set_data_rand_en | ( | struct adaq8092_dev * | dev, |
| enum adaq8092_data_rand | mode ) |
Set the data output randomizer mode.
| dev | - The device structure. |
| mode | - The device mode. |
| int adaq8092_set_dout_en | ( | struct adaq8092_dev * | dev, |
| enum adaq8092_dout_enable | mode ) |
Set digital outputs.
| dev | - The device structure. |
| mode | - The device mode. |
| int adaq8092_set_dout_mode | ( | struct adaq8092_dev * | dev, |
| enum adaq8092_dout_modes | mode ) |
Set the digital output mode.
| dev | - The device structure. |
| mode | - The device mode. |
| int adaq8092_set_lvds_cur_mode | ( | struct adaq8092_dev * | dev, |
| enum adaq8092_lvds_out_current | mode ) |
Set the LVDS output current mode.
| dev | - The device structure. |
| mode | - The device mode. |
| int adaq8092_set_lvds_term_mode | ( | struct adaq8092_dev * | dev, |
| enum adaq8092_internal_term | mode ) |
Set the LVDS internal temination mode.
| dev | - The device structure. |
| mode | - The device mode. |
| int adaq8092_set_pd_mode | ( | struct adaq8092_dev * | dev, |
| enum adaq8092_powerdown_modes | mode ) |
Set the device powerodown mode.
| dev | - The device structure. |
| mode | - The device mode. |
| int adaq8092_set_test_mode | ( | struct adaq8092_dev * | dev, |
| enum adaq8092_out_test_modes | mode ) |
Set digital output test pattern mode.
| dev | - The device structure. |
| mode | - The device mode. |
| int adaq8092_set_twos_comp | ( | struct adaq8092_dev * | dev, |
| enum adaq8092_twoscomp | mode ) |
Set the Tows Complement mode.
| dev | - The device structure. |
| mode | - The device mode. |
| int adaq8092_update_bits | ( | struct adaq8092_dev * | dev, |
| uint8_t | reg_addr, | ||
| uint8_t | mask, | ||
| uint8_t | reg_data ) |
Update specific register bits.
| dev | - The device structure. |
| reg_addr | - The register address. |
| mask | - Specific bits mask. |
| reg_data | - The data to be written. |
| int adaq8092_write | ( | struct adaq8092_dev * | dev, |
| uint8_t | reg_addr, | ||
| uint8_t | reg_data ) |
Write device register.
| dev- | The device structure. |
| reg_addr | - The register address. |
| reg_data | - The data to be written. |