41#define AD7780_RDY_STATE(value) no_os_gpio_get_value(dev->gpio_miso, \
41#define AD7780_RDY_STATE(value) no_os_gpio_get_value(dev->gpio_miso, \ …
45#define AD7780_PDRST_PIN_OUT no_os_gpio_direction_output(dev->gpio_pdrst, \
45#define AD7780_PDRST_PIN_OUT no_os_gpio_direction_output(dev->gpio_pdrst, \ …
47#define AD7780_PDRST_HIGH no_os_gpio_set_value(dev->gpio_pdrst, \
47#define AD7780_PDRST_HIGH no_os_gpio_set_value(dev->gpio_pdrst, \ …
49#define AD7780_PDRST_LOW no_os_gpio_set_value(dev->gpio_pdrst, \
49#define AD7780_PDRST_LOW no_os_gpio_set_value(dev->gpio_pdrst, \ …
53#define AD7780_FILTER_PIN_OUT no_os_gpio_direction_output(dev->gpio_filter, \
53#define AD7780_FILTER_PIN_OUT no_os_gpio_direction_output(dev->gpio_filter, \ …
55#define AD7780_FILTER_HIGH no_os_gpio_set_value(dev->gpio_filter, \
55#define AD7780_FILTER_HIGH no_os_gpio_set_value(dev->gpio_filter, \ …
57#define AD7780_FILTER_LOW no_os_gpio_set_value(dev->gpio_filter, \
57#define AD7780_FILTER_LOW no_os_gpio_set_value(dev->gpio_filter, \ …
61#define AD7780_GAIN_PIN_OUT no_os_gpio_direction_output(dev->gpio_gain, \
61#define AD7780_GAIN_PIN_OUT no_os_gpio_direction_output(dev->gpio_gain, \ …
63#define AD7780_GAIN_HIGH no_os_gpio_set_value(dev->gpio_gain, \
63#define AD7780_GAIN_HIGH no_os_gpio_set_value(dev->gpio_gain, \ …
65#define AD7780_GAIN_LOW no_os_gpio_set_value(dev->gpio_gain, \
65#define AD7780_GAIN_LOW no_os_gpio_set_value(dev->gpio_gain, \ …
69#define AD7780_STAT_RDY (1 << 7)
70#define AD7780_STAT_FILTER (1 << 6)
71#define AD7780_STAT_ERR (1 << 5)
72#define AD7780_STAT_ID1 (1 << 4)
73#define AD7780_STAT_ID0 (1 << 3)
74#define AD7780_STAT_GAIN (1 << 2)
75#define AD7780_STAT_PAT1 (1 << 1)
76#define AD7780_STAT_PAT0 (1 << 0)
78#define AD7780_ID_NUMBER 0x08
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
int32_t ad7780_read_sample(struct ad7780_dev *dev, uint8_t *p_status)
Reads a 24-bit sample from the ADC.
Definition ad7780.c:156
float ad7780_convert_to_voltage(uint32_t raw_sample, float v_ref, uint8_t gain)
Converts the 24-bit raw value to milivolts.
Definition ad7780.c:182
int8_t ad7780_wait_rdy_go_low(struct ad7780_dev *dev)
Waits for DOUT/RDY pin to go low.
Definition ad7780.c:132
int8_t ad7780_init(struct ad7780_dev **device, struct ad7780_init_param init_param)
Initializes the communication peripheral and the initial Values for AD7780 Board and checks if the de...
Definition ad7780.c:52
int32_t ad7780_remove(struct ad7780_dev *dev)
Free the resources allocated by ad7780_init().
Definition ad7780.c:107
Header file of GPIO Interface.
Header file of SPI Interface.
struct no_os_spi_desc * spi_desc
Definition ad7780.h:82
struct no_os_gpio_desc * gpio_filter
Definition ad7780.h:86
struct no_os_gpio_desc * gpio_gain
Definition ad7780.h:87
struct no_os_gpio_desc * gpio_miso
Definition ad7780.h:85
struct no_os_gpio_desc * gpio_pdrst
Definition ad7780.h:84
struct no_os_gpio_init_param gpio_miso
Definition ad7780.h:95
struct no_os_spi_init_param spi_init
Definition ad7780.h:92
struct no_os_gpio_init_param gpio_filter
Definition ad7780.h:96
struct no_os_gpio_init_param gpio_pdrst
Definition ad7780.h:94
struct no_os_gpio_init_param gpio_gain
Definition ad7780.h:97
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