no-OS
iio_dual_ad713x.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef IIO_DUAL_AD713X
40 #define IIO_DUAL_AD713X
41 
42 #ifdef IIO_SUPPORT
43 
44 /******************************************************************************/
45 /***************************** Include Files **********************************/
46 /******************************************************************************/
47 
48 #include <stdio.h>
49 #include "ad713x.h"
50 #include "iio_types.h"
51 #include "no_os_spi.h"
52 
53 /******************************************************************************/
54 /*************************** Types Declarations *******************************/
55 /******************************************************************************/
56 
61 struct iio_ad713x_init_par {
63  uint8_t num_channels;
64  /* Device instance */
65  struct ad713x_dev *dev;
67  struct no_os_spi_desc *spi_eng_desc;
71  void (*dcache_invalidate_range)(uint32_t address, uint32_t bytes_count);
72 };
73 
74 struct iio_ad713x {
75  /* Mask of active ch */
76  uint32_t mask;
78  struct iio_device iio_dev_desc;
80  struct no_os_spi_desc *spi_eng_desc;
84  void (*dcache_invalidate_range)(uint32_t address, uint32_t bytes_count);
85 };
86 
87 /******************************************************************************/
88 /************************ Functions Declarations ******************************/
89 /******************************************************************************/
90 
91 /* Init function. */
92 int32_t iio_dual_ad713x_init(struct iio_ad713x **desc,
93  struct iio_ad713x_init_par *param);
94 /* Get desciptor. */
95 void iio_dual_ad713x_get_dev_descriptor(struct iio_ad713x *desc,
96  struct iio_device **dev_descriptor);
97 /* Free the resources allocated by iio_ad713x_init(). */
98 int32_t iio_dual_ad713x_remove(struct iio_ad713x *desc);
99 
100 #endif /* IIO_SUPPORT */
101 
102 #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:173
scan_type::sign
char sign
Definition: iio_types.h:158
no_os_spi.h
Header file of SPI Interface.
no_os_delay.h
Header file of Delay functions.
spi_engine_offload_message
Structure representing an offload message.
Definition: spi_engine.h:160
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:60
no_os_error.h
Error codes definition.
spi_engine.h
no_os_spi_desc
Structure holding SPI descriptor.
Definition: no_os_spi.h:177
num_channels
num_channels
Definition: ad3552r.h:248
adc_scan_type
struct scan_type adc_scan_type
Definition: iio_adc_demo.c:233
iio_types.h
Header file for iio_types.
NO_OS_BIT
#define NO_OS_BIT(x)
Definition: no_os_util.h:51
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:75
ad713x_dev
AD713x driver handler structure.
Definition: ad713x.h:686
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:252
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:805
scan_type
Definition: iio_types.h:156
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:173
errno.h
Error macro definition for ARM Compiler.