app

package
v1.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearBit

func ClearBit(n, pos byte) byte

func ConvertTo8BitBinaryString

func ConvertTo8BitBinaryString(num byte) string

func HasBit

func HasBit(n, pos byte) bool

func I2C

func I2C()

func I2C_find

func I2C_find()

func I2C_scan

func I2C_scan(bus byte) ([]byte, error)

func SetBit

func SetBit(n, pos byte) byte

func ToggleBit

func ToggleBit(n, pos byte) byte

func WebStart

func WebStart()

Types

type DBx

type DBx struct {
	File string
	// contains filtered or unexported fields
}

func DB

func DB(file string) (*DBx, error)

func (*DBx) BucketDel

func (t *DBx) BucketDel(bucket string)

func (*DBx) BucketGet

func (t *DBx) BucketGet(bucket string) map[string]string

func (*DBx) Close

func (t *DBx) Close() error

func (*DBx) Del

func (t *DBx) Del(bucket, key string)

func (*DBx) Get

func (t *DBx) Get(bucket, key string) (val string, ok bool)

func (*DBx) Init

func (t *DBx) Init() error

func (*DBx) PrepareValue

func (t *DBx) PrepareValue(a ...interface{}) string

func (*DBx) PrepareValues

func (t *DBx) PrepareValues(a ...interface{}) []string

func (*DBx) Set

func (t *DBx) Set(bucket, key, val string)

type I2Cx

type I2Cx struct {
	Bus         byte
	Addr        byte
	AddrHex     string
	Device      *i2c.Device
	InputState  [8]I2Cx_input_state
	OutputState byte
}

func I2C_create

func I2C_create(bus, addr byte) *I2Cx

func (*I2Cx) ChangeState

func (t *I2Cx) ChangeState()

func (*I2Cx) Check

func (t *I2Cx) Check()

func (*I2Cx) Read

func (t *I2Cx) Read(register byte) (byte, error)

func (*I2Cx) RestoreState

func (t *I2Cx) RestoreState() bool

func (*I2Cx) SetupIC

func (t *I2Cx) SetupIC()

func (*I2Cx) Write

func (t *I2Cx) Write(register, value byte) error

type I2Cx_bit

type I2Cx_bit struct {
	IO    *I2Cx
	Bit   byte
	State bool
	Name  string
	Ord   int
}

type I2Cx_bits

type I2Cx_bits []I2Cx_bit

func I2C_explode_to_bits

func I2C_explode_to_bits() I2Cx_bits

func (I2Cx_bits) Len

func (t I2Cx_bits) Len() int

func (I2Cx_bits) Less

func (t I2Cx_bits) Less(i, j int) bool

func (I2Cx_bits) Swap

func (t I2Cx_bits) Swap(i, j int)

type I2Cx_input_state

type I2Cx_input_state struct {
	InputTime time.Time
	Switched  bool
}

type Reference

type Reference struct {
	RootPath         string
	DBFile           string
	DB               *DBx
	IOs              []*I2Cx
	WebPort          int
	ButtonPressDelay time.Duration
}
var (
	Ref Reference
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL