mirror of
https://github.com/kidoman/embd
synced 2024-12-23 05:10:05 +01:00
23 lines
401 B
Go
23 lines
401 B
Go
package bbb
|
|
|
|
import (
|
|
lgpio "github.com/kidoman/embd/driver/linux/gpio"
|
|
li2c "github.com/kidoman/embd/driver/linux/i2c"
|
|
"github.com/kidoman/embd/host"
|
|
)
|
|
|
|
func init() {
|
|
host.Describers[host.BBB] = describer
|
|
}
|
|
|
|
func describer(rev int) *host.Descriptor {
|
|
return &host.Descriptor{
|
|
GPIO: func() interface{} {
|
|
return lgpio.New(pins)
|
|
},
|
|
I2C: func() interface{} {
|
|
return li2c.New()
|
|
},
|
|
}
|
|
}
|