Go to the documentation of this file.
53 #define AD7980_CS_LOW no_os_gpio_set_value(dev->gpio_cs, \
55 #define AD7980_CS_HIGH no_os_gpio_set_value(dev->gpio_cs, \
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:85
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.
int32_t ad7980_remove(struct ad7980_dev *dev)
Free the resources allocated by ad7980_init().
Definition: ad7980.c:93
Header file of AD7980 Driver.
struct no_os_gpio_desc * gpio_cs
Definition: ad7980.h:66
Definition: ad9361_util.h:75
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:123
uint16_t ad7980_conversion(struct ad7980_dev *dev)
Initiates conversion and reads data.
Definition: ad7980.c:113
int8_t ad7980_init(struct ad7980_dev **device, struct ad7980_init_param init_param)
Initializes the communication peripheral.
Definition: ad7980.c:62
#define AD7980_CS_HIGH
Definition: ad7980.h:55
int8_t ad7980_init(struct ad7980_dev **device, struct ad7980_init_param init_param)
Initializes the communication peripheral.
Definition: ad7980.c:62
float ad7980_convert_to_volts(uint16_t raw_sample, float v_ref)
Converts a 16-bit raw sample to volts.
Definition: ad7980.c:143
struct no_os_spi_desc * spi_desc
Definition: ad7980.h:64
int32_t ad7980_remove(struct ad7980_dev *dev)
Free the resources allocated by ad7980_init().
Definition: ad7980.c:93
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
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 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
struct no_os_spi_init_param spi_init
Definition: ad7980.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
#define AD7980_CS_LOW
Definition: ad7980.h:53
Header file of GPIO Interface.
struct no_os_gpio_init_param gpio_cs
Definition: ad7980.h:73
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
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
float ad7980_convert_to_volts(uint16_t raw_sample, float v_ref)
Converts a 16-bit raw sample to volts.
Definition: ad7980.c:143
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:131
uint16_t ad7980_conversion(struct ad7980_dev *dev)
Initiates conversion and reads data.
Definition: ad7980.c:113