1
0
Fork 0
mirror of https://github.com/kidoman/embd synced 2025-07-03 03:47:33 +02:00

simplify package structure

This commit is contained in:
Karan Misra 2014-03-03 00:51:23 +05:30
parent 3cae4064dc
commit 36f2c0486d
41 changed files with 736 additions and 885 deletions

View file

@ -8,17 +8,17 @@ import (
"os"
"os/signal"
"github.com/kidoman/embd"
"github.com/kidoman/embd/controller/mcp4725"
"github.com/kidoman/embd/i2c"
)
func main() {
if err := i2c.Open(); err != nil {
if err := embd.InitI2C(); err != nil {
panic(err)
}
defer i2c.Close()
defer embd.CloseI2C()
bus := i2c.NewBus(1)
bus := embd.NewI2CBus(1)
dac := mcp4725.New(bus, 0x62)
defer dac.Close()