mirror of https://github.com/kidoman/embd
go fmt
This commit is contained in:
parent
9a25ce11c3
commit
ec92ed848c
|
@ -15,8 +15,8 @@ package hd44780
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
type entryMode byte
|
||||
|
|
|
@ -4,8 +4,8 @@ package mcp4725
|
|||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -6,9 +6,9 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/cfreeman/embd/util"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,13 +1,31 @@
|
|||
// PCAL953A, low volage GPIO expander as found in the Raspberry
|
||||
/*
|
||||
* Copyright (c) Clinton Freeman 2016
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
* associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
|
||||
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// Package pcal9535a adds support for the low volage GPIO expander as found in the Raspberry
|
||||
// Pi Relay board by Seeed Studio.
|
||||
//
|
||||
// http://wiki.seeedstudio.com/wiki/Raspberry_Pi_Relay_Board_v1.0
|
||||
package pcal9535a
|
||||
|
||||
import (
|
||||
"github.com/cfreeman/embd"
|
||||
)
|
||||
|
||||
// More details at - http://wiki.seeedstudio.com/wiki/Raspberry_Pi_Relay_Board_v1.0
|
||||
const (
|
||||
REG_MODE = 0x06
|
||||
)
|
||||
|
@ -38,6 +56,7 @@ func (c *PCAL9535A) SetPin(pin uint, on bool) error {
|
|||
return c.Bus.WriteByteToReg(c.Addr, REG_MODE, c.D)
|
||||
}
|
||||
|
||||
// Gets the state of supplied pin true = high or on, while false = low or off.
|
||||
func (c *PCAL9535A) GetPin(pin uint) bool {
|
||||
return (((c.D >> pin) & 1) == 0)
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
package mcp3008
|
||||
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
// MCP3008 represents a mcp3008 8bit DAC.
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func detect(c *cli.Context) {
|
||||
|
|
|
@ -3,8 +3,8 @@ package main
|
|||
import (
|
||||
"os"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
_ "github.com/cfreeman/embd/host/all"
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
var version = "0.1.0"
|
||||
|
|
|
@ -15,9 +15,9 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/cfreeman/embd/host/generic"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
var pins = embd.PinMap{
|
||||
|
|
|
@ -10,9 +10,9 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/cfreeman/embd/util"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,6 +1,23 @@
|
|||
/*
|
||||
Package edison provides Intel Edison support.
|
||||
*/
|
||||
* Copyright (c) Clinton Freeman 2016
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
* associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
|
||||
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// Package edison Provides Intel Edison support.
|
||||
package edison
|
||||
|
||||
import (
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
package servo
|
||||
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd/util"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -6,9 +6,9 @@ import (
|
|||
"flag"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/cfreeman/embd/sensor/watersensor"
|
||||
"github.com/golang/glog"
|
||||
|
||||
_ "github.com/cfreeman/embd/host/all"
|
||||
)
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -4,8 +4,8 @@ package watersensor
|
|||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/cfreeman/embd"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
// WaterSensor represents a water sensor.
|
||||
|
|
Loading…
Reference in New Issue