no-OS
Loading...
Searching...
No Matches
iio_ad405x.h File Reference
#include "iio.h"
Include dependency graph for iio_ad405x.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ad405x_iio_dev
 AD405X IIO device structure. More...
 
struct  ad405x_iio_dev_init_param
 

Enumerations

enum  ad405x_iio_debug_attrs {
  AD405X_DEBUG_SAMPLE_RATE ,
  AD405X_DEBUG_AVG_FILTER_LEN
}
 

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().
 

Enumeration Type Documentation

◆ ad405x_iio_debug_attrs

enum ad405x_iio_debug_attrs
Enumerator
AD405X_DEBUG_SAMPLE_RATE 
AD405X_DEBUG_AVG_FILTER_LEN 

Function Documentation

◆ ad405x_iio_init()

int ad405x_iio_init ( struct ad405x_iio_dev ** iio_dev,
struct ad405x_iio_dev_init_param * init_param )

Initializes the AD405X IIO driver.

Allocate memory for AD405X IIO handler.

Parameters
iio_dev- The iio device structure.
init_param- The structure that contains the device initial parameters.
Returns
Result of the initialization procedure.
Here is the caller graph for this function:

◆ ad405x_iio_read_avg_filter_length()

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.

Handles the read request for sampling frequency attribute.

Parameters
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.
Returns
The size of the read data in case of success, error code otherwise.

◆ ad405x_iio_read_debug_attrs()

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.

Callback for iio debug attributes reading.

Parameters
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.
Returns
The size of the read data in case of success, error code otherwise.

◆ ad405x_iio_read_sample_rate()

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.

Handles the read request for sampling frequency attribute.

Parameters
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.
Returns
the size of the read data in case of success, error code otherwise.

◆ ad405x_iio_remove()

int ad405x_iio_remove ( struct ad405x_iio_dev * desc)

Free the resources allocated by ad405x_iio_init().

Free memory allocated by ad405x_iio_init().

Parameters
desc- The IIO device structure.
Returns
Result of the remove procedure.

◆ ad405x_iio_write_avg_filter_length()

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.

Handles the write request for sampling frequency attribute.

Parameters
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.
Returns
Number of bytes received in case of success, error code otherwise.

◆ ad405x_iio_write_debug_attrs()

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.

Callback for iio debug attributes writing.

Parameters
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.
Returns
Number of bytes received in case of success, error code otherwise.

◆ ad405x_iio_write_sample_rate()

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.

Handles the write request for sampling frequency attribute.

Parameters
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.
Returns
Number of bytes received in case of success, error code otherwise.