Documentation ¶
Index ¶
- Constants
- type Device
- func (this *Device) Brightness(intensity byte) error
- func (this *Device) Clear(cascadeId int, redraw bool) error
- func (this *Device) ClearAll(redraw bool) error
- func (this *Device) Close()
- func (this *Device) Command(reg Max7219Reg, value byte) error
- func (this *Device) Flush() error
- func (this *Device) GetCascadeCount() int
- func (this *Device) GetLedLineCount() int
- func (this *Device) Open(spibus int, spidevice int, brightness byte) error
- func (this *Device) ScrollLeft(redraw bool) error
- func (this *Device) ScrollRight(redraw bool) error
- func (this *Device) SetBufferLine(cascadeId int, position int, value byte, redraw bool) error
- type Font
- type Matrix
- func (this *Matrix) Clear()
- func (this *Matrix) Close()
- func (this *Matrix) Open(spibus int, spidevice int, brightness byte) error
- func (this *Matrix) OutputAsciiCode(cascadeId int, font Font, asciiCode int, redraw bool) error
- func (this *Matrix) OutputChar(cascadeId int, font Font, char rune, redraw bool) error
- func (this *Matrix) SlideMessage(text string, font Font, condensePattern bool, pixelDelay time.Duration) error
- type Max7219Reg
- type Rotation
Constants ¶
View Source
const ( MAX7219_REG_NOOP Max7219Reg = 0 MAX7219_REG_DIGIT0 = iota MAX7219_REG_DIGIT1 MAX7219_REG_DIGIT2 MAX7219_REG_DIGIT3 MAX7219_REG_DIGIT4 MAX7219_REG_DIGIT5 MAX7219_REG_DIGIT6 MAX7219_REG_DIGIT7 MAX7219_REG_DECODEMODE MAX7219_REG_INTENSITY MAX7219_REG_SCANLIMIT MAX7219_REG_SHUTDOWN MAX7219_REG_DISPLAYTEST = 0x0F MAX7219_REG_LASTDIGIT = MAX7219_REG_DIGIT7 )
View Source
const MAX7219_DIGIT_COUNT = MAX7219_REG_LASTDIGIT - MAX7219_REG_DIGIT0 + 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func (*Device) Brightness ¶
func (*Device) GetCascadeCount ¶
func (*Device) GetLedLineCount ¶
func (*Device) ScrollLeft ¶
func (*Device) ScrollRight ¶
type Font ¶
type Font interface { // Return font code page. // This function allow implement national font support. GetCodePage() encoding.Encoding // Return font char's bit pattern. // Font height is always equal to 8 pixel. // Font width may vary from one font // to another, but ordinary not exceed 8 pixel. GetLetterPatterns() [][]byte }
General interface of ASCII char set bit pattern for drawing on the LED matrix.
var ( FontCP437 Font = &fontCP437{} FontSinclair Font = &fontSinclair{} FontLCD Font = &fontLCD{} // FontBoldCyrillic Font = &fontBoldCyrillic{} FontTiny Font = &fontTiny{} FontMSXRus Font = &fontMSXRus{} FontZXSpectrumRus Font = &fontZXSpectrumRus{} FontVestaPK8000Rus Font = &fontVestaPK8000Rus{} )
type Matrix ¶
func (*Matrix) OutputAsciiCode ¶
Output ascii code to the led matrix.
func (*Matrix) OutputChar ¶
Output unicode char to the led matrix. Unicode char transforms to ascii code based on information taken from font.GetCodePage() call.
type Max7219Reg ¶
type Max7219Reg byte
type Rotation ¶
type Rotation int
const ( RotateNone Rotation = 0 // No rotation needed (normally used when individual LED modules make up matrix) RotateClockwise Rotation = 1 // Used to rotate 4 in 1 LED matrix clockwise RotateAntiClockwise Rotation = 2 // Used to rotate 4 in 1 LED matrix anti-clockwise RotateClockwiseInvert Rotation = 3 // Used to rotate 4 in 1 LED matrix clockwise (sometimes the modules are 180 degrees to the other 4 in 1 modules) RotateAntiClockwiseInvert Rotation = 4 // Used to rotate 4 in 1 LED matrix anti-clockwise (sometimes the modules are 180 degrees to the other 4 in 1 modules) )
Click to show internal directories.
Click to hide internal directories.