From 0474bb1c27f4b70be96141b6efc591f114a744de Mon Sep 17 00:00:00 2001 From: didier amyot Date: Sat, 27 Jul 2024 10:10:30 -0400 Subject: [PATCH] added prints --- go.mod | 2 +- go.sum | 4 ++-- vendor/modules.txt | 2 +- vendor/periph.io/x/host/v3/allwinner/detect.go | 9 +++++++++ vendor/periph.io/x/host/v3/distro/devtree.go | 2 +- vendor/periph.io/x/host/v3/distro/distro.go | 7 +++++++ 6 files changed, 21 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index f64da0b..c542eae 100644 --- a/go.mod +++ b/go.mod @@ -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.20240727134510-3ddf0ec6acb8 +replace periph.io/x/host/v3 v3.8.2 => github.com/didiercrunch/host/v3 v3.8.3-0.20240727140742-e0faeaf34e9d require ( periph.io/x/conn/v3 v3.7.0 diff --git a/go.sum b/go.sum index 86f4dd1..b7eb554 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/didiercrunch/host/v3 v3.8.3-0.20240727134510-3ddf0ec6acb8 h1:Fe73Ns7pPH6rqbDhiKUHEkCwTaasuv8JQAQwEqlq+Es= -github.com/didiercrunch/host/v3 v3.8.3-0.20240727134510-3ddf0ec6acb8/go.mod h1:yFL76AesNHR68PboofSWYaQTKmvPXsQH2Apvp/ls/K4= +github.com/didiercrunch/host/v3 v3.8.3-0.20240727140742-e0faeaf34e9d h1:kOnT9w42VfnB9Dppfiti1KXj++THP5+CvspMikaKV4s= +github.com/didiercrunch/host/v3 v3.8.3-0.20240727140742-e0faeaf34e9d/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= diff --git a/vendor/modules.txt b/vendor/modules.txt index d99c90f..1969311 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -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.20240727134510-3ddf0ec6acb8 +# periph.io/x/host/v3 v3.8.2 => github.com/didiercrunch/host/v3 v3.8.3-0.20240727140742-e0faeaf34e9d ## explicit; go 1.20 periph.io/x/host/v3 periph.io/x/host/v3/allwinner diff --git a/vendor/periph.io/x/host/v3/allwinner/detect.go b/vendor/periph.io/x/host/v3/allwinner/detect.go index c804212..661c828 100644 --- a/vendor/periph.io/x/host/v3/allwinner/detect.go +++ b/vendor/periph.io/x/host/v3/allwinner/detect.go @@ -60,6 +60,11 @@ func IsH5() bool { return detection.isH5 } +func IsH6() bool { + detection.do() + return detection.isH5 +} + // type detectionS struct { @@ -71,6 +76,7 @@ type detectionS struct { isA64 bool isH3 bool isH5 bool + isH6 bool } var detection detectionS @@ -104,6 +110,9 @@ func (d *detectionS) do() { if strings.Contains(c, "sun50i-h5") { d.isH5 = true } + if strings.Contains(c, "question-mark") { + d.isH6 = true + } } d.isAllwinner = d.isA64 || d.isR8 || d.isA20 || d.isH3 || d.isH5 diff --git a/vendor/periph.io/x/host/v3/distro/devtree.go b/vendor/periph.io/x/host/v3/distro/devtree.go index 0091714..c30fa26 100644 --- a/vendor/periph.io/x/host/v3/distro/devtree.go +++ b/vendor/periph.io/x/host/v3/distro/devtree.go @@ -31,7 +31,7 @@ func DTModel() string { func DTCompatible() []string { mu.Lock() defer mu.Unlock() - fmt.Println("\n\n\n\n\tdidier: Deep in the dependencies...\n\n\n\n\n") + fmt.Println("\n\n\n\n\tdidier: Deep in the dependencies...") if dtCompatible == nil { dtCompatible = []string{} diff --git a/vendor/periph.io/x/host/v3/distro/distro.go b/vendor/periph.io/x/host/v3/distro/distro.go index c116b6a..a3ba739 100644 --- a/vendor/periph.io/x/host/v3/distro/distro.go +++ b/vendor/periph.io/x/host/v3/distro/distro.go @@ -60,6 +60,13 @@ func IsRaspbian() bool { return false } +// IsNixos returns true if running on a NixOs distribution. +// +// https://nixos.org/ +func IsNixos() bool { + return isLinux && OSRelease()["ID"] == "nixos" +} + // IsUbuntu returns true if running on an Ubuntu derived distribution. // // https://ubuntu.com/