- Use go1.17 for github actions.
- Use go mod edit instead of go get for testing other packages. There's two
benefits:
- This removes the round trip to pkg.go.dev and use the already present local
checkout.
- The go get periph.io/x/conn/v3@${GITHUB_SHA} command worked if a maintainer
push a branch, but fails for a PR. This is because the go get command does a
clone with all the branches, so it finds the commit even if it's not in main.
For a PR, one has to pull a specific refs/pull/ID/head ref that is not a
branch, thus go get cannot find it because git clone doesn't know about it.
The only way to work around is to git clone manually.
- Remove 'go version' and 'go env' since they are already run as part of
setup-go@v2.
- Fix a new check in go vet in example code.
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.
* Added support for Inky pHAT v2
* Added support for detecting Inky board. Detect Inky board opts from eeprom, and detect new inky dev with sane default from opts
Calling LowLevel.Init() in selectCard() clears the device interrupt
as a side effect, but another interrupt will occur due to the
subsquent operations. This additional host interrupt must be cleared
before the next call to selectCard.
Fixes https://github.com/google/periph/issues/425
Whether or not CS (chip select) is used really depends on the way how
you wire things together, not on the device you're talking to.
Not using CS (and explicitly telling the SPI controller about that)
might keep some pins free on pin-constrained boards, but also, some
controllers (or Linux drivers) don't support disabling CS, and fail when
that flag is given.
On the other hand, even though nrzleds don't make use of CS by
themselves, you could very well have some circuit in front to do the
chip select, and then actually write to different nrzled devices
sequentially.
Long-term, the fact on whether to do chip select should be specified
while passing in the SPI port to be used, as it really depends on the
way it's wired together on the specific board, not on the type of
device.
This is done by changing the cache key.
go get tools currently fail with:
# cd /home/runner/go/src/golang.org/x/tools; git pull --ff-only
From https://go.googlesource.com/tools
+ 63754364...8b4aab62 master -> origin/master (forced update)
ab9934f0..f2d1c246 gopls-release-branch.0.6 -> origin/gopls-release-branch.0.6
* [new branch] internal-branch.issue43628 -> origin/internal-branch.issue43628
* [new tag] gopls/v0.6.2 -> gopls/v0.6.2
* [new tag] gopls/v0.6.3-pre.1 -> gopls/v0.6.3-pre.1
fatal: Not possible to fast-forward, aborting.
package golang.org/x/tools/go/analysis: exit status 128
See https://github.com/periph/devices/pull/2/checks?check_run_id=1693498363
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.
This adds experimental support for the st7567 LCD device which is used by the GFX HAT from Pimoroni.
The example just places some pixels on the device and iterates over the possible contrast values, going into power save mode and waking up.
The command line tool can take a PNG image and paints the black pixels onto the LCD.
Example and command line tool have been tested with a GFX Hat.
Take inspiration from the workflows used in gohci and bootstrap but
disable many checks because it's going to take a while to fix them all.
Update go generate to make it work without prerequisites preinstalled.
Remove the corresponding checks from .travis.yml. There are still checks
that haven't been transitioned, this will be done in a follow up.