Re: Problems with using IIO buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Mathias,

For iio_readdev api, the default timeout is 1s that's why you're getting timeout error as the trigger fails to happen within that timeout period.

It'd be worth to note that this api is not a blocking call.

If you wanna use iio_readddev you can probably increase the timeout in local.c file of libiio source.

Change the timeout value of DEFAULT_TIMEOUT_MS to 5000 or anything which will let the trigger to happen. Depending upon the buffer and sample
size you'll require corresponding number of triggers.

For instance, for the buffer length of 2 and you want 2 samples

iio_readdev -t sysfstrig1 -b 2 -s 2 mydev

In this case, if 2 triggers happen within that timeout period, iio_readdev api will successfully return the buffer content.

But for iio_generic_buffer, buffer contents are returned after getting enough triggers (blocking).

Thanks,
Mani
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux