Skip to content

Commit

Permalink
man: iio_{read,write}dev: Update examples
Browse files Browse the repository at this point in the history
Update the USAGE section which prints examples of how iio_readdev and
iio_writedev can be used.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
  • Loading branch information
pcercuei committed May 11, 2023
1 parent eacddbf commit 33b8b70
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
23 changes: 13 additions & 10 deletions man/iio_readdev.1.in
Expand Up @@ -59,20 +59,23 @@ If the specified device is not found, a non-zero exit code is returned.
.SH "USAGE"
.PP
You use iio_readdev in the same way you use many of the other libiio utilities.
You must specify a IIO device, and the specific channel to read. Since this is a read, channels must be input.
It is easy to use
.B iio_attr
to find out what the channels are called.
.PP
This identifies the device, and channel that can be used.
You should specify a IIO device, and the specific channel to read. Since this is a read, channels must be input.
If no channel is provided, iio_readdev will read from all input channels.
If no device is provided, iio_readdev will print a few examples:
.RS
.B \f(CWiio_attr \-a \-i \-c .\fP
.B \f(CWiio_readdev -a\fP
.br
Using auto-detected IIO context at URI "usb:3.10.5"
.br
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc voltage0
.br
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc voltage1
.br
\f(CWUsing auto-detected IIO context at URI "usb:3.10.5"\fP
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc voltage2
.br
dev 'cf-ad9361-lpc', channel 'voltage0' (input, index: 0, format: le:S12/16>>0)
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc voltage3
.br
dev 'cf-ad9361-lpc', channel 'voltage1' (input, index: 1, format: le:S12/16>>0)
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc
.RE
.PP
This captures 1024 samples of I and Q data from the USB attached AD9361, and
Expand Down
25 changes: 14 additions & 11 deletions man/iio_writedev.1.in
Expand Up @@ -62,21 +62,24 @@ If the specified device is not found, a non-zero exit code is returned.

.SH "USAGE"
.PP
You use iio_readdev in the same way you use many of the other libiio utilities.
You must specify a IIO device, and the specific channel to read. Since this is a write, channels must be output.
It is easy to use
.B iio_attr
to find out what the channels are called.
.PP
This identifies the device, and channel that can be used.
You use iio_writedev in the same way you use many of the other libiio utilities.
You should specify a IIO device, and the specific channel to write. Since this is a write, channels must be output.
If no channel is provided, iio_writedev will write to all output channels.
If no device is provided, iio_writedev will print a few examples:
.RS
.B \f(CWiio_attr \-a \-o \-c .\fP
.B \f(CWiio_writedev -a\fP
.br
Using auto-detected IIO context at URI "usb:3.10.5"
.br
Example : iio_writedev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-dds-core-lpc voltage0
.br
Example : iio_writedev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-dds-core-lpc voltage1
.br
\f(CWUsing auto-detected IIO context at URI "usb:3.10.5"\fP
Example : iio_writedev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-dds-core-lpc voltage2
.br
dev 'cf-ad9361-dds-core-lpc', channel 'voltage0' (output, index: 0, format: le:S16/16>>0)
Example : iio_writedev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-dds-core-lpc voltage3
.br
dev 'cf-ad9361-dds-core-lpc', channel 'voltage1' (output, index: 1, format: le:S16/16>>0)
Example : iio_writedev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-dds-core-lpc
.RE
.PP
This sends 1024 samples of I and Q data to the USB attached AD9361. data is taking from standard in, in a binary format.
Expand Down

0 comments on commit 33b8b70

Please sign in to comment.