logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

spi-pipe - full-duplex SPI communication tool.

Author

       Written by Christophe BLAESS <http://www.blaess.fr/christophe>.

Description

       This  program  allows  full-duplex communications, sending data from its standard input to the SPI slave,
       and displaying on its standard output the data received from the SPI port.

       -d, --device=DEVICE
              use the given Linux spidev character device.

       -s, --speed=<int>
              set the target SPI speed for transfer.

       -b, --blocksize=<int>
              set the block size (in bytes) for transfer.

       -n, --number=<int>
              set the number of blocks to transmit (-1 for continuous transfert).

       -h, --help
              display the help screen and exit.

       -v, --version
              display the version number and exit.

Examples

       Get help:
              $ spi-pipe-h

       Send and receive at the same time
              $ command-1 | spi-pipe--device=/dev/spidev0.0  | command-2
              Note that command-1, command-2 and spi-pipe run simultaneously in three different processes.

       Send data to the SPI link
              $ command-1 | spi-pipe--device=/dev/spidev0.0

       Receive data from the SPI link
              $ spi-pipe--device=/dev/spidev0.0</dev/zero | command-2
              You can also use command-2</dev/spidev0.0 but with spi-pipe you can control what is sent to  the
              device (always `0` here).

       Read 40 blocks of 4 bytes from the SPI link
              $  spi-pipe--device=/dev/spidev0.0-b4-n40</dev/zero | command-2

Name

       spi-pipe - full-duplex SPI communication tool.

Reporting Bugs

       Github home page: <https://github.com/cpb-/spi-tools.git>

Synopsis

spi-pipeoptions...

See Also