precision-converters-firmware
ad719x_iio.h
Go to the documentation of this file.
1 /***************************************************************************/
12 #ifndef AD719X_IIO_H_
13 #define AD719X_IIO_H_
14 
15 /******************************************************************************/
16 /***************************** Include Files **********************************/
17 /******************************************************************************/
18 
19 #include "iio.h"
20 #include "iio_types.h"
21 #include "ad719x.h"
22 
23 /******************************************************************************/
24 /********************** Macros and Constants Definition ***********************/
25 /******************************************************************************/
26 /* Additional bit macros */
27 #define REAL_BITS ADC_RESOLUTION
28 #define STORAGE_BITS 32
29 #define MODE_BIT_POSTION 21
30 #define BPDSW_BIT_POSTION 6
31 #define CNV_START_CMD 0x5C
32 #define CNV_STOP_CMD 0x58
33 #define BYTES_TRANSFER_THREE 3
34 /* For AD7190/2/4/5 the channel mask needs to shifted by 4,
35  * when operating in pseudo differential mode.*/
36 #define AD719X_CHN_SHIFT 4
37 
38 /******************************************************************************/
39 /********************** Public/Extern Declarations ****************************/
40 /******************************************************************************/
41 
42 /* ad719x global device instance for accessing device specific APIs */
43 extern struct ad719x_dev *p_ad719x_dev_inst;
44 
45 /* Init the IIO interface */
46 int32_t ad719x_iio_initialize(void);
47 
48 /* Run the IIO event handler */
49 void ad719x_iio_event_handler(void);
50 
51 #endif /* AD719X_IIO_H_ */
void ad719x_iio_event_handler(void)
Run the ad719x IIO event handler.
Definition: ad719x_iio.c:1210
int32_t ad719x_iio_initialize(void)
Initialize the ad719x IIO Interface.
Definition: ad719x_iio.c:1095
struct ad719x_dev * p_ad719x_dev_inst
Definition: ad719x_iio.c:138