Some SPI devices take a while to set up for transfer, and while doing
so, show the first bit they're about to send.
This causes the first LED to always interpret the first symbol as a
logical 1. Zapping out the whole strip will leave the first LED green,
and the first pixel will always be slightly green-ish.
Prevent this, by applying the same 3 bit padding we have at the end to
the front.
Signed-off-by: Florian Klink <flokli@flokli.de>
This does result in a few awkward cases but in general it's worth
enforcing and most importantly will make my life as a code reviewer
easier.
It's mostly deletion of dead code.
This is supposed to be sent out in GRB order (and the comment below also
below claims it), but the code (and corresponding unit tests) did output
RGB order.
First I imported the commits from v3.6.6 with:
PKG=devices
git init $PKG
cd $PKG
git remote add origin https://github.com/google/periph
git fetch origin
git filter-repo \
--path AUTHORS \
--path CONTRIBUTING.md \
--path CONTRIBUTORS \
--path LICENSE \
--path README.md \
--path $PKG --path experimental/$PKG $@
git remote add origin git@github.com:periph/$PKG
git fetch origin
# Use the occasion to rename from master to main since we are starting from
# scratch.
git branch -m main
git push origin main
Then I fixed the layout to get rid of experimental with:
git rm experimental/devices/README.md
git mv experimental/devices/* .
git mv devices/* .
The import paths will be fixed in a follow up.