gpiostreamtest

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package gpiostreamtest enables testing device driver using gpiostream.PinIn or PinOut.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InOpLSB

type InOpLSB struct {
	gpio.Pull
	gpiostream.BitStreamLSB
}

InOpLSB represents an expected replay StreamIn operation in PinInLSB.

type InOpMSB

type InOpMSB struct {
	gpio.Pull
	gpiostream.BitStreamMSB
}

InOpMSB represents an expected replay StreamIn operation in PinInMSB.

type PinInLSB

type PinInLSB struct {
	sync.Mutex
	N         string
	DontPanic bool
	Ops       []InOpLSB
	Count     int
}

PinInLSB implements gpiostream.PinIn that accepts BitStreamLSB only.

Embed in a struct with gpiotest.Pin for more functionality.

func (*PinInLSB) Close

func (p *PinInLSB) Close() error

Close verifies that all the expected Ops have been consumed.

func (*PinInLSB) StreamIn

func (p *PinInLSB) StreamIn(pull gpio.Pull, b gpiostream.Stream) error

StreamIn implements gpiostream.PinIn.

func (*PinInLSB) String

func (p *PinInLSB) String() string

type PinInMSB

type PinInMSB struct {
	sync.Mutex
	N         string
	DontPanic bool
	Ops       []InOpMSB
	Count     int
}

PinInMSB implements gpiostream.PinIn that accepts BitStreamMSB only.

Embed in a struct with gpiotest.Pin for more functionality.

func (*PinInMSB) Close

func (p *PinInMSB) Close() error

Close verifies that all the expected Ops have been consumed.

func (*PinInMSB) StreamIn

func (p *PinInMSB) StreamIn(pull gpio.Pull, b gpiostream.Stream) error

StreamIn implements gpiostream.PinIn.

func (*PinInMSB) String

func (p *PinInMSB) String() string

type PinOutPlayback

type PinOutPlayback struct {
	sync.Mutex
	N         string
	DontPanic bool
	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) StreamOut

func (p *PinOutPlayback) StreamOut(s gpiostream.Stream) error

StreamOut implements gpiostream.PinOut.

func (*PinOutPlayback) String

func (p *PinOutPlayback) String() string

type PinOutRecord

type PinOutRecord struct {
	sync.Mutex
	N         string
	DontPanic bool
	Ops       []gpiostream.Stream
}

PinOutRecord implements gpiostream.PinOut that records operations.

Embed in a struct with gpiotest.Pin for more functionality.

func (*PinOutRecord) StreamOut

func (p *PinOutRecord) StreamOut(s gpiostream.Stream) error

StreamOut implements gpiostream.PinOut.

func (*PinOutRecord) String

func (p *PinOutRecord) String() string

Jump to

Keyboard shortcuts

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