Page MenuHomeFreeBSD

spi(8) - "-S" option for continuous stream from standard input to bus
ClosedPublic

Authored by reviews-freebsd-org412_ketas.si.pri.ee on Jan 15 2026, 8:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 24, 4:44 AM
Unknown Object (File)
Wed, May 20, 7:48 PM
Unknown Object (File)
Wed, May 20, 10:21 AM
Unknown Object (File)
Tue, May 19, 8:14 AM
Unknown Object (File)
Tue, May 19, 2:02 AM
Unknown Object (File)
Mon, May 18, 3:03 AM
Unknown Object (File)
Sun, May 17, 3:43 AM
Unknown Object (File)
Fri, May 15, 3:36 AM
Subscribers

Details

Summary

created to allow addressable leds to be driven by abusing spi bus as waveform generator. this might have other uses for similar "permanent" spi transfers

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69916
Build 66799: arc lint + arc unit

Event Timeline

The manpage could do with a bit more work but we can work on that a bit after landing. Lemme get some more eyeballs on this.

usr.sbin/spi/spi.c
379

} else {

is the right way to do it in style(9)

usr.sbin/spi/spi.8
150

At risk of being overly verbose

The manpage could do with a bit more work but we can work on that a bit after landing. Lemme get some more eyeballs on this.

The manpage could do with a bit more work but we can work on that a bit after landing. Lemme get some more eyeballs on this.

so elses cuddle?

but that would mean entire code should be rewritten? i did indeed copy style already present. i'm also not sure i've seen it elsewhere

This revision was not accepted when it landed; it landed in state Needs Review.Jan 17 2026, 3:42 AM
This revision was automatically updated to reflect the committed changes.
kevans added inline comments.
usr.sbin/spi/spi.c
367–378

I probably would've just written the fdir logic once wrapped in a

do {

} while (stream && !err && !feof(stdin));

Just to avoid the interior repetition.

i was thinking of that already. that there must be way to run that while loop once with stream == 0. this is even better maybe as it shoots first and asks questions later. maybe it fits as there's no extra useless check. anyway i was always like how about an Actual C Coder (TM) *also* reviewing this

usr.sbin/spi/spi.c
367–378

i was thinking of that already. that there must be way to run that while loop once with stream == 0. this is even better maybe as it shoots first and asks questions later. maybe it fits as there's no extra useless check. anyway i was always like how about an Actual C Coder (TM) *also* reviewing this