|
libiio 1.0
Library for interfacing with IIO devices
|

Data Structures | |
| struct | iio_data_format |
| Contains the format of a data sample. More... | |
Functions | |
| __api struct iio_channels_mask * | iio_create_channels_mask (unsigned int nb_channels) |
| Create a new empty channels mask. | |
| __api void | iio_channels_mask_destroy (struct iio_channels_mask *mask) |
| Destroy a channels mask. | |
| __api __check_ret ssize_t | iio_device_get_sample_size (const struct iio_device *dev, const struct iio_channels_mask *mask) |
| Get the current sample size. | |
| __api __check_ret __pure long | iio_channel_get_index (const struct iio_channel *chn) |
| Get the index of the given channel. | |
| __api __check_ret __cnst const struct iio_data_format * | iio_channel_get_data_format (const struct iio_channel *chn) |
| Get a pointer to a channel's data format structure. | |
| __api void | iio_channel_convert (const struct iio_channel *chn, void *dst, const void *src) |
| Convert the sample from hardware format to host format. | |
| __api void | iio_channel_convert_inverse (const struct iio_channel *chn, void *dst, const void *src) |
| Convert the sample from host format to hardware format. | |
| __api __check_ret __pure unsigned int | iio_device_get_debug_attrs_count (const struct iio_device *dev) |
| Enumerate the debug attributes of the given device. | |
| __api __check_ret __pure const struct iio_attr * | iio_device_get_debug_attr (const struct iio_device *dev, unsigned int index) |
| Get the debug attribute present at the given index. | |
| __api __check_ret __pure const struct iio_attr * | iio_device_find_debug_attr (const struct iio_device *dev, const char *name) |
| Try to find a debug attribute by its name. | |
| __api __check_ret int | iio_device_reg_write (struct iio_device *dev, uint32_t address, uint32_t value) |
| Set the value of a hardware register. | |
| __api __check_ret int | iio_device_reg_read (struct iio_device *dev, uint32_t address, uint32_t *value) |
| Get the value of a hardware register. | |
| __api void iio_channel_convert | ( | const struct iio_channel * | chn, |
| void * | dst, | ||
| const void * | src | ||
| ) |
Convert the sample from hardware format to host format.
| chn | A pointer to an iio_channel structure |
| dst | A pointer to the destination buffer where the converted sample should be written |
| src | A pointer to the source buffer containing the sample |


| __api void iio_channel_convert_inverse | ( | const struct iio_channel * | chn, |
| void * | dst, | ||
| const void * | src | ||
| ) |
Convert the sample from host format to hardware format.
| chn | A pointer to an iio_channel structure |
| dst | A pointer to the destination buffer where the converted sample should be written |
| src | A pointer to the source buffer containing the sample |


| __api __check_ret __cnst const struct iio_data_format * iio_channel_get_data_format | ( | const struct iio_channel * | chn | ) |
Get a pointer to a channel's data format structure.
| chn | A pointer to an iio_channel structure |


| __api __check_ret __pure long iio_channel_get_index | ( | const struct iio_channel * | chn | ) |
Get the index of the given channel.
| chn | A pointer to an iio_channel structure |


| __api void iio_channels_mask_destroy | ( | struct iio_channels_mask * | mask | ) |
Destroy a channels mask.
| mask | A pointer to an iio_channels_mask structure |

| __api struct iio_channels_mask * iio_create_channels_mask | ( | unsigned int | nb_channels | ) |
Create a new empty channels mask.
| nb_channels | The number of channels in the mask |

| __api __check_ret __pure const struct iio_attr * iio_device_find_debug_attr | ( | const struct iio_device * | dev, |
| const char * | name | ||
| ) |
Try to find a debug attribute by its name.
| dev | A pointer to an iio_device structure |
| name | A NULL-terminated string corresponding to the name of the debug attribute |


| __api __check_ret __pure const struct iio_attr * iio_device_get_debug_attr | ( | const struct iio_device * | dev, |
| unsigned int | index | ||
| ) |
Get the debug attribute present at the given index.
| dev | A pointer to an iio_device structure |
| index | The index corresponding to the debug attribute |


| __api __check_ret __pure unsigned int iio_device_get_debug_attrs_count | ( | const struct iio_device * | dev | ) |
Enumerate the debug attributes of the given device.
| dev | A pointer to an iio_device structure |


| __api __check_ret ssize_t iio_device_get_sample_size | ( | const struct iio_device * | dev, |
| const struct iio_channels_mask * | mask | ||
| ) |
Get the current sample size.
| dev | A pointer to an iio_device structure |
| mask | A pointer to an iio_channels_mask structure. |
NOTE: The sample size is not constant and will change when channels get enabled or disabled.
| __api __check_ret int iio_device_reg_read | ( | struct iio_device * | dev, |
| uint32_t | address, | ||
| uint32_t * | value | ||
| ) |
Get the value of a hardware register.
| dev | A pointer to an iio_device structure |
| address | The address of the register |
| value | A pointer to the variable where the value will be written |


| __api __check_ret int iio_device_reg_write | ( | struct iio_device * | dev, |
| uint32_t | address, | ||
| uint32_t | value | ||
| ) |
Set the value of a hardware register.
| dev | A pointer to an iio_device structure |
| address | The address of the register |
| value | The value to set the register to |

