libiio  0.11
Library for interfacing with IIO devices
 All Data Structures Files Functions Variables Enumerations Modules
Data Fields
iio_data_format Struct Reference

Contains the format of a data sample. More...

#include <iio.h>

Data Fields

unsigned int length
 Total length of the sample, in bits.
 
unsigned int bits
 Length of valuable data in the sample, in bits.
 
unsigned int shift
 Right-shift to apply when converting sample.
 
bool is_signed
 Contains True if the sample is signed.
 
bool is_fully_defined
 Contains True if the sample is fully defined, sign extended, etc.
 
bool is_be
 Contains True if the sample is in big-endian format.
 
bool with_scale
 Contains True if the sample should be scaled when converted.
 
double scale
 Contains the scale to apply if with_scale is set.
 
unsigned int repeat
 Number of times length repeats (added in v0.8)
 

Detailed Description

Contains the format of a data sample.

The different fields inform about the correct way to convert one sample from its raw format (as read from / generated by the hardware) to its real-world value.


The documentation for this struct was generated from the following file: