no-OS
iio_ad7616.h
Go to the documentation of this file.
1 /***************************************************************************/
13 #ifndef _AD7616_IIO_H_
14 #define _AD7616_IIO_H_
15 
16 /******************************************************************************/
17 /***************************** Include Files **********************************/
18 /******************************************************************************/
19 #include <stdint.h>
20 
21 #include "iio.h"
22 #include "iio_types.h"
23 #include "ad7616.h"
24 
25 /******************************************************************************/
26 /********************** Public/Extern Declarations ****************************/
27 /******************************************************************************/
28 
32 };
33 
34 /* Init the IIO interface */
35 int ad7616_iio_init(struct ad7616_iio_dev **dev,
37 int ad7616_iio_remove(struct ad7616_iio_dev *dev);
38 
39 void iio_ad7616_event_handler(struct iio_desc *desc);
40 
41 #endif /* __AD7616_IIO_H__ */
iio_ad7616.h
Header file for AD7616 IIO interface.
AD7616_VA7
@ AD7616_VA7
Definition: ad7616.h:132
ad7616_set_oversampling_ratio
int32_t ad7616_set_oversampling_ratio(struct ad7616_dev *dev, enum ad7616_osr osr)
Definition: ad7616.c:581
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
iio_buffer::samples
uint32_t samples
Definition: iio_types.h:217
ad7616_osr
ad7616_osr
Definition: ad7616.h:159
AD7616_VB6
@ AD7616_VB6
Definition: ad7616.h:144
ad7616_write
int32_t ad7616_write(struct ad7616_dev *dev, uint8_t reg_addr, uint16_t reg_data)
Definition: ad7616.c:340
iio_channel
Struct describing the scan type.
Definition: iio_types.h:168
scan_type::sign
char sign
Definition: iio_types.h:153
ad7616_dev::va
enum ad7616_range va[8]
Definition: ad7616.h:194
AD7616_VA3
@ AD7616_VA3
Definition: ad7616.h:128
AD7616_VA5
@ AD7616_VA5
Definition: ad7616.h:130
ad7616_conversion_result::channel_a
uint16_t channel_a
Definition: ad7616.h:234
iio_device_data::dev
void * dev
Definition: iio_types.h:227
ad7616_setup
int32_t ad7616_setup(struct ad7616_dev **device, struct ad7616_init_param *init_param)
Definition: ad7616.c:941
iio_desc
Definition: iio.c:204
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:103
iio_buffer::bytes_per_scan
uint32_t bytes_per_scan
Definition: iio_types.h:215
ad7616_dev::vb
enum ad7616_range vb[8]
Definition: ad7616.h:195
ad7616_sequencer_layer
Definition: ad7616.h:238
no_os_max
#define no_os_max(x, y)
Definition: no_os_util.h:64
ad7616_dev
Definition: ad7616.h:170
device
Definition: ad9361_util.h:69
AD7616_VB_SELF_TEST
@ AD7616_VB_SELF_TEST
Definition: ad7616.h:149
ad7616_iio_dev
Definition: iio_ad7616.h:29
AD7616_VA1
@ AD7616_VA1
Definition: ad7616.h:126
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_ARRAY_SIZE
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
AD7616_VA0
@ AD7616_VA0
Definition: ad7616.h:125
ad7616_set_range
int32_t ad7616_set_range(struct ad7616_dev *dev, enum ad7616_ch ch, enum ad7616_range range)
Definition: ad7616.c:497
ad7616.h
Header file of AD7616 Driver.
OSR_ATTR_ID
@ OSR_ATTR_ID
Definition: iio_ad7606.c:45
AD7616_OSR_128
@ AD7616_OSR_128
Definition: ad7616.h:167
AD7616_VB7
@ AD7616_VB7
Definition: ad7616.h:145
ad7616_iio_dev::iio_dev
struct iio_device * iio_dev
Definition: iio_ad7616.h:31
iio_ad7616_event_handler
void iio_ad7616_event_handler(struct iio_desc *desc)
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
AD7616_5V
@ AD7616_5V
Definition: ad7616.h:155
AD7616_OSR_0
@ AD7616_OSR_0
Definition: ad7616.h:160
iio_attribute::name
const char * name
Definition: iio_types.h:131
AD7616_VB5
@ AD7616_VB5
Definition: ad7616.h:143
ad7616_conversion_result::channel_b
uint16_t channel_b
Definition: ad7616.h:235
ad7616_range
ad7616_range
Definition: ad7616.h:153
ad7616_init_param
Definition: ad7616.h:202
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
AD7616_2V5
@ AD7616_2V5
Definition: ad7616.h:154
ad7616_sequencer_layer::ch_a
enum ad7616_ch ch_a
Definition: ad7616.h:239
iio_buffer::active_mask
uint32_t active_mask
Definition: iio_types.h:211
ad7616_setup_sequencer
int32_t ad7616_setup_sequencer(struct ad7616_dev *dev, struct ad7616_sequencer_layer *layers, uint32_t layers_nb, uint8_t burst)
Setup the sequencer layers.
Definition: ad7616.c:842
ad7616_conversion_result
Definition: ad7616.h:233
AD7616_VA4
@ AD7616_VA4
Definition: ad7616.h:129
AD7616_VB1
@ AD7616_VB1
Definition: ad7616.h:139
AD7616_VA_SELF_TEST
@ AD7616_VA_SELF_TEST
Definition: ad7616.h:136
iio_device_data::buffer
struct iio_buffer * buffer
Definition: iio_types.h:228
ad7616_sequencer_layer::ch_b
enum ad7616_ch ch_b
Definition: ad7616.h:240
iio_channel::attributes
struct iio_attribute * attributes
Definition: iio_types.h:186
iio_types.h
Header file for iio_types.
iio_device::num_ch
uint16_t num_ch
Definition: iio_types.h:252
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
AD7616_VB2
@ AD7616_VB2
Definition: ad7616.h:140
AD7616_VB0
@ AD7616_VB0
Definition: ad7616.h:138
no_os_hweight8
unsigned int no_os_hweight8(uint8_t word)
AD7616_10V
@ AD7616_10V
Definition: ad7616.h:156
OSR_AVAILABLE_ID
@ OSR_AVAILABLE_ID
Definition: iio_ad7606.c:46
ad7616_dev::crc
uint8_t crc
Definition: ad7616.h:179
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
iio_ch_info::ch_num
int16_t ch_num
Definition: iio_types.h:105
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
ad7616_dev::osr
enum ad7616_osr osr
Definition: ad7616.h:196
AD7616_VB4
@ AD7616_VB4
Definition: ad7616.h:142
ad7616_read
int32_t ad7616_read(struct ad7616_dev *dev, uint8_t reg_addr, uint16_t *reg_data)
Definition: ad7616.c:323
ad7616_iio_remove
int ad7616_iio_remove(struct ad7616_iio_dev *dev)
AD7616_VA2
@ AD7616_VA2
Definition: ad7616.h:127
AD7616_VB3
@ AD7616_VB3
Definition: ad7616.h:141
ad7616_read_data_serial
int32_t ad7616_read_data_serial(struct ad7616_dev *dev, struct ad7616_conversion_result *results, uint32_t samples)
Read conversion result from device, checking with CRC if enabled.
Definition: ad7616.c:664
ad7616_dev::layers_nb
uint8_t layers_nb
Definition: ad7616.h:199
scan_type
Definition: iio_types.h:151
ad7616_remove
void ad7616_remove(struct ad7616_dev *dev)
Definition: ad7616.c:1063
no_os_util.h
Header file of utility functions.
iio_device_data
Definition: iio_types.h:226
no_os_find_first_set_bit
uint32_t no_os_find_first_set_bit(uint32_t word)
ad7616_ch
ad7616_ch
Definition: ad7616.h:124
AD7616_VA6
@ AD7616_VA6
Definition: ad7616.h:131
ad7616_iio_init
int ad7616_iio_init(struct ad7616_iio_dev **dev, struct ad7616_init_param *init_param)
iio_buffer_push_scan
int iio_buffer_push_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1434
ad7616_iio_dev::ad7616_dev
struct ad7616_dev * ad7616_dev
Definition: iio_ad7616.h:30