kintqt

package
v0.0.0-...-e258458 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NumRows = 15
	NumCols = 7
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter

func NewAdapter

func NewAdapter(bus drivers.I2C) *Adapter

func (*Adapter) Initialize

func (m *Adapter) Initialize() (err error)

Initialize makes a connection to each of the port expanders, returning an error if either is unavailable.

func (*Adapter) NewMatrix

func (a *Adapter) NewMatrix() *keyboard.Matrix

func (*Adapter) ReadRow

func (m *Adapter) ReadRow(rowIndex uint8) (row keyboard.Row)

ReadRow

func (*Adapter) UpdateLEDs

func (m *Adapter) UpdateLEDs(ledState LEDs)

type LED

type LED uint8
const (
	LEDNumLock    LED = 7
	LEDUser1      LED = 8
	LEDUser2      LED = 9
	LEDUser3      LED = 10
	LEDUser4      LED = 11
	LEDUser5      LED = 12
	LEDUser6      LED = 13
	LEDCapsLock   LED = 14
	LEDKeypad     LED = 15
	LEDScrollLock LED = 31
)

type LEDs

type LEDs uint32

func (*LEDs) Get

func (l *LEDs) Get(led LED) bool

func (*LEDs) Set

func (l *LEDs) Set(led LED, on bool)

Jump to

Keyboard shortcuts

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