StackmatchGPIO

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Config

func Config(sc SmConfig) func(*SmGPIO)

Switch is a functional option to set the switch's configuration.

func EventHandler

func EventHandler(h func(sw.Switcher, sw.Device)) func(*SmGPIO)

EventHandler sets a callback function through which the bandswitch will report Events

Types

type CombinationConfig

type CombinationConfig struct {
	Name      string
	Terminals []TerminalConfig
	Pins      []PinConfig
}

type PinConfig

type PinConfig struct {
	Name     string
	Pin      string
	Inverted bool
}

PinConfig describes a gpio pin.

type SmConfig

type SmConfig struct {
	Name         string
	Index        int
	Combinations []CombinationConfig
}

type SmGPIO

type SmGPIO struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

SmGPIO contains the state and configuration of a gpio based stackmatch

func NewStackmatchGPIO

func NewStackmatchGPIO(options ...func(*SmGPIO)) *SmGPIO

NewStackmatchGPIO is the constructor for a GPIO based stackmatch (antenna combiner). The constructor takes functional arguments for configuring the SmGPIO.

func (*SmGPIO) Close

func (s *SmGPIO) Close()

func (*SmGPIO) GetPort

func (s *SmGPIO) GetPort(portName string) (sw.Port, error)

func (*SmGPIO) Init

func (s *SmGPIO) Init() error

func (*SmGPIO) Name

func (s *SmGPIO) Name() string

func (*SmGPIO) Serialize

func (s *SmGPIO) Serialize() sw.Device

func (*SmGPIO) SetPort

func (s *SmGPIO) SetPort(req sw.Port) error

type TerminalConfig

type TerminalConfig struct {
	Name  string
	Index int
}

Jump to

Keyboard shortcuts

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