iio_push_to_buffers()¶
Purpose¶
Pushes one scan frame into the active IIO buffer.
Header¶
Prototype¶
Parameters¶
indio_dev: IIO device that owns the buffer.data: pointer to one scan frame.
Return Value¶
0on success.- Negative errno on failure.
Minimal Example¶
struct myadc_scan scan = { 0 };
scan.ch0 = value0;
scan.ch1 = value1;
return iio_push_to_buffers(indio_dev, &scan);
Common Pitfalls¶
- The data layout must match enabled scan elements.
- Alignment matters when timestamps or 64-bit fields are used.
- Use
iio_push_to_buffers_with_timestamp()when the frame needs an explicit timestamp.