no-OS
iio_pulsar_adc.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef _PULSAR_ADC_IIO_H_
35 #define _PULSAR_ADC_IIO_H_
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 #include <stdint.h>
41 
42 #include "iio.h"
43 #include "iio_types.h"
44 #include "pulsar_adc.h"
45 
46 /******************************************************************************/
47 /********************** Public/Extern Declarations ****************************/
48 /******************************************************************************/
58  /* Voltage reference */
59  uint32_t ref_voltage_mv;
60  /* scan type */
62 };
63 
70  /* Voltage reference */
71  uint32_t ref_voltage_mv;
72 };
73 
79 #endif /* __PULSAR_ADC_IIO_H__ */
no_os_alloc.h
END_ATTRIBUTES_ARRAY
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
IIO_DIRECTION_INPUT
@ IIO_DIRECTION_INPUT
Definition: iio_types.h:200
iio_buffer::samples
uint32_t samples
Definition: iio_types.h:217
pulsar_adc_iio_dev::scan_type
struct scan_type scan_type
Definition: iio_pulsar_adc.h:61
IIO_VAL_INT
@ IIO_VAL_INT
Definition: iio_types.h:50
iio_channel
Struct describing the scan type.
Definition: iio_types.h:168
scan_type::sign
char sign
Definition: iio_types.h:153
iio_device::channels
struct iio_channel * channels
Definition: iio_types.h:254
pulsar_adc_spi_reg_write
int32_t pulsar_adc_spi_reg_write(struct pulsar_adc_dev *dev, uint8_t reg_data)
Definition: pulsar_adc.c:134
IIO_VAL_FRACTIONAL_LOG2
@ IIO_VAL_FRACTIONAL_LOG2
Definition: iio_types.h:56
iio_device_data::dev
void * dev
Definition: iio_types.h:227
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:103
pulsar_adc_iio_init
int pulsar_adc_iio_init(struct pulsar_adc_iio_dev **dev, struct pulsar_adc_iio_init_param *iio_init_param)
Initialize PULSAR_ADC for IIO interfacing.
Definition: iio_pulsar_adc.c:179
scan_type::is_big_endian
bool is_big_endian
Definition: iio_types.h:161
scan_type::storagebits
uint8_t storagebits
Definition: iio_types.h:157
pulsar_adc_init_param
Definition: pulsar_adc.h:119
iio_init_param
Definition: iio.h:104
device
Definition: ad9361_util.h:69
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
iio_buffer_block_done
int iio_buffer_block_done(struct iio_buffer *buffer)
Definition: iio.c:1422
pulsar_adc_iio_init
int pulsar_adc_iio_init(struct pulsar_adc_iio_dev **dev, struct pulsar_adc_iio_init_param *iio_init_param)
Initialize PULSAR_ADC for IIO interfacing.
Definition: iio_pulsar_adc.c:179
pulsar_adc_iio_dev::ref_voltage_mv
uint32_t ref_voltage_mv
Definition: iio_pulsar_adc.h:59
pulsar_adc_iio_init_param::ref_voltage_mv
uint32_t ref_voltage_mv
Definition: iio_pulsar_adc.h:71
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
scan_type::shift
uint8_t shift
Definition: iio_types.h:159
iio_attribute::name
const char * name
Definition: iio_types.h:131
pulsar_adc_iio_init_param
pulsar_adc IIO initialization structure
Definition: iio_pulsar_adc.h:68
iio_channel::name
const char * name
Definition: iio_types.h:170
pulsar_adc_dev_info::sign
char sign
Definition: pulsar_adc.h:92
pulsar_adc_iio_remove
int pulsar_adc_iio_remove(struct pulsar_adc_iio_dev *iio_dev)
Release resources.
Definition: iio_pulsar_adc.c:218
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
pulsar_adc_remove
int32_t pulsar_adc_remove(struct pulsar_adc_dev *dev)
Free the resources allocated by pulsar_adc_init().
Definition: pulsar_adc.c:386
iio_buffer
Definition: iio_types.h:209
pulsar_adc_iio_remove
int pulsar_adc_iio_remove(struct pulsar_adc_iio_dev *dev)
Release resources.
Definition: iio_pulsar_adc.c:218
pulsar_adc_dev
Definition: pulsar_adc.h:96
IIO_VOLTAGE
@ IIO_VOLTAGE
Definition: iio_types.h:65
iio_pulsar_adc.h
Header file for PULSAR_ADC IIO interface.
iio_device_data::buffer
struct iio_buffer * buffer
Definition: iio_types.h:228
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:686
pulsar_adc_init
int32_t pulsar_adc_init(struct pulsar_adc_dev **device, struct pulsar_adc_init_param *init_param)
Definition: pulsar_adc.c:296
iio_types.h
Header file for iio_types.
iio_device::num_ch
uint16_t num_ch
Definition: iio_types.h:252
iio_channel::scan_type
struct scan_type * scan_type
Definition: iio_types.h:184
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
pulsar_adc_iio_dev
pulsar_adc IIO device structure
Definition: iio_pulsar_adc.h:53
pulsar_adc_dev_info::resolution
uint16_t resolution
Definition: pulsar_adc.h:91
pulsar_adc_iio_init_param::init_param
struct pulsar_adc_init_param * init_param
Definition: iio_pulsar_adc.h:69
iio_ch_info::ch_num
int16_t ch_num
Definition: iio_types.h:105
pulsar_adc_read_data
int32_t pulsar_adc_read_data(struct pulsar_adc_dev *dev, uint32_t *buf, uint16_t samples)
Definition: pulsar_adc.c:267
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
pulsar_adc_spi_reg_read
int32_t pulsar_adc_spi_reg_read(struct pulsar_adc_dev *dev, uint8_t *reg_data)
Definition: pulsar_adc.c:89
pulsar_adc_dev::dev_info
const struct pulsar_adc_dev_info * dev_info
Definition: pulsar_adc.h:112
scan_type
Definition: iio_types.h:151
pulsar_adc_iio_dev::iio_dev
struct iio_device * iio_dev
Definition: iio_pulsar_adc.h:57
iio_buffer_get_block
int iio_buffer_get_block(struct iio_buffer *buffer, void **addr)
Definition: iio.c:1409
no_os_util.h
Header file of utility functions.
iio_device_data
Definition: iio_types.h:226
no_os_sign_extend32
int32_t no_os_sign_extend32(uint32_t value, int index)
pulsar_adc_iio_dev::pulsar_adc_dev
struct pulsar_adc_dev * pulsar_adc_dev
Definition: iio_pulsar_adc.h:55
pulsar_adc.h
Header file for pulsar_adc Driver.
scan_type::realbits
uint8_t realbits
Definition: iio_types.h:155