algo

package
v0.0.0-...-b76d47b Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	A1 contact = "A1"
	A2 contact = "A2"
	A3 contact = "A3"
	A4 contact = "A4"
	A5 contact = "A5"
)
View Source
const (
	PinStateRead pinState = iota
	PinStateWrite
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Pin

type Pin struct {
	PortAddress uint32
	SelectedPin PinOffset
	State       pinState
	Delay       time.Duration
}

func (Pin) MarshalBinary

func (p Pin) MarshalBinary() ([]byte, error)

type PinOffset

type PinOffset uint16
const (
	Pin0 PinOffset = 1 << iota
	Pin1
	Pin2
	Pin3
	Pin4
	Pin5
	Pin6
	Pin7
	Pin8
	Pin9
	Pin10
	Pin11
	Pin12
	Pin13
	Pin14
	Pin15
)

func GetPortPin

func GetPortPin(c contact) (port uint32, pin PinOffset)

GetPortPin returns mapped pin to contact

func (PinOffset) GetNumber

func (po PinOffset) GetNumber() uint8

Jump to

Keyboard shortcuts

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