2014-02-27 00:37:11 +01:00
|
|
|
package bbb
|
|
|
|
|
|
|
|
import (
|
2014-02-27 01:04:36 +01:00
|
|
|
lgpio "github.com/kidoman/embd/driver/linux/gpio"
|
|
|
|
li2c "github.com/kidoman/embd/driver/linux/i2c"
|
2014-02-27 01:29:38 +01:00
|
|
|
"github.com/kidoman/embd/host"
|
2014-02-27 00:37:11 +01:00
|
|
|
)
|
|
|
|
|
2014-02-27 01:29:38 +01:00
|
|
|
func init() {
|
|
|
|
host.Describers[host.BBB] = describer
|
2014-02-27 00:37:11 +01:00
|
|
|
}
|
|
|
|
|
2014-02-27 01:29:38 +01:00
|
|
|
func describer(rev int) *host.Descriptor {
|
|
|
|
return &host.Descriptor{
|
2014-03-01 15:49:44 +01:00
|
|
|
GPIO: func() interface{} {
|
2014-02-27 01:29:38 +01:00
|
|
|
return lgpio.New(pins)
|
|
|
|
},
|
|
|
|
I2C: li2c.New,
|
|
|
|
}
|
2014-02-27 00:37:11 +01:00
|
|
|
}
|