![]() |
no-OS
|
#include <stdlib.h>
#include <stdio.h>
#include "no_os_error.h"
#include "no_os_util.h"
#include "iio_ad405x.h"
#include "ad405x.h"
Enumerations | |
enum | ad405x_iio_accel_chans { CHAN_ADC_MODE = 0 , CHAN_BURST_AVERAGING_MODE = 1 } |
Functions | |
int | ad405x_iio_read_debug_attrs (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv) |
Handles the read request for debug attributes. | |
int | ad405x_iio_write_debug_attrs (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv) |
Handles the write request for debug attributes. | |
int | ad405x_iio_write_sample_rate (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv) |
Handles the write request for sampling rate attribute. | |
int | ad405x_iio_read_sample_rate (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv) |
Handles the read request for sample rate attribute. | |
int | ad405x_iio_write_avg_filter_length (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv) |
Handles the write request for average filter length attribute. | |
int | ad405x_iio_read_avg_filter_length (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv) |
Handles the read request for average filter length attribute. | |
int | ad405x_iio_init (struct ad405x_iio_dev **iio_dev, struct ad405x_iio_dev_init_param *init_param) |
Initializes the AD405X IIO driver. | |
int | ad405x_iio_remove (struct ad405x_iio_dev *desc) |
Free the resources allocated by ad405x_iio_init(). | |
Variables | |
const uint8_t | ad405x_realbits_adc [] = {12, 14, 16, 12, 14, 16} |
const uint8_t | ad405x_realbits_burst [] = {16, 16, 24, 16, 16, 24} |
const int32_t | ad405x_sample_rate [] |
int ad405x_iio_init | ( | struct ad405x_iio_dev ** | iio_dev, |
struct ad405x_iio_dev_init_param * | init_param ) |
Initializes the AD405X IIO driver.
iio_dev | - The iio device structure. |
init_param | - The structure that contains the device initial parameters. |
int ad405x_iio_read_avg_filter_length | ( | void * | dev, |
char * | buf, | ||
uint32_t | len, | ||
const struct iio_ch_info * | channel, | ||
intptr_t | priv ) |
Handles the read request for average filter length attribute.
dev | - The iio device structure. |
buf | - Command buffer to be filled with requested data. |
len | - Length of the received command buffer in bytes. |
channel | - Command channel info. |
priv | - Command attribute id. |
int ad405x_iio_read_debug_attrs | ( | void * | dev, |
char * | buf, | ||
uint32_t | len, | ||
const struct iio_ch_info * | channel, | ||
intptr_t | priv ) |
Handles the read request for debug attributes.
dev | - The iio device structure. |
buf | - Command buffer to be filled with requested data. |
len | - Length of the received command buffer in bytes. |
channel | - Command channel info. |
priv | - Command attribute id. |
int ad405x_iio_read_sample_rate | ( | void * | dev, |
char * | buf, | ||
uint32_t | len, | ||
const struct iio_ch_info * | channel, | ||
intptr_t | priv ) |
Handles the read request for sample rate attribute.
dev | - The iio device structure. |
buf | - Command buffer to be filled with requested data. |
len | - Length of the received command buffer in bytes. |
channel | - Command channel info. |
priv | - Command attribute id. |
int ad405x_iio_remove | ( | struct ad405x_iio_dev * | desc | ) |
Free the resources allocated by ad405x_iio_init().
desc | - The IIO device structure. |
int ad405x_iio_write_avg_filter_length | ( | void * | dev, |
char * | buf, | ||
uint32_t | len, | ||
const struct iio_ch_info * | channel, | ||
intptr_t | priv ) |
Handles the write request for average filter length attribute.
dev | - The iio device structure. |
buf | - Command buffer to be filled with the data to be written. |
len | - Length of the received command buffer in bytes. |
channel | - Command channel info. |
priv | - Command attribute id. |
int ad405x_iio_write_debug_attrs | ( | void * | dev, |
char * | buf, | ||
uint32_t | len, | ||
const struct iio_ch_info * | channel, | ||
intptr_t | priv ) |
Handles the write request for debug attributes.
dev | - The iio device structure. |
buf | - Command buffer to be filled with the data to be written. |
len | - Length of the received command buffer in bytes. |
channel | - Command channel info. |
priv | - Command attribute id. |
int ad405x_iio_write_sample_rate | ( | void * | dev, |
char * | buf, | ||
uint32_t | len, | ||
const struct iio_ch_info * | channel, | ||
intptr_t | priv ) |
Handles the write request for sampling rate attribute.
dev | - The iio device structure. |
buf | - Command buffer to be filled with the data to be written. |
len | - Length of the received command buffer in bytes. |
channel | - Command channel info. |
priv | - Command attribute id. |
const uint8_t ad405x_realbits_adc[] = {12, 14, 16, 12, 14, 16} |
const uint8_t ad405x_realbits_burst[] = {16, 16, 24, 16, 16, 24} |
const int32_t ad405x_sample_rate[] |