Go to the documentation of this file.
33 #ifndef IIO_AD7091R8_H
34 #define IIO_AD7091R8_H
44 #define ad7091r8_iio_device(chans) { \
45 .num_ch = NO_OS_ARRAY_SIZE(chans), \
47 .pre_enable = (int32_t (*)())ad7091r8_buffer_preenable, \
48 .trigger_handler = (int32_t (*)())ad7091r8_trigger_handler, \
49 .debug_reg_read = (int32_t (*)())ad7091r8_iio_read_reg, \
50 .debug_reg_write = (int32_t (*)())ad7091r8_iio_write_reg \
int ad7091r8_iio_remove(struct ad7091r8_iio_dev *desc)
Free the resources allocated by ad7091r8_iio_init().
Definition: iio_ad7091r8.c:351
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
#define ad7091r8_iio_device(chans)
Definition: iio_ad7091r8.h:44
int ad7091r8_remove(struct ad7091r8_dev *dev)
Free the resources allocated by ad7091r8_init().
Definition: ad7091r8.c:458
@ IIO_VAL_INT
Definition: iio_types.h:50
Struct describing the scan type.
Definition: iio_types.h:168
char sign
Definition: iio_types.h:153
@ IIO_SHARED_BY_TYPE
Definition: iio_types.h:120
int ad7091r8_iio_init(struct ad7091r8_iio_dev **iio_dev, struct ad7091r8_iio_dev_init_param *init_param)
Initializes the AD7091R8 IIO driver.
Definition: iio_ad7091r8.c:302
Header file of IIO AD7091R8 driver header file.
@ IIO_VAL_FRACTIONAL_LOG2
Definition: iio_types.h:56
void * dev
Definition: iio_types.h:227
#define AD7091R8_CHANNEL(index)
Definition: iio_ad7091r8.c:84
Structure holding channel attributess.
Definition: iio_types.h:103
struct iio_trigger ad7091r8_iio_timer_trig_desc
Definition: iio_ad7091r8_trig.c:48
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
Implementation of AD7091R-8 driver header file.
#define AD7091R8_REG_CHANNEL
Definition: ad7091r8.h:55
Definition: ad7091r8.h:182
Definition: ad7091r8.h:164
enum ad7091r8_device_id device_id
Definition: ad7091r8.h:177
const char * name
Definition: iio_types.h:131
int ad7091r8_iio_remove(struct ad7091r8_iio_dev *desc)
Free the resources allocated by ad7091r8_iio_init().
Definition: iio_ad7091r8.c:351
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
AD7091r8 IIO device descriptor structure.
Definition: iio_ad7091r8.h:61
#define AD7091R_NUM_CHANNELS(id)
Definition: ad7091r8.h:48
uint32_t active_mask
Definition: iio_types.h:211
#define AD7091R8_REG_RESULT_DATA_MASK
Definition: ad7091r8.h:63
struct ad7091r8_init_param * ad7091r8_dev_init
Definition: iio_ad7091r8.h:70
@ AD7091R4
Definition: ad7091r8.h:88
struct iio_buffer * buffer
Definition: iio_types.h:228
@ AD7091R2
Definition: ad7091r8.h:87
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:686
int ad7091r8_sequenced_read(struct ad7091r8_dev *dev, uint16_t *read_val)
Definition: ad7091r8.c:533
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
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
@ AD7091R8
Definition: ad7091r8.h:89
int ad7091r8_spi_reg_write(struct ad7091r8_dev *dev, uint8_t reg_addr, uint16_t reg_data)
Definition: ad7091r8.c:69
#define AD7091R8_REG_RESULT_CH_ID_MASK
Definition: ad7091r8.h:65
Definition: iio_types.h:231
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
int16_t ch_num
Definition: iio_types.h:105
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
struct iio_device * iio_dev
Definition: iio_ad7091r8.h:63
int ad7091r8_init(struct ad7091r8_dev **device, struct ad7091r8_init_param *init_param)
Definition: ad7091r8.c:380
AD7091r8 IIO device initial parameters structure.
Definition: iio_ad7091r8.h:69
Definition: iio_types.h:151
int ad7091r8_iio_init(struct ad7091r8_iio_dev **iio_dev, struct ad7091r8_iio_dev_init_param *init_param)
Initializes the AD7091R8 IIO driver.
Definition: iio_ad7091r8.c:302
Header file of utility functions.
Definition: iio_types.h:226
int ad7091r8_spi_reg_read(struct ad7091r8_dev *dev, uint8_t reg_addr, uint16_t *reg_data)
Definition: ad7091r8.c:97
struct ad7091r8_dev * ad7091r8_dev
Definition: iio_ad7091r8.h:62
int ad7091r8_pulse_convst(struct ad7091r8_dev *dev)
Definition: ad7091r8.c:48
int vref_mv
Definition: ad7091r8.h:169
int ad7091r8_read_one(struct ad7091r8_dev *dev, uint8_t channel, uint16_t *read_val)
Definition: ad7091r8.c:509
int iio_buffer_push_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1434