Go to the documentation of this file.
47 #define AD7980_CS_LOW no_os_gpio_set_value(dev->gpio_cs, \
49 #define AD7980_CS_HIGH no_os_gpio_set_value(dev->gpio_cs, \
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
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.
int32_t ad7980_remove(struct ad7980_dev *dev)
Free the resources allocated by ad7980_init().
Definition: ad7980.c:87
Header file of AD7980 Driver.
struct no_os_gpio_desc * gpio_cs
Definition: ad7980.h:60
Definition: ad9361_util.h:69
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
uint16_t ad7980_conversion(struct ad7980_dev *dev)
Initiates conversion and reads data.
Definition: ad7980.c:107
int8_t ad7980_init(struct ad7980_dev **device, struct ad7980_init_param init_param)
Initializes the communication peripheral.
Definition: ad7980.c:56
#define AD7980_CS_HIGH
Definition: ad7980.h:49
int8_t ad7980_init(struct ad7980_dev **device, struct ad7980_init_param init_param)
Initializes the communication peripheral.
Definition: ad7980.c:56
float ad7980_convert_to_volts(uint16_t raw_sample, float v_ref)
Converts a 16-bit raw sample to volts.
Definition: ad7980.c:137
struct no_os_spi_desc * spi_desc
Definition: ad7980.h:58
int32_t ad7980_remove(struct ad7980_dev *dev)
Free the resources allocated by ad7980_init().
Definition: ad7980.c:87
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
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 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
struct no_os_spi_init_param spi_init
Definition: ad7980.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
#define AD7980_CS_LOW
Definition: ad7980.h:47
Header file of GPIO Interface.
struct no_os_gpio_init_param gpio_cs
Definition: ad7980.h:67
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
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
float ad7980_convert_to_volts(uint16_t raw_sample, float v_ref)
Converts a 16-bit raw sample to volts.
Definition: ad7980.c:137
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140
uint16_t ad7980_conversion(struct ad7980_dev *dev)
Initiates conversion and reads data.
Definition: ad7980.c:107