Go to the documentation of this file.
55 #define AD74XX_CS_LOW no_os_gpio_set_value(dev->gpio_cs, \
57 #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:142
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
@ ID_AD7478A
Definition: ad74xx.h:75
int32_t ad74xx_remove(struct ad74xx_dev *dev)
Free the resources allocated by ad74xx_init().
Definition: ad74xx.c:100
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:165
Header file of SPI Interface.
@ ID_AD7467
Definition: ad74xx.h:67
uint16_t ad74xx_get_register_value(struct ad74xx_dev *dev)
Reads the conversion value.
Definition: ad74xx.c:156
int32_t ad74xx_remove(struct ad74xx_dev *dev)
Free the resources allocated by ad74xx_init().
Definition: ad74xx.c:100
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:196
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:142
#define AD74XX_CS_HIGH
Definition: ad74xx.h:57
@ ID_AD7477
Definition: ad74xx.h:72
struct no_os_spi_init_param spi_init
Definition: ad74xx.h:91
int8_t device_bits_number
Definition: ad74xx.h:95
Definition: ad9361_util.h:75
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:123
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:196
enum ad74xx_type part_number
Definition: ad74xx.h:86
@ ID_AD7466
Definition: ad74xx.h:66
#define AD74XX_CS_LOW
Definition: ad74xx.h:55
@ ID_AD7476
Definition: ad74xx.h:70
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:65
@ ID_AD7477A
Definition: ad74xx.h:73
@ ID_AD7495
Definition: ad74xx.h:76
struct no_os_spi_desc * spi_desc
Definition: ad74xx.h:81
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:65
Header file of AD74xx Driver.
enum ad74xx_type part_number
Definition: ad74xx.h:96
@ ID_AD7478
Definition: ad74xx.h:74
struct no_os_gpio_init_param gpio_cs
Definition: ad74xx.h:93
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:122
@ ID_AD7475
Definition: ad74xx.h:69
ad74xx_type
Definition: ad74xx.h:65
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:177
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:102
@ ID_AD7468
Definition: ad74xx.h:68
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)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:49
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:122
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:75
@ ID_AD7476A
Definition: ad74xx.h:71
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
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:122
Header file of GPIO Interface.
struct no_os_gpio_desc * gpio_cs
Definition: ad74xx.h:83
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:58
int8_t device_bits_number
Definition: ad74xx.h:85
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:153
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:131
uint16_t ad74xx_get_register_value(struct ad74xx_dev *dev)
Reads the conversion value.
Definition: ad74xx.c:156