no-OS
iio_ad400x.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef _AD400X_IIO_H_
41 #define _AD400X_IIO_H_
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 #include <stdint.h>
47 
48 #include "iio.h"
49 #include "iio_types.h"
50 #include "ad400x.h"
51 
52 /******************************************************************************/
53 /********************** Public/Extern Declarations ****************************/
54 /******************************************************************************/
64  /* Voltage reference */
65  uint32_t ref_voltage_mv;
66  /* scan type */
68 };
69 
76  /* Voltage reference */
77  uint32_t ref_voltage_mv;
78 };
79 
81 int ad400x_iio_init(struct ad400x_iio_dev **dev,
84 int ad400x_iio_remove(struct ad400x_iio_dev *dev);
85 #endif /* __AD400X_IIO_H__ */
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:121
IIO_DIRECTION_INPUT
@ IIO_DIRECTION_INPUT
Definition: iio_types.h:205
iio_buffer::samples
uint32_t samples
Definition: iio_types.h:222
IIO_VAL_INT
@ IIO_VAL_INT
Definition: iio_types.h:56
iio_channel
Struct describing the scan type.
Definition: iio_types.h:173
ad400x_init_param
Definition: ad400x.h:108
scan_type::sign
char sign
Definition: iio_types.h:158
ad400x_iio_init_param
AD400x IIO initialization structure.
Definition: iio_ad400x.h:74
ad400x_dev_info::sign
char sign
Definition: ad400x.h:82
ad400x_iio_dev
AD400x IIO device structure.
Definition: iio_ad400x.h:59
iio_device::channels
struct iio_channel * channels
Definition: iio_types.h:259
IIO_VAL_FRACTIONAL_LOG2
@ IIO_VAL_FRACTIONAL_LOG2
Definition: iio_types.h:62
iio_device_data::dev
void * dev
Definition: iio_types.h:232
ad400x_dev::dev_info
const struct ad400x_dev_info * dev_info
Definition: ad400x.h:101
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:108
ad400x_iio_init_param::ref_voltage_mv
uint32_t ref_voltage_mv
Definition: iio_ad400x.h:77
scan_type::is_big_endian
bool is_big_endian
Definition: iio_types.h:166
scan_type::storagebits
uint8_t storagebits
Definition: iio_types.h:162
ad400x_dev_info::resolution
uint16_t resolution
Definition: ad400x.h:81
iio_init_param
Definition: iio.h:110
device
Definition: ad9361_util.h:75
ad400x_spi_reg_read
int32_t ad400x_spi_reg_read(struct ad400x_dev *dev, uint8_t *reg_data)
Definition: ad400x.c:80
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
iio_buffer_block_done
int iio_buffer_block_done(struct iio_buffer *buffer)
Definition: iio.c:1400
ad400x_spi_reg_write
int32_t ad400x_spi_reg_write(struct ad400x_dev *dev, uint8_t reg_data)
Definition: ad400x.c:125
ad400x_dev
Definition: ad400x.h:85
ad400x_remove
int32_t ad400x_remove(struct ad400x_dev *dev)
Free the resources allocated by ad400x_init().
Definition: ad400x.c:370
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
ad400x_iio_remove
int ad400x_iio_remove(struct ad400x_iio_dev *iio_dev)
Release resources.
Definition: iio_ad400x.c:223
scan_type::shift
uint8_t shift
Definition: iio_types.h:164
iio_attribute::name
const char * name
Definition: iio_types.h:136
iio_channel::name
const char * name
Definition: iio_types.h:175
ad400x_iio_dev::iio_dev
struct iio_device * iio_dev
Definition: iio_ad400x.h:63
ad400x_iio_dev::ref_voltage_mv
uint32_t ref_voltage_mv
Definition: iio_ad400x.h:65
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:134
ad400x_iio_init
int ad400x_iio_init(struct ad400x_iio_dev **dev, struct ad400x_iio_init_param *iio_init_param)
Initialize AD400X for IIO interfacing.
Definition: iio_ad400x.c:184
iio_buffer
Definition: iio_types.h:214
IIO_VOLTAGE
@ IIO_VOLTAGE
Definition: iio_types.h:71
iio_device_data::buffer
struct iio_buffer * buffer
Definition: iio_types.h:233
ad400x_init
int32_t ad400x_init(struct ad400x_dev **device, struct ad400x_init_param *init_param)
Definition: ad400x.c:287
ad400x_iio_remove
int ad400x_iio_remove(struct ad400x_iio_dev *dev)
Release resources.
Definition: iio_ad400x.c:223
ad400x.h
Header file for ad400x Driver.
ad400x_iio_init
int ad400x_iio_init(struct ad400x_iio_dev **dev, struct ad400x_iio_init_param *iio_init_param)
Initialize AD400X for IIO interfacing.
Definition: iio_ad400x.c:184
iio_format_value
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:666
ad400x_read_data
int32_t ad400x_read_data(struct ad400x_dev *dev, uint32_t *buf, uint16_t samples)
Definition: ad400x.c:258
ad400x_iio_dev::scan_type
struct scan_type scan_type
Definition: iio_ad400x.h:67
iio_types.h
Header file for iio_types.
iio_device::num_ch
uint16_t num_ch
Definition: iio_types.h:257
iio_channel::scan_type
struct scan_type * scan_type
Definition: iio_types.h:189
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
iio_ad400x.h
Header file for AD400X IIO interface.
iio_ch_info::ch_num
int16_t ch_num
Definition: iio_types.h:110
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:252
scan_type
Definition: iio_types.h:156
ad400x_iio_dev::ad400x_dev
struct ad400x_dev * ad400x_dev
Definition: iio_ad400x.h:61
iio_buffer_get_block
int iio_buffer_get_block(struct iio_buffer *buffer, void **addr)
Definition: iio.c:1387
ad400x_iio_init_param::init_param
struct ad400x_init_param * init_param
Definition: iio_ad400x.h:75
no_os_util.h
Header file of utility functions.
iio_device_data
Definition: iio_types.h:231
no_os_sign_extend32
int32_t no_os_sign_extend32(uint32_t value, int index)
scan_type::realbits
uint8_t realbits
Definition: iio_types.h:160