Go to the documentation of this file.
54 #define AD7780_RDY_STATE(value) no_os_gpio_get_value(dev->gpio_miso, \
58 #define AD7780_PDRST_PIN_OUT no_os_gpio_direction_output(dev->gpio_pdrst, \
60 #define AD7780_PDRST_HIGH no_os_gpio_set_value(dev->gpio_pdrst, \
62 #define AD7780_PDRST_LOW no_os_gpio_set_value(dev->gpio_pdrst, \
66 #define AD7780_FILTER_PIN_OUT no_os_gpio_direction_output(dev->gpio_filter, \
68 #define AD7780_FILTER_HIGH no_os_gpio_set_value(dev->gpio_filter, \
70 #define AD7780_FILTER_LOW no_os_gpio_set_value(dev->gpio_filter, \
74 #define AD7780_GAIN_PIN_OUT no_os_gpio_direction_output(dev->gpio_gain, \
76 #define AD7780_GAIN_HIGH no_os_gpio_set_value(dev->gpio_gain, \
78 #define AD7780_GAIN_LOW no_os_gpio_set_value(dev->gpio_gain, \
82 #define AD7780_STAT_RDY (1 << 7) // Ready bit.
83 #define AD7780_STAT_FILTER (1 << 6) // Filter bit.
84 #define AD7780_STAT_ERR (1 << 5) // Error bit.
85 #define AD7780_STAT_ID1 (1 << 4) // ID bits.
86 #define AD7780_STAT_ID0 (1 << 3) // ID bits.
87 #define AD7780_STAT_GAIN (1 << 2) // Gain bit.
88 #define AD7780_STAT_PAT1 (1 << 1) // Status pattern bits.
89 #define AD7780_STAT_PAT0 (1 << 0) // Status pattern bits.
91 #define AD7780_ID_NUMBER 0x08
#define AD7780_PDRST_HIGH
Definition: ad7780.h:60
struct no_os_gpio_init_param gpio_filter
Definition: ad7780.h:113
uint32_t timeout
Definition: ad413x.c:55
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
#define AD7780_FILTER_PIN_OUT
Definition: ad7780.h:66
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:95
Header file of SPI Interface.
struct no_os_spi_init_param spi_init
Definition: ad7780.h:109
int32_t ad7780_read_sample(struct ad7780_dev *dev, uint8_t *p_status)
Reads a 24-bit sample from the ADC.
Definition: ad7780.c:169
struct no_os_gpio_init_param gpio_gain
Definition: ad7780.h:114
#define AD7780_RDY_STATE(value)
Definition: ad7780.h:54
Definition: ad9361_util.h:75
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:65
int32_t no_os_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: no_os_gpio.c:130
int8_t ad7780_wait_rdy_go_low(struct ad7780_dev *dev)
Waits for DOUT/RDY pin to go low.
Definition: ad7780.c:145
#define AD7780_STAT_ID1
Definition: ad7780.h:85
struct no_os_gpio_init_param gpio_pdrst
Definition: ad7780.h:111
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:65
#define AD7780_GAIN_PIN_OUT
Definition: ad7780.h:74
int32_t ad7780_remove(struct ad7780_dev *dev)
Free the resources allocated by ad7780_init().
Definition: ad7780.c:120
struct no_os_gpio_desc * gpio_pdrst
Definition: ad7780.h:101
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:110
Structure holding SPI descriptor.
Definition: no_os_spi.h:143
int32_t ad7780_remove(struct ad7780_dev *dev)
Free the resources allocated by ad7780_init().
Definition: ad7780.c:120
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
#define AD7780_FILTER_LOW
Definition: ad7780.h:70
int32_t no_os_gpio_get(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Obtain the GPIO decriptor.
Definition: no_os_gpio.c:55
void * no_os_malloc(size_t size)
#define AD7780_ID_NUMBER
Definition: ad7780.h:91
int32_t ad7780_read_sample(struct ad7780_dev *dev, uint8_t *p_status)
Reads a 24-bit sample from the ADC.
Definition: ad7780.c:169
struct no_os_gpio_desc * gpio_gain
Definition: ad7780.h:104
#define AD7780_PDRST_LOW
Definition: ad7780.h:62
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:195
void no_os_free(void *ptr)
struct no_os_spi_desc * spi_desc
Definition: ad7780.h:99
#define AD7780_STAT_ID0
Definition: ad7780.h:86
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
int8_t ad7780_wait_rdy_go_low(struct ad7780_dev *dev)
Waits for DOUT/RDY pin to go low.
Definition: ad7780.c:145
struct no_os_gpio_init_param gpio_miso
Definition: ad7780.h:112
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:77
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:195
Header file of GPIO Interface.
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:51
#define AD7780_PDRST_PIN_OUT
Definition: ad7780.h:58
struct no_os_gpio_desc * gpio_filter
Definition: ad7780.h:103
struct no_os_gpio_desc * gpio_miso
Definition: ad7780.h:102
#define AD7780_GAIN_HIGH
Definition: ad7780.h:76
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:121