added prints

This commit is contained in:
didier committed 2024-07-27 10:10:30 -04:00
1 parent b2305a992b
commit 0474bb1c27
6 files changed
+21 -5

No files matched your search

+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.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
+9
View File
@@ -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
+1 -1
View File
@@ -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{}
+7
View File
@@ -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/