Go to the documentation of this file.
49 #define AD74XX_CS_LOW no_os_gpio_set_value(dev->gpio_cs, \
51 #define AD74XX_CS_HIGH no_os_gpio_set_value(dev->gpio_cs, \
void ad74xx_power_up(struct ad74xx_dev *dev)
Powers up the device by performing a dummy read. This function is supported only by: AD7475(partial p...
Definition: ad74xx.c:136
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
@ ID_AD7478A
Definition: ad74xx.h:69
int32_t ad74xx_remove(struct ad74xx_dev *dev)
Free the resources allocated by ad74xx_init().
Definition: ad74xx.c:94
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:159
Header file of SPI Interface.
@ ID_AD7467
Definition: ad74xx.h:61
uint16_t ad74xx_get_register_value(struct ad74xx_dev *dev)
Reads the conversion value.
Definition: ad74xx.c:150
int32_t ad74xx_remove(struct ad74xx_dev *dev)
Free the resources allocated by ad74xx_init().
Definition: ad74xx.c:94
float ad74xx_convert_to_volts(struct ad74xx_dev *dev, uint16_t raw_value, float v_ref)
Converts a raw sample to volts.
Definition: ad74xx.c:190
void ad74xx_power_up(struct ad74xx_dev *dev)
Powers up the device by performing a dummy read. This function is supported only by: AD7475(partial p...
Definition: ad74xx.c:136
#define AD74XX_CS_HIGH
Definition: ad74xx.h:51
@ ID_AD7477
Definition: ad74xx.h:66
struct no_os_spi_init_param spi_init
Definition: ad74xx.h:85
int8_t device_bits_number
Definition: ad74xx.h:89
Definition: ad9361_util.h:69
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
float ad74xx_convert_to_volts(struct ad74xx_dev *dev, uint16_t raw_value, float v_ref)
Converts a raw sample to volts.
Definition: ad74xx.c:190
enum ad74xx_type part_number
Definition: ad74xx.h:80
@ ID_AD7466
Definition: ad74xx.h:60
#define AD74XX_CS_LOW
Definition: ad74xx.h:49
@ ID_AD7476
Definition: ad74xx.h:64
int8_t ad74xx_init(struct ad74xx_dev **device, struct ad74xx_init_param init_param)
Initializes the communication peripheral and the initial Values for AD74xx Board.
Definition: ad74xx.c:59
@ ID_AD7477A
Definition: ad74xx.h:67
@ ID_AD7495
Definition: ad74xx.h:70
struct no_os_spi_desc * spi_desc
Definition: ad74xx.h:75
int8_t ad74xx_init(struct ad74xx_dev **device, struct ad74xx_init_param init_param)
Initializes the communication peripheral and the initial Values for AD74xx Board.
Definition: ad74xx.c:59
Header file of AD74xx Driver.
enum ad74xx_type part_number
Definition: ad74xx.h:90
@ ID_AD7478
Definition: ad74xx.h:68
struct no_os_gpio_init_param gpio_cs
Definition: ad74xx.h:87
void ad74xx_power_down(struct ad74xx_dev *dev)
Powers down the device. This function is supported only by: AD7475(partial power down),...
Definition: ad74xx.c:116
@ ID_AD7475
Definition: ad74xx.h:63
ad74xx_type
Definition: ad74xx.h:59
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:104
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
@ ID_AD7468
Definition: ad74xx.h:62
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:49
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
void ad74xx_power_down(struct ad74xx_dev *dev)
Powers down the device. This function is supported only by: AD7475(partial power down),...
Definition: ad74xx.c:116
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
@ ID_AD7476A
Definition: ad74xx.h:65
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
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:116
Header file of GPIO Interface.
struct no_os_gpio_desc * gpio_cs
Definition: ad74xx.h:77
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:52
int8_t device_bits_number
Definition: ad74xx.h:79
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:147
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
uint16_t ad74xx_get_register_value(struct ad74xx_dev *dev)
Reads the conversion value.
Definition: ad74xx.c:150