updated dependencies

This commit is contained in:
didier committed 2024-07-30 21:03:19 -04:00
1 parent 0d65285f3c
commit 06a1718040
4 files changed
+15 -5

No files matched your search

+1 -1
View File
@@ -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.20240727205032-408403ad5959
replace periph.io/x/host/v3 v3.8.2 => github.com/didiercrunch/host/v3 v3.8.3-0.20240731010218-bb162e3d8cce
require (
periph.io/x/conn/v3 v3.7.0
+2 -2
View File
@@ -1,5 +1,5 @@
github.com/didiercrunch/host/v3 v3.8.3-0.20240727205032-408403ad5959 h1:7p2Ogw4psja8WJmI2sNbM+7+EcYL/AO39BGX1axztag=
github.com/didiercrunch/host/v3 v3.8.3-0.20240727205032-408403ad5959/go.mod h1:yFL76AesNHR68PboofSWYaQTKmvPXsQH2Apvp/ls/K4=
github.com/didiercrunch/host/v3 v3.8.3-0.20240731010218-bb162e3d8cce h1:LhrUd2daNpvyvD52RIGqZz2RbmrxFqiuditM52WhyT0=
github.com/didiercrunch/host/v3 v3.8.3-0.20240731010218-bb162e3d8cce/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=
periph.io/x/conn/v3 v3.7.0 h1:f1EXLn4pkf7AEWwkol2gilCNZ0ElY+bxS4WE2PQXfrA=
+1 -1
View File
@@ -13,7 +13,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.20240727205032-408403ad5959
# periph.io/x/host/v3 v3.8.2 => github.com/didiercrunch/host/v3 v3.8.3-0.20240731010218-bb162e3d8cce
## explicit; go 1.20
periph.io/x/host/v3
periph.io/x/host/v3/allwinner
+11 -1
View File
@@ -309,7 +309,10 @@ func (p *Pin) Read() gpio.Level {
//
// This function is very fast.
func (p *Pin) FastRead() gpio.Level {
return gpio.Level(drvGPIO.gpioMemory.groups[p.group].data&(1<<p.offset) != 0)
foo := drvGPIO.gpioMemory.groups[p.group]
fmt.Printf("Group value is: %d", foo.data)
return gpio.Level(foo.data&(1<<p.offset) != 0)
}
// WaitForEdge implements gpio.PinIn.
@@ -480,8 +483,15 @@ func (p *Pin) setFunction(f function) {
mask := uint32(disabled) << shift
v := (uint32(f) << shift) ^ mask
// First disable, then setup. This is concurrent safe.
original := drvGPIO.gpioMemory.groups[p.group].cfg[off]
drvGPIO.gpioMemory.groups[p.group].cfg[off] |= mask
drvGPIO.gpioMemory.groups[p.group].cfg[off] &^= v
modified := original | mask
modified &^= v
fmt.Printf("Original: %d\n", original)
fmt.Printf("Modified: %d\n", modified)
fmt.Printf("Memory mapped value: %d\n", drvGPIO.gpioMemory.groups[p.group].cfg[off])
if p.function() != f {
fmt.Printf("Pin number %d. Pin name %s.\n Expected %d to equals %d \n", p.Number(), p.Name(), p.function(), f)
panic(f)