spitest

package
v0.0.0-...-6744f52 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UnequalBufferError  error = errors.New("sync read writer buffer must be same size")
	MemoryMapValueError error = errors.New("no value mapped to register")
	PagePointerError    error = errors.New("page pointer not initialised")
)

Functions

This section is empty.

Types

type Device

type Device struct {
	MemoryMap bool
	MM        map[byte]byte          // address mapped
	PM        map[byte]map[byte]byte // page address mapped

}

func (*Device) Open

func (d *Device) Open() (driver.Conn, error)

type DeviceConn

type DeviceConn struct {
	Txbuf []byte
	Rxbuf []byte
	sync.Mutex
}

func (*DeviceConn) Close

func (s *DeviceConn) Close() error

func (*DeviceConn) Configure

func (s *DeviceConn) Configure(k, v int) error

func (*DeviceConn) Tx

func (s *DeviceConn) Tx(w, r []byte) error

type MMDeviceConn

type MMDeviceConn struct {
	MM    map[byte]byte
	Txbuf []byte
	Rxbuf []byte
	sync.Mutex
}

func (*MMDeviceConn) Close

func (s *MMDeviceConn) Close() error

func (*MMDeviceConn) Configure

func (s *MMDeviceConn) Configure(k, v int) error

func (*MMDeviceConn) Tx

func (s *MMDeviceConn) Tx(w, r []byte) error

type PMDeviceConn

type PMDeviceConn struct {
	PM    map[byte]map[byte]byte
	Txbuf []byte
	Rxbuf []byte
	sync.Mutex
}

func (*PMDeviceConn) Close

func (s *PMDeviceConn) Close() error

func (*PMDeviceConn) Configure

func (s *PMDeviceConn) Configure(k, v int) error

func (*PMDeviceConn) Tx

func (s *PMDeviceConn) Tx(w, r []byte) error

type Pin

type Pin uint8

func (*Pin) High

func (p *Pin) High()

func (*Pin) Low

func (p *Pin) Low()

func (*Pin) State

func (p *Pin) State() uint8

Jump to

Keyboard shortcuts

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