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
F144292576: D54734.id169812.diff
Sat, Feb 7, 4:39 PM
Unknown Object (File)
Sun, Feb 1, 3:33 AM
Unknown Object (File)
Sat, Jan 31, 11:00 PM
Unknown Object (File)
Sat, Jan 31, 7:52 AM
Unknown Object (File)
Fri, Jan 30, 10:35 PM
Unknown Object (File)
Wed, Jan 28, 3:16 PM
Unknown Object (File)
Tue, Jan 27, 1:05 PM
Unknown Object (File)
Mon, Jan 26, 1:23 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

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