Commit Graph

4 Commits (52fe797167c688a633cb45565319519bc5d26455)

Author SHA1 Message Date
Bracken 7cccb95509
Prevent WaitForEdge() returning early after first call to selectCard() (#7)
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
5 years ago
Marc-Antoine Ruel 402bbcc930 Migrate to devices/v3
Ran:
  git ls-files -z -- . | xargs -0 -L 1 sed -i 's#periph\.io/x/conn#periph.io/x/conn/v3#g'
  git ls-files -z -- . | xargs -0 -L 1 sed -i 's#periph\.io/x/host#periph.io/x/host/v3#g'
  git ls-files -z -- . | xargs -0 -L 1 sed -i 's#periph\.io/x/devices#periph.io/x/devices/v3#g'
  go test ./...
  go mod tidy
5 years ago
Marc-Antoine Ruel 655d1cef69 Update import path to what devices will be
Also update imports to conn and host.

Ran (roughly):
  # Update the references.
  git ls-files -- . | xargs -L 1 sed -i 's#x/periph/conn#x/conn#g'
  git ls-files -- . | xargs -L 1 sed -i 's#x/periph/experimental/conn#x/conn#g'
  git ls-files -- . | xargs -L 1 sed -i 's#x/periph/host#x/host#g'
  git ls-files -- . | xargs -L 1 sed -i 's#x/periph/experimental/host#x/host#g'
  git ls-files -- . | xargs -L 1 sed -i 's#x/periph/devices#x/devices#g'
  git ls-files -- . | xargs -L 1 sed -i 's#x/periph/experimental/devices#x/devices#g'

  # Initialize the go module:
  go mod init periph.io/x/devices

  # Edited it to require go 1.13:
  vi go.mod

  # Reorder imports.
  goimports -w .
5 years ago
Marc-Antoine Ruel 1de83694a1 Migrate layout to the destination layout
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.
5 years ago