From: Mani Sadhasivam <manivannanece23@gmail.com>
To: matthias@tenstral.net
Cc: pmeerw@pmeerw.net, jic23@kernel.org, linux-iio@vger.kernel.org
Subject: Re: Problems with using IIO buffers
Date: Sat, 28 Jan 2017 00:23:43 +0530 [thread overview]
Message-ID: <20170127185343.GA24828@gmail.com> (raw)
In-Reply-To: CAKNHny9saYXafENh0EcAvCw8fVtfK5LoiwusSpUMiCh0Fkh_ng@mail.gmail.com
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
next reply other threads:[~2017-01-27 19:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 18:53 Mani Sadhasivam [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-12-20 10:18 Problems with using IIO buffers Matthias Klumpp
2016-12-20 10:46 ` Peter Meerwald-Stadler
[not found] ` <CAKNHny_yV-FV9smGfrX2wR-T7M5uCk9WWG4xNGBMXrAuwVy2ZA@mail.gmail.com>
2016-12-20 16:30 ` Peter Meerwald-Stadler
2016-12-20 16:49 ` Matthias Klumpp
2016-12-30 18:34 ` Jonathan Cameron
2017-01-09 1:59 ` Matthias Klumpp
2017-01-10 13:29 ` Matthias Klumpp
2017-01-10 14:18 ` jic23
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170127185343.GA24828@gmail.com \
--to=manivannanece23@gmail.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=matthias@tenstral.net \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).