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 Thu, Jan 15, 8:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 16, 5:22 AM
Unknown Object (File)
Fri, Jan 16, 4:55 AM
Unknown Object (File)
Thu, Jan 15, 11:19 PM
Unknown Object (File)
Thu, Jan 15, 11:19 PM
Unknown Object (File)
Thu, Jan 15, 10:59 PM
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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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–380

} 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.Sat, Jan 17, 3:42 AM
This revision was automatically updated to reflect the committed changes.
kevans added inline comments.
usr.sbin/spi/spi.c
367

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

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