d
This commit is contained in:
1 parent
d3fbd695d7
commit
8e59ac2d74
5 files changed
+10
-4
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.20240727142115-bdcb8e456a6f
|
||||
replace periph.io/x/host/v3 v3.8.2 => github.com/didiercrunch/host/v3 v3.8.3-0.20240727143043-1d4731af2a77
|
||||
|
||||
require (
|
||||
periph.io/x/conn/v3 v3.7.0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
github.com/didiercrunch/host/v3 v3.8.3-0.20240727142115-bdcb8e456a6f h1:nwyKYSguhr5waBVv0JiNz7ZG3e3SgObaAnI+LiVyzRM=
|
||||
github.com/didiercrunch/host/v3 v3.8.3-0.20240727142115-bdcb8e456a6f/go.mod h1:yFL76AesNHR68PboofSWYaQTKmvPXsQH2Apvp/ls/K4=
|
||||
github.com/didiercrunch/host/v3 v3.8.3-0.20240727143043-1d4731af2a77 h1:CevaWVuNGyBEVFCljb25Cog7vFFKVNCcancQt58dGoc=
|
||||
github.com/didiercrunch/host/v3 v3.8.3-0.20240727143043-1d4731af2a77/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=
|
||||
|
||||
Vendored
+1
-1
@@ -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.20240727142115-bdcb8e456a6f
|
||||
# periph.io/x/host/v3 v3.8.2 => github.com/didiercrunch/host/v3 v3.8.3-0.20240727143043-1d4731af2a77
|
||||
## explicit; go 1.20
|
||||
periph.io/x/host/v3
|
||||
periph.io/x/host/v3/allwinner
|
||||
|
||||
+2
@@ -5,6 +5,7 @@
|
||||
package allwinner
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
@@ -41,6 +42,7 @@ func IsA20() bool {
|
||||
// It looks for the string "sun50iw1p1" in /proc/device-tree/compatible.
|
||||
func IsA64() bool {
|
||||
detection.do()
|
||||
fmt.Printf("IsA64? %t\n", detection.isA64)
|
||||
return detection.isA64
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -1007,6 +1007,7 @@ func (d *driverGPIO) Init() (bool, error) {
|
||||
|
||||
// Mark the right pins as available even if the memory map fails so they can
|
||||
// callback to sysfs.Pins.
|
||||
fmt.Println("Didier initiating allwinner gpio")
|
||||
switch {
|
||||
case IsA64():
|
||||
if err := mapA64Pins(); err != nil {
|
||||
@@ -1029,10 +1030,12 @@ func (d *driverGPIO) Init() (bool, error) {
|
||||
return true, err
|
||||
}
|
||||
case IsH6():
|
||||
fmt.Println("Is H6 CPU!!!")
|
||||
if err := mapH5Pins(); err != nil {
|
||||
return true, err
|
||||
}
|
||||
default:
|
||||
fmt.Println("error: unknown Allwinner CPU model")
|
||||
return false, errors.New("unknown Allwinner CPU model")
|
||||
}
|
||||
|
||||
@@ -1050,6 +1053,7 @@ func (d *driverGPIO) Init() (bool, error) {
|
||||
|
||||
func init() {
|
||||
if isArm {
|
||||
fmt.Println("Stating to initiate allwinner")
|
||||
driverreg.MustRegister(&drvGPIO)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user