Skip to content

Commit 33b8b70

Browse files
committed
man: iio_{read,write}dev: Update examples
Update the USAGE section which prints examples of how iio_readdev and iio_writedev can be used. Signed-off-by: Paul Cercueil <[email protected]>
1 parent eacddbf commit 33b8b70

File tree

2 files changed

+27
-21
lines changed

2 files changed

+27
-21
lines changed

man/iio_readdev.1.in

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,23 @@ If the specified device is not found, a non-zero exit code is returned.
5959
.SH "USAGE"
6060
.PP
6161
You use iio_readdev in the same way you use many of the other libiio utilities.
62-
You must specify a IIO device, and the specific channel to read. Since this is a read, channels must be input.
63-
It is easy to use
64-
.B iio_attr
65-
to find out what the channels are called.
66-
.PP
67-
This identifies the device, and channel that can be used.
62+
You should specify a IIO device, and the specific channel to read. Since this is a read, channels must be input.
63+
If no channel is provided, iio_readdev will read from all input channels.
64+
If no device is provided, iio_readdev will print a few examples:
6865
.RS
69-
.B \f(CWiio_attr \-a \-i \-c .\fP
66+
.B \f(CWiio_readdev -a\fP
67+
.br
68+
Using auto-detected IIO context at URI "usb:3.10.5"
69+
.br
70+
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc voltage0
71+
.br
72+
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc voltage1
7073
.br
71-
\f(CWUsing auto-detected IIO context at URI "usb:3.10.5"\fP
74+
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc voltage2
7275
.br
73-
dev 'cf-ad9361-lpc', channel 'voltage0' (input, index: 0, format: le:S12/16>>0)
76+
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc voltage3
7477
.br
75-
dev 'cf-ad9361-lpc', channel 'voltage1' (input, index: 1, format: le:S12/16>>0)
78+
Example : iio_readdev -u usb:3.10.5 -b 256 -s 1024 cf-ad9361-lpc
7679
.RE
7780
.PP
7881
This captures 1024 samples of I and Q data from the USB attached AD9361, and

man/iio_writedev.1.in

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,24 @@ If the specified device is not found, a non-zero exit code is returned.
6262

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

0 commit comments

Comments
 (0)