Function libiio_sys::iio_device_create_buffer
source · [−]pub unsafe extern "C" fn iio_device_create_buffer(
dev: *const iio_device,
samples_count: usize,
cyclic: bool
) -> *mut iio_buffer
Expand description
@brief Create an input or output buffer associated to the given device @param dev A pointer to an iio_device structure @param samples_count The number of samples that the buffer should contain @param cyclic If True, enable cyclic mode @return On success, a pointer to an iio_buffer structure @return On error, NULL is returned, and errno is set to the error code
NOTE: Channels that have to be written to / read from must be enabled before creating the buffer.