AnsweredAssumed Answered

How does iio_channel_write convert data without knowing the source format?

Question asked by allsey87 on Jul 3, 2018
Latest reply on Jul 12, 2018 by aardelean

Regarding the following statement from the Wiki:

the iio_channel_read and iio_channel_write functions do convert the samples from/to their hardware format into a more usable format.

These functions take void pointers to the destination or source data respectively. As far as I can see, there is no way for the library to know to what sort of data these void pointers are pointing (e.g. signed/unsigned or even floating point). How does the library do a conversion when only the hardware format is known?