Documentation ¶
Overview ¶
Package gpiostreamtest enables testing device driver using gpiostream.PinIn or PinOut.
Index ¶
- type InOp
- type PinIn
- func (p *PinIn) Close() error
- func (p *PinIn) Func() pin.Func
- func (p *PinIn) Function() string
- func (p *PinIn) Halt() error
- func (p *PinIn) Name() string
- func (p *PinIn) Number() int
- func (p *PinIn) SetFunc(f pin.Func) error
- func (p *PinIn) StreamIn(pull gpio.Pull, b gpiostream.Stream) error
- func (p *PinIn) String() string
- func (p *PinIn) SupportedFuncs() []pin.Func
- type PinOutPlayback
- func (p *PinOutPlayback) Close() error
- func (p *PinOutPlayback) Func() pin.Func
- func (p *PinOutPlayback) Function() string
- func (p *PinOutPlayback) Halt() error
- func (p *PinOutPlayback) Name() string
- func (p *PinOutPlayback) Number() int
- func (p *PinOutPlayback) SetFunc(f pin.Func) error
- func (p *PinOutPlayback) StreamOut(s gpiostream.Stream) error
- func (p *PinOutPlayback) String() string
- func (p *PinOutPlayback) SupportedFuncs() []pin.Func
- type PinOutRecord
- func (p *PinOutRecord) Func() pin.Func
- func (p *PinOutRecord) Function() string
- func (p *PinOutRecord) Halt() error
- func (p *PinOutRecord) Name() string
- func (p *PinOutRecord) Number() int
- func (p *PinOutRecord) SetFunc(f pin.Func) error
- func (p *PinOutRecord) StreamOut(s gpiostream.Stream) error
- func (p *PinOutRecord) String() string
- func (p *PinOutRecord) SupportedFuncs() []pin.Func
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InOp ¶
type InOp struct { gpio.Pull gpiostream.BitStream }
InOp represents an expected replay StreamIn operation in PinIn.
type PinIn ¶
type PinIn struct { // These should be immutable. N string DontPanic bool // Grab the Mutex before accessing the following members. sync.Mutex Ops []InOp Count int }
PinIn implements gpiostream.PinIn that accepts BitStream only.
Embed in a struct with gpiotest.Pin for more functionality.
func (*PinIn) SupportedFuncs ¶
SupportedFuncs implements pin.PinFunc.
type PinOutPlayback ¶
type PinOutPlayback struct { // These should be immutable. N string DontPanic bool // Grab the Mutex before accessing the following members. sync.Mutex Ops []gpiostream.Stream Count int }
PinOutPlayback implements gpiostream.PinOut.
Embed in a struct with gpiotest.Pin for more functionality.
func (*PinOutPlayback) Close ¶
func (p *PinOutPlayback) Close() error
Close verifies that all the expected Ops have been consumed.
func (*PinOutPlayback) Function ¶
func (p *PinOutPlayback) Function() string
Function implements pin.Pin.
func (*PinOutPlayback) SetFunc ¶
func (p *PinOutPlayback) SetFunc(f pin.Func) error
SetFunc implements pin.PinFunc.
func (*PinOutPlayback) StreamOut ¶
func (p *PinOutPlayback) StreamOut(s gpiostream.Stream) error
StreamOut implements gpiostream.PinOut.
func (*PinOutPlayback) String ¶
func (p *PinOutPlayback) String() string
String implements conn.Resource.
func (*PinOutPlayback) SupportedFuncs ¶
func (p *PinOutPlayback) SupportedFuncs() []pin.Func
SupportedFuncs implements pin.PinFunc.
type PinOutRecord ¶
type PinOutRecord struct { // These should be immutable. N string DontPanic bool // Grab the Mutex before accessing the following members. sync.Mutex Ops []gpiostream.Stream }
PinOutRecord implements gpiostream.PinOut that records operations.
Embed in a struct with gpiotest.Pin for more functionality.
func (*PinOutRecord) Function ¶
func (p *PinOutRecord) Function() string
Function implements pin.Pin.
func (*PinOutRecord) SetFunc ¶
func (p *PinOutRecord) SetFunc(f pin.Func) error
SetFunc implements pin.PinFunc.
func (*PinOutRecord) StreamOut ¶
func (p *PinOutRecord) StreamOut(s gpiostream.Stream) error
StreamOut implements gpiostream.PinOut.
func (*PinOutRecord) String ¶
func (p *PinOutRecord) String() string
String implements conn.Resource.
func (*PinOutRecord) SupportedFuncs ¶
func (p *PinOutRecord) SupportedFuncs() []pin.Func
SupportedFuncs implements pin.PinFunc.