rs8

package module
v0.0.0-...-e4f8894 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ButtonProgram     EventButtonType = 0b0010
	ButtonPreview                     = 0b0001
	ButtonAutoTakeDSK                 = 0b0011
)

Variables

This section is empty.

Functions

func T

func T[K any](c bool, a, b K) K

Types

type CmdLight

type CmdLight struct {
	Type  EventButtonType
	Value uint8

	State Light
}

type Connection

type Connection struct {
	*serial.Port

	LightCmdCh chan<- []CmdLight
}

func Open

func Open(name string) (*Connection, error)

func (*Connection) InitBlynk

func (conn *Connection) InitBlynk()

does fancy blinky blinky sequence

func (*Connection) ReadCh

func (c *Connection) ReadCh() <-chan Event

func (*Connection) WriteCmd

func (c *Connection) WriteCmd(cmd [2]byte) (err error)

first nibble of first byte is ignored

type Direction

type Direction uint8
const (
	Down Direction = iota
	Up
)

type Event

type Event interface {
	// contains filtered or unexported methods
}

type EventButton

type EventButton struct {
	Type      EventButtonType
	Direction Direction

	Value uint8
}

type EventButtonType

type EventButtonType uint8

type EventSlider

type EventSlider struct {
	Type EventSliderType

	Value uint8
}

type EventSliderType

type EventSliderType uint8
const (
	SliderTbar EventSliderType = iota
	RotA
	RotB
	RotC
)

type Light

type Light uint8
const (
	LightOn Light = iota
	LightOff
)

Directories

Path Synopsis
cmd
log

Jump to

Keyboard shortcuts

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