HT16K33

package
v0.0.0-...-1235f17 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2013 License: BSD-2-Clause Imports: 7 Imported by: 5

Documentation

Index

Constants

View Source
const (
	REGISTER_DISPLAY_SETUP = 0x80
	REGISTER_SYSTEM_SETUP  = 0x20
	REGISTER_DIMMING       = 0xE0
	BLINKRATE_OFF          = 0x00
	BLINKRATE_2HZ          = 0x01
	BLINKRATE_1HZ          = 0x02
	BLINKRATE_HALFHZ       = 0x03
)
View Source
const FONT_WIDTH = 6

Fonts are defined as 5x7, but we include an extra pixel in the width so they are spaced one pixel apart

Variables

This section is empty.

Functions

func ScrollMessage

func ScrollMessage(msg string, devices []*EightByEight, speed byte)

Types

type Device

type Device struct {
	ImmediateUpdate bool
	// contains filtered or unexported fields
}

func (*Device) Addr

func (bp *Device) Addr() byte

func (*Device) BusNum

func (bp *Device) BusNum() byte

func (*Device) Clear

func (bp *Device) Clear() (err error)

func (*Device) Init

func (bp *Device) Init(addr, busNum byte) (err error)

func (*Device) ReadDisplay

func (bp *Device) ReadDisplay() (err error)

func (*Device) SetBlinkRate

func (bp *Device) SetBlinkRate(blinkRate byte) (err error)

func (*Device) SetBrightness

func (bp *Device) SetBrightness(brightness byte) (err error)

func (*Device) SetBufferRow

func (bp *Device) SetBufferRow(row byte, value uint16) (err error)

func (*Device) WriteDisplay

func (bp *Device) WriteDisplay() (err error)

type EightByEight

type EightByEight struct {
	Device
}

func NewEightByEight

func NewEightByEight(addr, bus byte) (e *EightByEight, err error)

func ParseDevices

func ParseDevices(deviceList string) (devices []*EightByEight, err error)

Helper func to generate a list of devices based on an input string matching the spec addr:bus,addr:bus...

func (*EightByEight) Pixel

func (e *EightByEight) Pixel(x, y byte) bool

func (*EightByEight) SetPixel

func (e *EightByEight) SetPixel(x, y byte, on bool) (err error)

Jump to

Keyboard shortcuts

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