Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ad559x.h File Reference
#include <zephyr/device.h>

Go to the source code of this file.

Macros

#define AD559X_REG_SEQ_ADC   0x02U
 
#define AD559X_REG_ADC_CONFIG   0x04U
 
#define AD559X_REG_LDAC_EN   0x05U
 
#define AD559X_REG_GPIO_PULLDOWN   0x06U
 
#define AD559X_REG_READ_AND_LDAC   0x07U
 
#define AD559X_REG_GPIO_OUTPUT_EN   0x08U
 
#define AD559X_REG_GPIO_SET   0x09U
 
#define AD559X_REG_GPIO_INPUT_EN   0x0AU
 
#define AD559X_REG_PD_REF_CTRL   0x0BU
 
#define AD559X_EN_REF   BIT(9)
 
#define AD559X_PIN_MAX   8U
 

Functions

bool mfd_ad559x_has_pointer_byte_map (const struct device *dev)
 Check if the chip has a pointer byte map.
 
int mfd_ad559x_read_raw (const struct device *dev, uint8_t *val, size_t len)
 Read raw data from the chip.
 
int mfd_ad559x_write_raw (const struct device *dev, uint8_t *val, size_t len)
 Write raw data to chip.
 
int mfd_ad559x_read_reg (const struct device *dev, uint8_t reg, uint8_t reg_data, uint16_t *val)
 Read data from provided register.
 
int mfd_ad559x_write_reg (const struct device *dev, uint8_t reg, uint16_t val)
 Write data to provided register.
 
int mfd_ad559x_read_adc_chan (const struct device *dev, uint8_t channel, uint16_t *result)
 Read ADC channel data from the chip.
 
int mfd_ad559x_write_dac_chan (const struct device *dev, uint8_t channel, uint16_t value)
 Write ADC channel data to the chip.
 
int mfd_ad559x_gpio_port_get_raw (const struct device *dev, uint8_t gpio, uint16_t *value)
 Read GPIO port from the chip.
 

Macro Definition Documentation

◆ AD559X_EN_REF

#define AD559X_EN_REF   BIT(9)

◆ AD559X_PIN_MAX

#define AD559X_PIN_MAX   8U

◆ AD559X_REG_ADC_CONFIG

#define AD559X_REG_ADC_CONFIG   0x04U

◆ AD559X_REG_GPIO_INPUT_EN

#define AD559X_REG_GPIO_INPUT_EN   0x0AU

◆ AD559X_REG_GPIO_OUTPUT_EN

#define AD559X_REG_GPIO_OUTPUT_EN   0x08U

◆ AD559X_REG_GPIO_PULLDOWN

#define AD559X_REG_GPIO_PULLDOWN   0x06U

◆ AD559X_REG_GPIO_SET

#define AD559X_REG_GPIO_SET   0x09U

◆ AD559X_REG_LDAC_EN

#define AD559X_REG_LDAC_EN   0x05U

◆ AD559X_REG_PD_REF_CTRL

#define AD559X_REG_PD_REF_CTRL   0x0BU

◆ AD559X_REG_READ_AND_LDAC

#define AD559X_REG_READ_AND_LDAC   0x07U

◆ AD559X_REG_SEQ_ADC

#define AD559X_REG_SEQ_ADC   0x02U