chore: bump periph.io dependencies

This commit is contained in:
2022-01-02 23:37:01 +01:00
parent 0b8d2218c1
commit c1ec63fcc1
63 changed files with 506 additions and 5328 deletions

380
vendor/periph.io/x/conn/v3/.gohci.yml generated vendored
View File

@ -17,62 +17,87 @@ workers:
- -benchtime=1000ms
- -benchmem
- ./...
# Test in advance.
- cmd:
# Test in advance: host
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/host
dir: ..
- cmd:
- dir: ../host
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../host
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../host
- cmd:
- -t
- ./...
- dir: ../host
cmd:
- go
- test
- -short
- ./...
dir: ../host
# Test in advance.
- cmd:
# Test in advance: devices
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/devices
dir: ..
- cmd:
- dir: ../devices
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../devices
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../devices
- cmd:
- -t
- ./...
- dir: ../devices
cmd:
- go
- test
- -short
- ./...
dir: ../devices
# Test in advance.
- cmd:
# Test in advance: cmd
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/cmd
dir: ..
- cmd:
- dir: ../cmd
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../cmd
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../cmd
- cmd:
- -t
- ./...
- dir: ../cmd
cmd:
- go
- test
- -short
- ./...
dir: ../cmd
# Test commands.
- cmd:
- dir: ../cmd
cmd:
- go
- install
- -v
@ -81,7 +106,6 @@ workers:
- ./periph-info
- ./periph-smoketest
- ./spi-list
dir: ../cmd
- cmd:
- periph-info
- cmd:
@ -111,62 +135,87 @@ workers:
- -benchtime=1000ms
- -benchmem
- ./...
# Test in advance.
- cmd:
# Test in advance: host
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/host
dir: ..
- cmd:
- dir: ../host
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../host
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../host
- cmd:
- -t
- ./...
- dir: ../host
cmd:
- go
- test
- -short
- ./...
dir: ../host
# Test in advance.
- cmd:
# Test in advance: devices
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/devices
dir: ..
- cmd:
- dir: ../devices
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../devices
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../devices
- cmd:
- -t
- ./...
- dir: ../devices
cmd:
- go
- test
- -short
- ./...
dir: ../devices
# Test in advance.
- cmd:
# Test in advance: cmd
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/cmd
dir: ..
- cmd:
- dir: ../cmd
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../cmd
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../cmd
- cmd:
- -t
- ./...
- dir: ../cmd
cmd:
- go
- test
- -short
- ./...
dir: ../cmd
# Test commands.
- cmd:
- dir: ../cmd
cmd:
- go
- install
- -v
@ -176,7 +225,6 @@ workers:
- ./periph-info
- ./periph-smoketest
- ./spi-list
dir: ../cmd
- cmd:
- periph-info
- cmd:
@ -219,62 +267,87 @@ workers:
- -benchtime=1000ms
- -benchmem
- ./...
# Test in advance.
- cmd:
# Test in advance: host
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/host
dir: ..
- cmd:
- dir: ../host
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../host
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../host
- cmd:
- -t
- ./...
- dir: ../host
cmd:
- go
- test
- -short
- ./...
dir: ../host
# Test in advance.
- cmd:
# Test in advance: devices
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/devices
dir: ..
- cmd:
- dir: ../devices
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../devices
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../devices
- cmd:
- -t
- ./...
- dir: ../devices
cmd:
- go
- test
- -short
- ./...
dir: ../devices
# Test in advance.
- cmd:
# Test in advance: cmd
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/cmd
dir: ..
- cmd:
- dir: ../cmd
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../cmd
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../cmd
- cmd:
- -t
- ./...
- dir: ../cmd
cmd:
- go
- test
- -short
- ./...
dir: ../cmd
# Test commands.
- cmd:
- dir: ../cmd
cmd:
- go
- install
- -v
@ -284,7 +357,6 @@ workers:
- ./periph-info
- ./periph-smoketest
- ./spi-list
dir: ../cmd
- cmd:
- periph-info
- cmd:
@ -343,62 +415,87 @@ workers:
- -benchtime=1000ms
- -benchmem
- ./...
# Test in advance.
- cmd:
# Test in advance: host
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/host
dir: ..
- cmd:
- dir: ../host
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../host
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../host
- cmd:
- -t
- ./...
- dir: ../host
cmd:
- go
- test
- -short
- ./...
dir: ../host
# Test in advance.
- cmd:
# Test in advance: devices
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/devices
dir: ..
- cmd:
- dir: ../devices
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../devices
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../devices
- cmd:
- -t
- ./...
- dir: ../devices
cmd:
- go
- test
- -short
- ./...
dir: ../devices
# Test in advance.
- cmd:
# Test in advance: cmd
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/cmd
dir: ..
- cmd:
- dir: ../cmd
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../cmd
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../cmd
- cmd:
- -t
- ./...
- dir: ../cmd
cmd:
- go
- test
- -short
- ./...
dir: ../cmd
# Test commands.
- cmd:
- dir: ../cmd
cmd:
- go
- install
- -v
@ -408,7 +505,6 @@ workers:
- ./periph-info
- ./periph-smoketest
- ./spi-list
dir: ../cmd
- cmd:
- periph-info
- cmd:
@ -433,62 +529,87 @@ workers:
- -benchtime=1000ms
- -benchmem
- ./...
# Test in advance.
- cmd:
# Test in advance: host
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/host
dir: ..
- cmd:
- dir: ../host
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../host
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../host
- cmd:
- -t
- ./...
- dir: ../host
cmd:
- go
- test
- -short
- ./...
dir: ../host
# Test in advance.
- cmd:
# Test in advance: devices
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/devices
dir: ..
- cmd:
- dir: ../devices
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../devices
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../devices
- cmd:
- -t
- ./...
- dir: ../devices
cmd:
- go
- test
- -short
- ./...
dir: ../devices
# Test in advance.
- cmd:
# Test in advance: cmd
- dir: ..
cmd:
- git
- clone
- --depth
- 1
- https://github.com/periph/cmd
dir: ..
- cmd:
- dir: ../cmd
cmd:
- go
- mod
- edit
- -replace=periph.io/x/conn/v3=../conn
- dir: ../cmd
cmd:
- go
- get
- periph.io/x/conn/v3@${GIT_SHA}
dir: ../cmd
- cmd:
- -t
- ./...
- dir: ../cmd
cmd:
- go
- test
- -short
- ./...
dir: ../cmd
# Test commands.
- cmd:
- dir: ../cmd
cmd:
- go
- install
- -v
@ -498,7 +619,6 @@ workers:
- ./periph-info
- ./periph-smoketest
- ./spi-list
dir: ../cmd
- cmd:
- periph-info
- cmd:

View File

@ -9,8 +9,7 @@ get an [invite here](https://invite.slack.golangbridge.org/).
[![mascot](https://raw.githubusercontent.com/periph/website/master/site/static/img/periph-mascot-280.png)](https://periph.io/)
[![PkgGoDev](https://pkg.go.dev/badge/periph.io/x/conn/v3)](https://pkg.go.dev/periph.io/x/conn/v3)
[![Coverage
Status](https://codecov.io/gh/periph/conn/graph/badge.svg)](https://codecov.io/gh/periph/conn)
[![codecov](https://codecov.io/gh/periph/conn/branch/main/graph/badge.svg?token=1WIDCAJIK8)](https://codecov.io/gh/periph/conn)
## Example

View File

@ -5,6 +5,7 @@
// This file contains the parallelized driver loading logic. It is meant to be
// load the drivers as fast as possible by parallelising work.
//go:build !tinygo
// +build !tinygo
package driverreg
@ -50,9 +51,11 @@ func initImpl() (*State, error) {
if err != nil {
return state, err
}
loaded := make(map[string]struct{}, len(byName))
loaded := sync.Map{}
for _, s := range stages {
s.loadParallel(loaded, cD, cS, cE)
// It's very important that each of the stage is fully completed before the
// next one is attempted.
s.loadParallel(&loaded, cD, cS, cE)
}
close(cD)
close(cS)
@ -61,10 +64,9 @@ func initImpl() (*State, error) {
return state, nil
}
// loadParallel loads all the drivers for this stage in parallel.
//
// Updates loaded in a safe way.
func (s *stage) loadParallel(loaded map[string]struct{}, cD chan<- driver.Impl, cS, cE chan<- DriverFailure) {
// loadParallel loads all the drivers for this stage in parallel and returns
// once they are all loaded.
func (s *stage) loadParallel(loaded *sync.Map, cD chan<- driver.Impl, cS, cE chan<- DriverFailure) {
success := make(chan string)
go func() {
defer close(success)
@ -73,7 +75,7 @@ func (s *stage) loadParallel(loaded map[string]struct{}, cD chan<- driver.Impl,
for name, drv := range s.drvs {
// Intentionally do not look at After(), only Prerequisites().
for _, dep := range drv.Prerequisites() {
if _, ok := loaded[dep]; !ok {
if _, ok := loaded.Load(dep); !ok {
cS <- DriverFailure{drv, errors.New("dependency not loaded: " + strconv.Quote(dep))}
continue loop
}
@ -98,6 +100,6 @@ func (s *stage) loadParallel(loaded map[string]struct{}, cD chan<- driver.Impl,
wg.Wait()
}()
for s := range success {
loaded[s] = struct{}{}
loaded.Store(s, nil)
}
}

View File

@ -5,6 +5,7 @@
// This file contains the single threaded driver loading code, to be used on
// low performance cores.
//go:build tinygo
// +build tinygo
package driverreg