Implementation of AD8460 Driver. More...
Go to the source code of this file.
Classes | |
struct | ad8460_device |
AD8460 descriptor. More... | |
struct | ad8460_init_param |
AD8460 init param. More... | |
Functions | |
int | ad8460_reg_read (struct ad8460_device *dev, uint8_t addr, uint8_t *val) |
Read a register value. | |
int | ad8460_reg_write (struct ad8460_device *dev, uint8_t addr, uint8_t val) |
Write a register value. | |
int | ad8460_reg_update_bits (struct ad8460_device *dev, uint8_t addr, uint8_t mask, uint8_t val) |
Read-modify-write operation. | |
int | ad8460_init (struct ad8460_device **dev, struct ad8460_init_param *init_param) |
Device and comm init function. | |
int | ad8460_remove (struct ad8460_device *dev) |
Free resources allocated by the init function. | |
int | ad8460_reset (struct ad8460_device *dev) |
Reset the AD8460 device. | |
int | ad8460_get_hvdac_word (struct ad8460_device *dev, int8_t index, uint16_t *val) |
Get the value of a high voltage DAC word. | |
int | ad8460_set_hvdac_word (struct ad8460_device *dev, int8_t index, uint16_t val) |
Set the value of a high voltage DAC word. | |
int | ad8460_enable_apg_mode (struct ad8460_device *dev, int val) |
Enable or disable the APG mode. | |
int | ad8460_read_shutdown_flag (struct ad8460_device *dev, uint8_t *flag) |
Read the shutdown flag. | |
int | ad8460_hv_reset (struct ad8460_device *dev) |
Reset the high voltage driver. | |
int | ad8460_set_sample (struct ad8460_device *dev, uint16_t val) |
Set the sample value. | |
Implementation of AD8460 Driver.
Copyright 2025(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:
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.
#define AD8460_ABS_MAX_OVERCURRENT_UA 1000000 |
#define AD8460_ABS_MAX_OVERVOLTAGE_UV 55000000 |
#define AD8460_APG_MODE_ENABLE_MSK NO_OS_BIT(5) |
#define AD8460_CURRENT_LIMIT_CONV | ( | x | ) |
#define AD8460_DATA_BYTE_FULL_MSK NO_OS_GENMASK(13, 0) |
#define AD8460_DATA_BYTE_HIGH_MSK NO_OS_GENMASK(5, 0) |
#define AD8460_DATA_BYTE_LOW_MSK NO_OS_GENMASK(7, 0) |
#define AD8460_DATA_BYTE_WORD_LENGTH 2 |
#define AD8460_DEFAULT_FAULT_PROTECT 0x00 |
#define AD8460_FAULT_ARM_MSK NO_OS_BIT(7) |
#define AD8460_FAULT_LIMIT_MSK NO_OS_GENMASK(6, 0) |
#define AD8460_HV_RESET_MSK NO_OS_BIT(7) |
#define AD8460_HV_SLEEP_MSK NO_OS_BIT(4) |
#define AD8460_HVDAC_DATA_WORD | ( | x | ) |
#define AD8460_HVDAC_SLEEP_MSK NO_OS_BIT(3) |
#define AD8460_MAX_EXT_RESISTOR_OHMS 20000 |
#define AD8460_MAX_OVERTEMPERATURE_MC 150000 |
#define AD8460_MAX_VREFIO_UV 1200000 |
#define AD8460_MIN_EXT_RESISTOR_OHMS 2000 |
#define AD8460_MIN_OVERTEMPERATURE_MC 20000 |
#define AD8460_MIN_VREFIO_UV 120000 |
#define AD8460_NOMINAL_VOLTAGE_SPAN 80 |
#define AD8460_NUM_DATA_WORDS 16 |
#define AD8460_PATTERN_DEPTH_MSK NO_OS_GENMASK(3, 0) |
#define AD8460_QUIESCENT_CURRENT_MSK NO_OS_GENMASK(7, 0) |
#define AD8460_SHUTDOWN_FLAG_MSK NO_OS_BIT(7) |
#define AD8460_TEMP_LIMIT_CONV | ( | x | ) |
#define AD8460_VOLTAGE_LIMIT_CONV | ( | x | ) |
#define AD8460_WAVE_GEN_MODE_MSK NO_OS_BIT(0) |
int ad8460_enable_apg_mode | ( | struct ad8460_device * | dev, |
int | val ) |
Enable or disable the APG mode.
Enable or disable the APG mode
dev | - AD8460 descriptor |
val | - enable or disable APG mode |
int ad8460_get_hvdac_word | ( | struct ad8460_device * | dev, |
int8_t | index, | ||
uint16_t * | val ) |
Get the value of a high voltage DAC word.
Get the value of a high voltage DAC word
dev | - AD8460 descriptor |
index | - index of the word to be read |
val | - value of the word |
int ad8460_hv_reset | ( | struct ad8460_device * | dev | ) |
Reset the high voltage driver.
Reset the high voltage driver
dev | - AD8460 descriptor |
int ad8460_init | ( | struct ad8460_device ** | dev, |
struct ad8460_init_param * | init_param ) |
Device and comm init function.
Device and comm init function
dev | - AD8460 descriptor to be initialized |
init_param | - Init parameter for descriptor |
int ad8460_read_shutdown_flag | ( | struct ad8460_device * | dev, |
uint8_t * | flag ) |
Read the shutdown flag.
Read the shutdown flag
dev | - AD8460 descriptor |
flag | - shutdown flag |
int ad8460_reg_read | ( | struct ad8460_device * | dev, |
uint8_t | addr, | ||
uint8_t * | val ) |
Read a register value.
Read a register value
dev | - AD8460 descriptor |
addr | - register address |
val | - register value |
int ad8460_reg_update_bits | ( | struct ad8460_device * | dev, |
uint8_t | addr, | ||
uint8_t | mask, | ||
uint8_t | val ) |
Read-modify-write operation.
Read-modify-write operation
dev | - AD8460 descriptor |
addr | - register address |
mask | - Mask for specific register bits to be updated |
val | - register value |
int ad8460_reg_write | ( | struct ad8460_device * | dev, |
uint8_t | addr, | ||
uint8_t | val ) |
Write a register value.
Write a register value
dev | - AD8460 descriptor |
addr | - register address |
val | - register value |
int ad8460_remove | ( | struct ad8460_device * | dev | ) |
Free resources allocated by the init function.
Free resources allocated by the init function
dev | - AD8460 descriptor |
int ad8460_reset | ( | struct ad8460_device * | dev | ) |
Reset the AD8460 device.
Reset the AD8460 device
dev | - AD8460 descriptor |
int ad8460_set_hvdac_word | ( | struct ad8460_device * | dev, |
int8_t | index, | ||
uint16_t | val ) |
Set the value of a high voltage DAC word.
Set the value of a high voltage DAC word
dev | - AD8460 descriptor |
index | - index of the word to be set |
val | - value of the word |
int ad8460_set_sample | ( | struct ad8460_device * | dev, |
uint16_t | val ) |
Set the sample value.
Set the sample value
dev | - AD8460 descriptor |
val | - sample value |