1
0
Fork 0
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:
Karan Misra 2014-02-27 05:59:38 +05:30
parent 2504678ba9
commit ef87ad7879
7 changed files with 66 additions and 69 deletions

View file

@ -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)")