updated dependencies
This commit is contained in:
1 parent
27326eb1cb
commit
010b70b6fc
6 files changed
+16
-7
No files matched your search
@@ -2,7 +2,7 @@ module go-orange
|
||||
|
||||
go 1.22
|
||||
|
||||
replace periph.io/x/host/v3 v3.8.2 => github.com/didiercrunch/host/v3 v3.8.3-0.20240804013031-ebd0129f1012
|
||||
replace periph.io/x/host/v3 v3.8.2 => github.com/didiercrunch/host/v3 v3.8.3-0.20240809141600-6580ef45de14
|
||||
|
||||
require (
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/didiercrunch/host/v3 v3.8.3-0.20240804013031-ebd0129f1012 h1:+0T8+4VvHmA5ZDVAZMHolXk0jgWBLQl5WufXWyt1Qoc=
|
||||
github.com/didiercrunch/host/v3 v3.8.3-0.20240804013031-ebd0129f1012/go.mod h1:yFL76AesNHR68PboofSWYaQTKmvPXsQH2Apvp/ls/K4=
|
||||
github.com/didiercrunch/host/v3 v3.8.3-0.20240809141600-6580ef45de14 h1:N14nlh8xT4J9gy4fwEZCGzn2U63PkRA908DzmK0xsV0=
|
||||
github.com/didiercrunch/host/v3 v3.8.3-0.20240809141600-6580ef45de14/go.mod h1:yFL76AesNHR68PboofSWYaQTKmvPXsQH2Apvp/ls/K4=
|
||||
github.com/jonboulle/clockwork v0.3.0 h1:9BSCMi8C+0qdApAp4auwX0RkLGUjs956h0EkuQymUhg=
|
||||
github.com/jonboulle/clockwork v0.3.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
|
||||
Vendored
+1
-1
@@ -21,7 +21,7 @@ periph.io/x/conn/v3/pin
|
||||
periph.io/x/conn/v3/pin/pinreg
|
||||
periph.io/x/conn/v3/spi
|
||||
periph.io/x/conn/v3/spi/spireg
|
||||
# periph.io/x/host/v3 v3.8.2 => github.com/didiercrunch/host/v3 v3.8.3-0.20240804013031-ebd0129f1012
|
||||
# periph.io/x/host/v3 v3.8.2 => github.com/didiercrunch/host/v3 v3.8.3-0.20240809141600-6580ef45de14
|
||||
## explicit; go 1.20
|
||||
periph.io/x/host/v3
|
||||
periph.io/x/host/v3/allwinner
|
||||
|
||||
+4
@@ -1,3 +1,7 @@
|
||||
// Copyright 2024 The Periph Authors. All rights reserved.
|
||||
// Use of this source code is governed under the Apache License, Version 2.0
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
package allwinner
|
||||
|
||||
import (
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
// Copyright 2022 The Periph Authors. All rights reserved.
|
||||
// Copyright 2024 The Periph Authors. All rights reserved.
|
||||
// Use of this source code is governed under the Apache License, Version 2.0
|
||||
// that can be found in the LICENSE file.
|
||||
|
||||
// This file contains pin mapping information that is specific to the Allwinner
|
||||
// H5 model.
|
||||
// H6 model.
|
||||
|
||||
package allwinner
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
//_ "embed"
|
||||
"encoding/json"
|
||||
"periph.io/x/conn/v3/pin"
|
||||
"periph.io/x/host/v3/sysfs"
|
||||
|
||||
+5
@@ -223,6 +223,7 @@ func (p *Pin) Read() gpio.Level {
|
||||
// WaitForEdge implements gpio.PinIn.
|
||||
func (p *Pin) WaitForEdge(timeout time.Duration) bool {
|
||||
// Run lockless, as the normal use is to call in a busy loop.
|
||||
fmt.Println("Waiting for hedge")
|
||||
var ms int
|
||||
if timeout == -1 {
|
||||
ms = -1
|
||||
@@ -232,10 +233,13 @@ func (p *Pin) WaitForEdge(timeout time.Duration) bool {
|
||||
start := time.Now()
|
||||
for {
|
||||
if nr, err := p.event.Wait(ms); err != nil {
|
||||
fmt.Printf("Received an error %s\n", err)
|
||||
return false
|
||||
} else if nr == 1 {
|
||||
// TODO(maruel): According to pigpio, the correct way to consume the
|
||||
// interrupt is to call Seek().
|
||||
|
||||
fmt.Printf("Received a value %d\n", nr)
|
||||
return true
|
||||
}
|
||||
// A signal occurred.
|
||||
@@ -243,6 +247,7 @@ func (p *Pin) WaitForEdge(timeout time.Duration) bool {
|
||||
ms = int((timeout - time.Since(start)) / time.Millisecond)
|
||||
}
|
||||
if ms <= 0 {
|
||||
fmt.Println("Timed out! return false")
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user