updated dependencies

This commit is contained in:
didier committed 2024-08-09 10:16:42 -04:00
1 parent 27326eb1cb
commit 010b70b6fc
6 files changed
+16 -7

No files matched your search

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