SPI-PIPE(1)

πŸ“¦
version 1.0.2 Β· 3 versions
, in alpine 3.24, fedora 43, fedora 44, nixos 26.05, opensuse-leap 16.0

🌸 NAME 🌸

okay so bestie, meet spi-pipe β€” a full-duplex SPI communication tool. that's it, that's the whole name section, but trust, it does a LOT πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

spi-pipe options...

✨ DESCRIPTION ✨

so here's the tea: this program lets you do full-duplex communications. it takes data from its standard input, sends it off to the SPI slave, and then puts on its standard output whatever data came back from the SPI port. sending AND receiving at the same time, no cap. both directions, simultaneously, like a true multitasking icon 🫢

and now the options, because you KNOW we're going through every single one:

  • -d, --device=DEVICE β€” use the Linux spidev character device you pass in here, bestie.
  • -s, --speed=<int> β€” sets the target SPI speed for the transfer. go fast, go slow, your call ✨
  • -b, --blocksize=<int> β€” sets the block size, in bytes, for the transfer.
  • -n, --number=<int> β€” sets how many blocks to transmit. and listen, if you pass -1 it just keeps going forever, continuous transfert, no chill πŸ’€
  • -h, --help β€” shows the help screen and exits. the classic.
  • -v, --version β€” shows the version number and exits.

πŸŽ€ EXAMPLES πŸŽ€

these are the moments, bestie. copy them, run them, live them πŸ’–

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. three besties, three processes, one vibe 🌈

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 could also just use command-2 < /dev/spidev0.0, but with spi-pipe you get to control what is sent to the device (always 0 here). control freak? no, icon behavior πŸ‘‘

Read 40 blocks of 4 bytes from the SPI link

$  spi-pipe --device=/dev/spidev0.0 -b 4 -n 40 < /dev/zero |
command-2

πŸ’œ AUTHOR πŸ’œ

Written by Christophe BLAESS <https://www.blaess.fr/christophe>. yeah, the author, we love them for this 🫢


πŸ™ˆ REPORTING BUGS πŸ™ˆ

Github home page: <https://github.com/cpb-/spi-tools.git>. found a bug? go tell the github, they wanna know, fr fr.


Copyright Β© 2014 Christophe Blaess.

Licensed under GPLv2 <http://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. like, none. zero. nada. so don't come for anyone if it goes sideways 😭

and that's the whole page, bestie. it's SPI-tools, from way back in August 2014, and it's still serving. go pipe something. mwah πŸ’…βœ¨