53#define ADHV4710_SPI_READ NO_OS_BIT(7)
56#define ADHV4710_SILICON_REV 0x4
57#define ADHV4710_VERSION_PRODUCT 0x46
58#define ADHV4711_VERSION_PRODUCT 0x47
62#define ADHV4710_REG_CTRL_REG_00 0x000
63#define ADHV4710_REG_CTRL_REG_03 0x003
64#define ADHV4710_REG_CTRL_REG_04 0x004
65#define ADHV4710_REG_CTRL_REG_08 0x008
66#define ADHV4710_REG_CTRL_REG_09 0x009
67#define ADHV4710_REG_CTRL_REG_10 0x00A
68#define ADHV4710_REG_CTRL_REG_11 0x00B
69#define ADHV4710_REG_CTRL_REG_12 0x00C
70#define ADHV4710_REG_CTRL_REG_13 0x00D
71#define ADHV4710_REG_CTRL_REG_14 0x00E
72#define ADHV4710_REG_CTRL_REG_25 0x019
73#define ADHV4710_REG_CTRL_REG_26 0x01A
76#define ADHV4710_HV_RESET_MSK NO_OS_BIT(7)
77#define ADHV4710_HV_SLEEP_MSK NO_OS_BIT(4)
80#define ADHV4710_SOFT_RESET_MSK NO_OS_BIT(0)
83#define ADHV4710_SET_IQ_MSK NO_OS_GENMASK(7, 0)
86#define ADHV4710_OC_SRC_ARM_MSK NO_OS_BIT(7)
87#define ADEHV4710_OC_SRC_LIMIT_MSK NO_OS_GENMASK(6, 0)
90#define ADHV4710_OC_SNK_ARM_MSK NO_OS_BIT(7)
91#define ADEHV4710_OC_SNK_LIMIT_MSK NO_OS_GENMASK(6, 0)
94#define ADHV4710_OV_POS_ARM_MSK NO_OS_BIT(7)
95#define ADEHV4710_OV_POS_LIMIT_MSK NO_OS_GENMASK(6, 0)
98#define ADHV4710_OV_NEG_ARM_MSK NO_OS_BIT(7)
99#define ADEHV4710_OV_NEG_LIMIT_MSK NO_OS_GENMASK(6, 0)
102#define ADHV4710_OT_ARM_MSK NO_OS_BIT(7)
103#define ADEHV4710_OT_LIMIT_MSK NO_OS_GENMASK(6, 0)
106#define ADHV4710_OC_SRC_ALARM_LATCH_MSK NO_OS_BIT(4)
107#define ADHV4710_OC_SNK_ALARM_LATCH_MSK NO_OS_BIT(3)
108#define ADHV4710_OV_POS_ALARM_LATCH_MSK NO_OS_BIT(2)
109#define ADHV4710_OV_NEG_ALARM_LATCH_MSK NO_OS_BIT(1)
110#define ADHV4710_OT_ALARM_LATCH_MSK NO_OS_BIT(0)
111#define ADHV4710_ALL_ALARM_LATCH_MSK NO_OS_GENMASK(4, 0)
114#define ADHV4710_SHUTDOWN_FLAG_MSK NO_OS_BIT(7)
115#define ADHV4710_OC_SRC_ALARM_MSK NO_OS_BIT(4)
116#define ADHV4710_OC_SNK_ALARM_MSK NO_OS_BIT(3)
117#define ADHV4710_OV_POS_ALARM_MSK NO_OS_BIT(2)
118#define ADHV4710_OV_NEG_ALARM_MSK NO_OS_BIT(1)
119#define ADHV4710_OT_ALARM_MSK NO_OS_BIT(0)
122#define ADHV4710_DIE_REV_MSK NO_OS_GENMASK(3, 0)
125#define ADHV4710_CHIP_ID_MSK NO_OS_GENMASK(7, 0)
127#define ADHV4710_INC_DEC_MSK NO_OS_BIT(7)
128#define ADHV4710_INCREASE_I 1
129#define ADHV4710_DECREASE_I 0
191 uint8_t mask, uint8_t reg_data);
struct ad7616_init_param init_param
Definition ad7616_sdz.c:109
int adhv4710_enable_overvoltage_pos_protection(struct adhv4710_dev *dev)
Enable overvoltage positive protection.
Definition adhv4710.c:407
int adhv4710_enable_overvoltage_neg_protection(struct adhv4710_dev *dev)
Enable overvoltage negative protection.
Definition adhv4710.c:432
int adhv4710_clear_shutdown_latch(struct adhv4710_dev *dev)
Clear shutdown latch and re-enable amplifier from shutdown.
Definition adhv4710.c:308
int adhv4710_write(struct adhv4710_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Write device register.
Definition adhv4710.c:162
int adhv4710_enable_source_overcurrent_protection(struct adhv4710_dev *dev)
Enable source overcurrent protection.
Definition adhv4710.c:356
int adhv4710_set_overtemperature_level(struct adhv4710_dev *dev, uint8_t level)
Set level of overtemperature protection.
Definition adhv4710.c:469
adhv4710_type
Supported device variants.
Definition adhv4710.h:135
@ ID_ADHV4711
Definition adhv4710.h:139
@ ID_ADHV4710
Definition adhv4710.h:137
int adhv4710_set_source_overcurrent_level(struct adhv4710_dev *dev, uint8_t level)
Set level of overcurrent source protection.
Definition adhv4710.c:369
int adhv4710_sw_reset(struct adhv4710_dev *dev)
Reset the device using SW reset.
Definition adhv4710.c:267
int adhv4710_update_bits(struct adhv4710_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t reg_data)
Update specific register bits.
Definition adhv4710.c:193
int adhv4710_set_overvoltage_neg_level(struct adhv4710_dev *dev, uint8_t level)
Set level of overvoltage negative protection.
Definition adhv4710.c:445
int adhv4710_set_quiescent_current(struct adhv4710_dev *dev, uint8_t value, uint8_t direction)
Program quiescent current of amplifier.
Definition adhv4710.c:341
int adhv4710_enable_sink_overcurrent_protection(struct adhv4710_dev *dev)
Enable sink overcurrent protection.
Definition adhv4710.c:382
int adhv4710_get_status(struct adhv4710_dev *dev, uint8_t reg_addr, uint8_t msk, uint8_t *status)
Get indicator of settings.
Definition adhv4710.c:218
int adhv4710_version_product(struct adhv4710_dev *dev, uint8_t *data_read)
Version product.
Definition adhv4710.c:482
int adhv4710_shutdown_amplifier(struct adhv4710_dev *dev)
Shutdown the amplifier.
Definition adhv4710.c:327
int adhv4710_hw_reset(struct adhv4710_dev *dev)
Reset the device using HW reset.
Definition adhv4710.c:279
int adhv4710_set_overvoltage_pos_level(struct adhv4710_dev *dev, uint8_t level)
Set level of overvoltage positive protection.
Definition adhv4710.c:420
int adhv4710_set_sink_overcurrent_level(struct adhv4710_dev *dev, uint8_t level)
Set level of overcurrent sink protection.
Definition adhv4710.c:395
int adhv4710_init(struct adhv4710_dev **device, struct adhv4710_init_param init_param)
Initialize the device.
Definition adhv4710.c:65
int adhv4710_remove(struct adhv4710_dev *dev)
Remove the device and release resources.
Definition adhv4710.c:242
int adhv4710_enable_overtemperature_protection(struct adhv4710_dev *dev)
Enable overtemperature protection.
Definition adhv4710.c:457
int adhv4710_read(struct adhv4710_dev *dev, uint8_t reg_addr, int8_t *reg_data)
Read device register.
Definition adhv4710.c:125
Header file of CRC-16 computation.
Header file of Delay functions.
Header file of GPIO Interface.
Header file of IRQ interface.
Header file of SPI Interface.
Header file of utility functions.
Per-variant constants.
Definition adhv4710.h:146
uint8_t version_product
Definition adhv4710.h:148
ADHV4710 Device structure.
Definition adhv4710.h:168
struct no_os_spi_desc * spi_desc
Definition adhv4710.h:170
struct no_os_gpio_desc * gpio_reset
Definition adhv4710.h:172
enum adhv4710_type id
Definition adhv4710.h:174
ADHV4710 Device initialization parameters.
Definition adhv4710.h:155
struct no_os_spi_init_param * spi_init
Definition adhv4710.h:157
enum adhv4710_type id
Definition adhv4710.h:161
struct no_os_gpio_init_param * gpio_reset
Definition adhv4710.h:159
Definition ad9361_util.h:63
Structure holding the GPIO descriptor.
Definition no_os_gpio.h:84
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67
Structure holding SPI descriptor.
Definition no_os_spi.h:180
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128