Header file of AD5592R driver.
More...
#include "stdint.h"
#include "ad5592r-base.h"
|
| int32_t | ad5592r_write_dac (struct ad5592r_dev *dev, uint8_t chan, uint16_t value) |
| |
| int32_t | ad5592r_read_adc (struct ad5592r_dev *dev, uint8_t chan, uint16_t *value) |
| |
| int32_t | ad5592r_multi_read_adc (struct ad5592r_dev *dev, uint16_t chans, uint16_t *value) |
| |
| int32_t | ad5592r_reg_write (struct ad5592r_dev *dev, uint8_t reg, uint16_t value) |
| |
| int32_t | ad5592r_reg_read (struct ad5592r_dev *dev, uint8_t reg, uint16_t *value) |
| |
| int32_t | ad5592r_gpio_read (struct ad5592r_dev *dev, uint8_t *value) |
| |
| int32_t | ad5592r_init (struct ad5592r_dev **dev, struct ad5592r_init_param *init_param) |
| |
| int32_t | ad5592r_remove (struct ad5592r_dev *dev) |
| |
| int32_t | ad5592r_enable_busy (struct ad5592r_dev *dev, bool enable) |
| |
| int32_t | ad5592r_spi_wnop_r16 (struct ad5592r_dev *dev, uint16_t *buf) |
| |
Header file of AD5592R driver.
- Author
- Mircea Caprioru (mirce.nosp@m.a.ca.nosp@m.prior.nosp@m.u@an.nosp@m.alog..nosp@m.com)
-
Niel Acuna (niel..nosp@m.acun.nosp@m.a@ana.nosp@m.log..nosp@m.com)
Copyright 2018, 2020, 2025, 2026 (c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
◆ AD5592R_GPIO_READBACK_EN
| #define AD5592R_GPIO_READBACK_EN NO_OS_BIT(10) |
◆ AD5592R_LDAC_READBACK_EN
| #define AD5592R_LDAC_READBACK_EN NO_OS_BIT(6) |
◆ AD5592R_TEMPERATURE_TRACK_TIME_BUFFERED
◆ AD5592R_TEMPERATURE_TRACK_TIME_UNBUFFERED
◆ AD5592R_TRACING_VARIANCE_PAD
| #define AD5592R_TRACING_VARIANCE_PAD 100 |
◆ swab16
Value: ((((x) & 0x00ff) << 8) | \
(((x) & 0xff00) >> 8))
◆ ad5592r_enable_busy()
Enable Busy Indicator.
- Parameters
-
| dev | - The device structure. |
| enable | - Enable/Disable busy Indicator. |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad5592r_gpio_read()
| int32_t ad5592r_gpio_read |
( |
struct ad5592r_dev * | dev, |
|
|
uint8_t * | value ) |
Read GPIOs.
- Parameters
-
| dev | - The device structure. |
| value | - GPIOs value. |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad5592r_init()
Initialize AD5593r device.
- Parameters
-
| device | - The device structure. |
| init_param | - The initial parameters of the device. |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad5592r_multi_read_adc()
| int32_t ad5592r_multi_read_adc |
( |
struct ad5592r_dev * | dev, |
|
|
uint16_t | chans, |
|
|
uint16_t * | values ) |
Read Multiple ADC Channels.
- Parameters
-
| dev | - The device structure. |
| chans | - The ADC channels to be readback |
| values | - ADC value array |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad5592r_read_adc()
| int32_t ad5592r_read_adc |
( |
struct ad5592r_dev * | dev, |
|
|
uint8_t | chan, |
|
|
uint16_t * | value ) |
Read ADC channel.
- Parameters
-
| dev | - The device structure. |
| chan | - The channel number. |
| value | - ADC value |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad5592r_reg_read()
| int32_t ad5592r_reg_read |
( |
struct ad5592r_dev * | dev, |
|
|
uint8_t | reg, |
|
|
uint16_t * | value ) |
Read register.
- Parameters
-
| dev | - The device structure. |
| reg | - The register address. |
| value | - register value |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad5592r_reg_write()
| int32_t ad5592r_reg_write |
( |
struct ad5592r_dev * | dev, |
|
|
uint8_t | reg, |
|
|
uint16_t | value ) |
Write register.
- Parameters
-
| dev | - The device structure. |
| reg | - The register address. |
| value | - register value |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad5592r_remove()
Teardown an AD5592r device.
- Parameters
-
| dev | - The device structure. |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad5592r_spi_wnop_r16()
| int32_t ad5592r_spi_wnop_r16 |
( |
struct ad5592r_dev * | dev, |
|
|
uint16_t * | buf ) |
Write NOP and read value.
- Parameters
-
| dev | - The device structure. |
| buf | - buffer where to read |
- Returns
- 0 in case of success, negative error code otherwise
◆ ad5592r_write_dac()
| int32_t ad5592r_write_dac |
( |
struct ad5592r_dev * | dev, |
|
|
uint8_t | chan, |
|
|
uint16_t | value ) |
Write DAC channel.
- Parameters
-
| dev | - The device structure. |
| chan | - The channel number. |
| value | - DAC value |
- Returns
- 0 in case of success, negative error code otherwise