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
Details
- Reviewers
adrian - Group Reviewers
manpages - Commits
- rG6dc12ecfb268: spi: "-S" option for continuous stream from standard input to bus
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 | |
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
| 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 | |