Versions in this module Expand all Collapse all v1 v1.0.0 Dec 21, 2016 v0 v0.13.0 Oct 10, 2016 v0.12.1 Jul 13, 2016 v0.12.0 Jul 13, 2016 Changes in this version type File + Seek func(offset int64, whence int) (ret int64, err error) type MockFile + func (f *MockFile) Seek(offset int64, whence int) (ret int64, err error) v0.11.0 Feb 17, 2016 Changes in this version + const GPIOPATH + const HIGH + const I2C_FUNCS + const I2C_FUNC_SMBUS_READ_BLOCK_DATA + const I2C_FUNC_SMBUS_WRITE_BLOCK_DATA + const I2C_SLAVE + const I2C_SMBUS + const I2C_SMBUS_I2C_BLOCK_DATA + const I2C_SMBUS_READ + const I2C_SMBUS_WRITE + const IN + const LOW + const OUT + func NewI2cDevice(location string, address int) (d *i2cDevice, err error) + func SetFilesystem(f Filesystem) + func SetSyscall(s SystemCaller) + func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) + type DigitalPin interface + Direction func(string) error + Export func() error + Read func() (int, error) + Unexport func() error + Write func(int) error + func NewDigitalPin(pin int, v ...string) DigitalPin + type File interface + Close func() error + Fd func() uintptr + Read func(b []byte) (n int, err error) + ReadAt func(b []byte, off int64) (n int, err error) + Sync func() (err error) + Write func(b []byte) (n int, err error) + WriteString func(s string) (ret int, err error) + func OpenFile(name string, flag int, perm os.FileMode) (file File, err error) + type Filesystem interface + OpenFile func(name string, flag int, perm os.FileMode) (file File, err error) + type I2cDevice interface + SetAddress func(int) error + type MockFile struct + Closed bool + Contents string + Opened bool + Seq int + func (f *MockFile) Close() error + func (f *MockFile) Fd() uintptr + func (f *MockFile) Read(b []byte) (n int, err error) + func (f *MockFile) ReadAt(b []byte, off int64) (n int, err error) + func (f *MockFile) Sync() (err error) + func (f *MockFile) Write(b []byte) (n int, err error) + func (f *MockFile) WriteString(s string) (ret int, err error) + type MockFilesystem struct + Files map[string]*MockFile + Seq int + func NewMockFilesystem(files []string) *MockFilesystem + func (fs *MockFilesystem) Add(name string) *MockFile + func (fs *MockFilesystem) OpenFile(name string, flag int, perm os.FileMode) (file File, err error) + type MockSyscall struct + func (sys *MockSyscall) Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) + type NativeFilesystem struct + func (fs *NativeFilesystem) OpenFile(name string, flag int, perm os.FileMode) (file File, err error) + type NativeSyscall struct + func (sys *NativeSyscall) Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) + type SystemCaller interface + Syscall func(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)