build: upgrade to go 1.17 and dependencies

This commit is contained in:
2021-09-01 21:01:28 +02:00
parent de6f39bddc
commit 8b5888ee1b
321 changed files with 41511 additions and 9444 deletions

View File

@@ -4,7 +4,7 @@
// Package host defines the host itself.
//
// The host is the machine where this code is running.
// Is it now superseded by https://periph.io/x/host/v3 (or later).
//
// Subpackages contain the drivers that are loaded automatically.
// See https://periph.io/news/2020/a_new_start/ for more details.
package host

View File

@@ -6,12 +6,13 @@ package pine64
import (
"errors"
"os"
"strings"
"periph.io/x/periph"
"periph.io/x/periph/conn/pin"
"periph.io/x/periph/conn/pin/pinreg"
"periph.io/x/periph/host/allwinner"
"periph.io/x/periph/host/distro"
)
// Present returns true if running on a Pine64 board.
@@ -19,9 +20,7 @@ import (
// https://www.pine64.org/
func Present() bool {
if isArm {
// This is iffy at best.
_, err := os.Stat("/boot/pine64.dtb")
return err == nil
return strings.HasPrefix(distro.DTModel(), "Pine64")
}
return false
}