1SPI-PIPE(1) User Commands SPI-PIPE(1)
2
3
4
6 spi-pipe - full-duplex SPI communication tool.
7
9 spi-pipe options...
10
12 This program allows full-duplex communications, sending data from its
13 standard input to the SPI slave, and displaying on its standard output
14 the data received from the SPI port.
15
16 -d, --device=DEVICE
17 use the given Linux spidev character device.
18
19 -s, --speed=<int>
20 set the target SPI speed for transfer.
21
22 -b, --blocksize=<int>
23 set the block size (in bytes) for transfer.
24
25 -n, --number=<int>
26 set the number of blocks to transmit (-1 for continuous trans‐
27 fert).
28
29 -h, --help
30 display the help screen and exit.
31
32 -v, --version
33 display the version number and exit.
34
35
37 Get help:
38 $ spi-pipe -h
39
40 Send and receive at the same time
41 $ command-1 | spi-pipe --device=/dev/spidev0.0 | command-2
42 Note that command-1, command-2 and spi-pipe run simultaneously
43 in three different processes.
44
45 Send data to the SPI link
46 $ command-1 | spi-pipe --device=/dev/spidev0.0
47
48 Receive data from the SPI link
49 $ spi-pipe --device=/dev/spidev0.0 < /dev/zero | command-2
50 You can also use command-2 < /dev/spidev0.0 but with spi-pipe
51 you can control what is sent to the device (always `0` here).
52
53 Read 40 blocks of 4 bytes from the SPI link
54 $ spi-pipe --device=/dev/spidev0.0 -b 4 -n 40 < /dev/zero |
55 command-2
56
58 Written by Christophe BLAESS <https://www.blaess.fr/christophe>.
59
61 Github home page: <https://github.com/cpb-/spi-tools.git>
62
64 Copyright © 2014 Christophe Blaess.
65 Licensed under GPLv2 <http://gnu.org/licenses/gpl.html>.
66 This is free software: you are free to change and redistribute it.
67 There is NO WARRANTY, to the extent permitted by law.
68
69
70
71SPI-tools August 2014 SPI-PIPE(1)