mirror of
https://github.com/kidoman/embd
synced 2025-07-03 11:57:38 +02:00
make the process of registered available hosts less clunky
This commit is contained in:
parent
2504678ba9
commit
ef87ad7879
7 changed files with 66 additions and 69 deletions
|
@ -4,10 +4,11 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/kidoman/embd"
|
||||
"github.com/kidoman/embd/host"
|
||||
)
|
||||
|
||||
func main() {
|
||||
h, _, err := embd.DetectHost()
|
||||
h, _, err := host.Detect()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -15,9 +16,9 @@ func main() {
|
|||
var pinNo interface{}
|
||||
|
||||
switch h {
|
||||
case embd.HostBBB:
|
||||
case host.BBB:
|
||||
pinNo = "P9_31"
|
||||
case embd.HostRPi:
|
||||
case host.RPi:
|
||||
pinNo = 10
|
||||
default:
|
||||
panic("host not supported (yet :P)")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue