Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BusyOutAdapter ¶
type BusyOutAdapter struct {
// contains filtered or unexported fields
}
BusyOutAdapter implements signal.BusyOut over a PinOut.
func NewBusyOutAdapter ¶
func NewBusyOutAdapter(pin PinOut, targetLevel gpio.Level) *BusyOutAdapter
func (*BusyOutAdapter) Out ¶
func (a *BusyOutAdapter) Out(ctx context.Context) error
Out sets the PinOut to the targetLevel and returns, but sets it back to the opposite level when the context is done.
func (*BusyOutAdapter) String ¶
func (a *BusyOutAdapter) String() string
type BusyOutAdapterFactory ¶
func (*BusyOutAdapterFactory) New ¶
func (f *BusyOutAdapterFactory) New() (signal.BusyOut, error)
type EmitterAdapter ¶
type EmitterAdapter struct {
// contains filtered or unexported fields
}
EmitterAdapter implements signal.Emitter over a PinIn.
func NewEmitterAdapter ¶
func NewEmitterAdapter(pin PinIn, detectedEdges Edges, waitTimeout time.Duration) *EmitterAdapter
func (*EmitterAdapter) Signal ¶
func (a *EmitterAdapter) Signal(ctx context.Context) <-chan signal.Level
Signal returns a new channel, then repeatedly calls WaitForEdge on the pin, writing its current Level to the channel as soon as an edge is detected. The channel is closed after the context is done, with a delay of up to waitTimeout.
func (*EmitterAdapter) String ¶
func (a *EmitterAdapter) String() string
type EmitterAdapterFactory ¶
func (*EmitterAdapterFactory) New ¶
func (f *EmitterAdapterFactory) New() (signal.Emitter, error)
type PinIn ¶
PinIn is a simplified version of gpio.PinIn.
Click to show internal directories.
Click to hide internal directories.