Go to the documentation of this file.
13 #ifndef _AD7606_IIO_H_
14 #define _AD7606_IIO_H_
int32_t ad7606_get_ch_scale(struct ad7606_dev *dev, uint8_t ch, double *scale)
Get the value of scale for the channel.
Definition: ad7606.c:1502
int32_t ad7606_get_resolution_bits(struct ad7606_dev *dev)
Get the resolution bits of this device.
Definition: ad7606.c:1524
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
uint32_t samples
Definition: iio_types.h:217
Struct describing the scan type.
Definition: iio_types.h:168
char sign
Definition: iio_types.h:153
Header file for the ad7606 Driver.
int32_t min
Definition: ad7606.h:237
void * dev
Definition: iio_types.h:227
bool ad7606_sw_mode_enabled(struct ad7606_dev *dev)
Returns true if SW mode is enabled.
Definition: ad7606.c:1435
int32_t ad7606_get_channels_number(struct ad7606_dev *dev)
Returns the number of channels this ADC has.
Definition: ad7606.c:330
Structure holding channel attributess.
Definition: iio_types.h:103
enum ad7606_osr os_ratio
Definition: ad7606.h:252
@ AD7606_OSR_8
Definition: ad7606.h:162
Definition: ad9361_util.h:69
#define AD7606_CHN_ATTR(_name, _priv)
Definition: iio_ad7606.c:35
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
#define NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
int iio_buffer_block_done(struct iio_buffer *buffer)
Definition: iio.c:1422
struct ad7606_dev * ad7606_dev
Definition: iio_ad7606.h:30
@ OSR_ATTR_ID
Definition: iio_ad7606.c:45
const struct ad7606_range * ad7606_get_ch_ranges(struct ad7606_dev *dev, uint8_t ch, uint32_t *num_ranges)
Get the available channel ranges for the given channel.
Definition: ad7606.c:1366
int32_t max
Definition: ad7606.h:239
int32_t ad7606_read_samples(struct ad7606_dev *dev, uint32_t *data, uint32_t samples)
Read muliple raw samples from device.
Definition: ad7606.c:1065
int ad7606_iio_remove(struct ad7606_iio_dev *dev)
Definition: iio_ad7606.c:467
const char * name
Definition: iio_types.h:131
int32_t ad7606_set_oversampling(struct ad7606_dev *dev, struct ad7606_oversampling oversampling)
Set the oversampling ratio.
Definition: ad7606.c:1295
int ad7606_iio_remove(struct ad7606_iio_dev *dev)
Definition: iio_ad7606.c:467
Device driver initialization parameters.
Definition: ad7606.h:309
@ AD7606_OSR_16
Definition: ad7606.h:164
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
Definition: iio_types.h:209
uint32_t active_mask
Definition: iio_types.h:211
ad7606_iio_attributes_id
Definition: iio_ad7606.c:44
struct iio_device * iio_dev
Definition: iio_ad7606.h:31
struct iio_buffer * buffer
Definition: iio_types.h:228
int32_t ad7606_remove(struct ad7606_dev *dev)
Free any resource used by the driver.
Definition: ad7606.c:2073
int ad7606_iio_init(struct ad7606_iio_dev **dev, struct ad7606_init_param *init_param)
Initialize AD7606 for IIO interfacing.
Definition: iio_ad7606.c:437
@ AD7606_OSR_2
Definition: ad7606.h:158
struct iio_attribute * attributes
Definition: iio_types.h:186
int32_t ad7606_get_oversampling(struct ad7606_dev *dev, struct ad7606_oversampling *oversampling)
Get the oversampling ratio.
Definition: ad7606.c:1345
Header file for iio_types.
uint16_t num_ch
Definition: iio_types.h:252
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
int ad7606_iio_init(struct ad7606_iio_dev **dev, struct ad7606_init_param *init_param)
Initialize AD7606 for IIO interfacing.
Definition: iio_ad7606.c:437
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
int32_t ad7606_set_ch_range(struct ad7606_dev *dev, uint8_t ch, struct ad7606_range range)
Set the channel operation range.
Definition: ad7606.c:1456
@ AD7606_OSR_32
Definition: ad7606.h:166
@ OSR_AVAILABLE_ID
Definition: iio_ad7606.c:46
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
@ AD7606_OSR_4
Definition: ad7606.h:160
int16_t ch_num
Definition: iio_types.h:105
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
int32_t ad7606_reg_write(struct ad7606_dev *dev, uint8_t reg_addr, uint8_t reg_data)
Write a device register via SPI or AXI Parallel core.
Definition: ad7606.c:568
@ AD7606_OSR_256
Definition: ad7606.h:172
int32_t ad7606_init(struct ad7606_dev **device, struct ad7606_init_param *init_param)
Initialize the ad7606 device structure.
Definition: ad7606.c:1833
Definition: iio_ad7606.h:29
void ad7606_capture_post_disable(struct ad7606_dev *dev)
Disables buffer capture for an AXI SPI Engine or AXI Parallel interface.
Definition: ad7606.c:1036
Operation range as specified in datasheet (in uV)
Definition: ad7606.h:235
Definition: iio_types.h:151
int sign_bit
Definition: iio_ad7606.h:32
int iio_buffer_get_block(struct iio_buffer *buffer, void **addr)
Definition: iio.c:1409
Header file of utility functions.
Definition: iio_types.h:226
@ AD7606_OSR_128
Definition: ad7606.h:170
int32_t no_os_sign_extend32(uint32_t value, int index)
int32_t ad7606_capture_pre_enable(struct ad7606_dev *dev)
Prepares buffer capture for an AXI SPI Engine or AXI Parallel interface.
Definition: ad7606.c:1018
@ AD7606_OSR_64
Definition: ad7606.h:168
#define AD7606_CH(_idx, bits)
Definition: iio_ad7606.c:24
Header file for AD7606 IIO interface.
@ AD7606_OSR_1
Definition: ad7606.h:156
int32_t ad7606_reg_read(struct ad7606_dev *dev, uint8_t reg_addr, uint8_t *reg_data)
Write a device register via SPI or AXI Parallel core.
Definition: ad7606.c:542
Device driver structure.
Definition: ad7606.c:268