max7219spi

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Datasheet: https://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf

Index

Constants

View Source
const (
	REG_NOOP         byte = 0x00
	REG_DIGIT0       byte = 0x01
	REG_DIGIT1       byte = 0x02
	REG_DIGIT2       byte = 0x03
	REG_DIGIT3       byte = 0x04
	REG_DIGIT4       byte = 0x05
	REG_DIGIT5       byte = 0x06
	REG_DIGIT6       byte = 0x07
	REG_DIGIT7       byte = 0x08
	REG_DECODE_MODE  byte = 0x09
	REG_INTENSITY    byte = 0x0A
	REG_SCANLIMIT    byte = 0x0B
	REG_SHUTDOWN     byte = 0x0C
	REG_DISPLAY_TEST byte = 0x0F
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device interface {
	Configure()
	WriteCommand(register, data byte)
	StartShutdownMode()
	StopShutdownMode()
	StartDisplayTest()
	StopDisplayTest()
	SetDecodeMode(digitNumber uint8)
	SetScanLimit(digitNumber uint8)
}

func NewDevice

func NewDevice(load machine.Pin, bus machine.SPI) Device

NewDevice creates a new max7219 connection. The SPI wire must already be configured

Jump to

Keyboard shortcuts

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