no-OS
iio_dual_ad713x.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef IIO_DUAL_AD713X
34 #define IIO_DUAL_AD713X
35 
36 #ifdef IIO_SUPPORT
37 
38 /******************************************************************************/
39 /***************************** Include Files **********************************/
40 /******************************************************************************/
41 
42 #include <stdio.h>
43 #include "ad713x.h"
44 #include "iio_types.h"
45 #include "no_os_spi.h"
46 
47 /******************************************************************************/
48 /*************************** Types Declarations *******************************/
49 /******************************************************************************/
50 
55 struct iio_ad713x_init_par {
57  uint8_t num_channels;
58  /* Device instance */
59  struct ad713x_dev *dev;
61  struct no_os_spi_desc *spi_eng_desc;
65  void (*dcache_invalidate_range)(uint32_t address, uint32_t bytes_count);
66 };
67 
68 struct iio_ad713x {
69  /* Mask of active ch */
70  uint32_t mask;
72  struct iio_device iio_dev_desc;
74  struct no_os_spi_desc *spi_eng_desc;
78  void (*dcache_invalidate_range)(uint32_t address, uint32_t bytes_count);
79 };
80 
81 /******************************************************************************/
82 /************************ Functions Declarations ******************************/
83 /******************************************************************************/
84 
85 /* Init function. */
86 int32_t iio_dual_ad713x_init(struct iio_ad713x **desc,
87  struct iio_ad713x_init_par *param);
88 /* Get desciptor. */
89 void iio_dual_ad713x_get_dev_descriptor(struct iio_ad713x *desc,
90  struct iio_device **dev_descriptor);
91 /* Free the resources allocated by iio_ad713x_init(). */
92 int32_t iio_dual_ad713x_remove(struct iio_ad713x *desc);
93 
94 #endif /* IIO_SUPPORT */
95 
96 #endif /* IIO_AD713X */
no_os_alloc.h
ad713x.h
Header file for the ad713x Driver.
iio_channel
Struct describing the scan type.
Definition: iio_types.h:168
scan_type::sign
char sign
Definition: iio_types.h:153
no_os_spi.h
Header file of SPI Interface.
no_os_delay.h
Header file of Delay functions.
BITS_PER_SAMPLE
#define BITS_PER_SAMPLE
Definition: basic_example.c:42
spi_engine_offload_message
Structure representing an offload message.
Definition: spi_engine.h:158
no_os_calloc
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
no_os_error.h
Error codes definition.
spi_engine.h
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
num_channels
num_channels
Definition: ad3552r.h:240
adc_scan_type
struct scan_type adc_scan_type
Definition: iio_adc_demo.c:229
iio_types.h
Header file for iio_types.
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
no_os_free
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
ad713x_dev
AD713x driver handler structure.
Definition: ad713x.h:680
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
spi_engine_offload_transfer
int32_t spi_engine_offload_transfer(struct no_os_spi_desc *desc, struct spi_engine_offload_message msg, uint32_t no_samples)
Initiate a SPI transfer in offload mode.
Definition: spi_engine.c:809
scan_type
Definition: iio_types.h:151
no_os_util.h
Header file of utility functions.
iio_dual_ad713x.h
spi_engine_offload_message::rx_addr
uint32_t rx_addr
Definition: spi_engine.h:171
errno.h
Error macro definition for ARM Compiler.