gpio

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GPIOAdapter

type GPIOAdapter interface {
	WriteSpeed1Pin(value bool)
	WriteSpeed2Pin(value bool)
	WriteSpeed3Pin(value bool)
	WriteAwayPin(value bool)
	WriteAutoPin(value bool)
	WriteTimerPin(value bool)
}

GPIOAdapter specifies the interface for GPIO operations.

func GetGPIOAdapter

func GetGPIOAdapter() GPIOAdapter

GetGPIOAdapter returns the GPIO adapter based on the current mode.

type GPIOMockAdapter

type GPIOMockAdapter struct {
	// contains filtered or unexported fields
}

GPIOMockAdapter is a mock GPIO adapter, which: - mimicks the behavior of the garage door, without the delays of a physical door and motor. - reports all actions to the log.

func NewGPIOMockAdapter

func NewGPIOMockAdapter() *GPIOMockAdapter

NewGPIOMockAdapter creates a new GPIOMockAdapter.

func (*GPIOMockAdapter) WriteAutoPin

func (g *GPIOMockAdapter) WriteAutoPin(value bool)

WriteAutoPin writes a value to the auto pin.

func (*GPIOMockAdapter) WriteAwayPin

func (g *GPIOMockAdapter) WriteAwayPin(value bool)

WriteAwayPin writes a value to the away pin.

func (*GPIOMockAdapter) WriteSpeed1Pin

func (g *GPIOMockAdapter) WriteSpeed1Pin(value bool)

WriteSpeed1Pin writes a value to the first speed pin.

func (*GPIOMockAdapter) WriteSpeed2Pin

func (g *GPIOMockAdapter) WriteSpeed2Pin(value bool)

WriteSpeed2Pin writes a value to the second speed pin.

func (*GPIOMockAdapter) WriteSpeed3Pin

func (g *GPIOMockAdapter) WriteSpeed3Pin(value bool)

WriteSpeed3Pin writes a value to the third speed pin.

func (*GPIOMockAdapter) WriteTimerPin

func (g *GPIOMockAdapter) WriteTimerPin(value bool)

WriteTimerPin writes a value to the timer pin.

type GPIORPiAdapter

type GPIORPiAdapter struct {
	// contains filtered or unexported fields
}

GPIORPiAdapter is an adapter for the Raspberry Pi GPIO pins.

func NewGPIORPiAdapter

func NewGPIORPiAdapter() *GPIORPiAdapter

NewGPIORPiAdapter creates a new GPIORPiAdapter.

func (*GPIORPiAdapter) WriteAutoPin

func (g *GPIORPiAdapter) WriteAutoPin(value bool)

WriteAutoPin writes a value to the auto pin.

func (*GPIORPiAdapter) WriteAwayPin

func (g *GPIORPiAdapter) WriteAwayPin(value bool)

WriteAwayPin writes a value to the away pin.

func (*GPIORPiAdapter) WriteSpeed1Pin

func (g *GPIORPiAdapter) WriteSpeed1Pin(value bool)

WriteSpeed1Pin writes a value to the first speed pin.

func (*GPIORPiAdapter) WriteSpeed2Pin

func (g *GPIORPiAdapter) WriteSpeed2Pin(value bool)

WriteSpeed2Pin writes a value to the second speed pin.

func (*GPIORPiAdapter) WriteSpeed3Pin

func (g *GPIORPiAdapter) WriteSpeed3Pin(value bool)

WriteSpeed3Pin writes a value to the third speed pin.

func (*GPIORPiAdapter) WriteTimerPin

func (g *GPIORPiAdapter) WriteTimerPin(value bool)

WriteTimerPin writes a value to the timer pin.

Jump to

Keyboard shortcuts

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