Documentation ¶
Overview ¶
Package epd provides driver for Waveshare's E-paper e-ink display
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidImageSize = errors.New("invalid image size")
ErrInvalidImageSize is returned if the given image bounds doesn't fit into display bounds
Functions ¶
This section is empty.
Types ¶
type EPD ¶
type EPD struct { // dimensions of the display Height int Width int // contains filtered or unexported fields }
EPD defines the base type for the e-paper display driver
func New ¶
func New(rst, dc, cs WriteablePin, busy ReadablePin, transmit Transmit) *EPD
New creates a new EPD device driver
func (*EPD) Mode ¶
mode sets the device's mode (based on the LookupTable) The device can either be in FullUpdate mode where the whole display is updated each time an image is rendered or in PartialUpdate mode where only the changed section is updated (and it doesn't cause any flicker)
Waveshare recommends doing full update of the display at least once per-day to prevent ghost image problems
type Mode ¶
type Mode uint8
LookupTable defines a type holding the instruction lookup table This lookup table is used by the device when performing refreshes
type ReadablePin ¶
type ReadablePin interface { // Read reads from the pin and return the data as a byte Read() uint8 }
ReadablePin is a GPIO pin through which the driver can read digital data
type Transmit ¶
type Transmit func(data ...byte)
Transmit is a function that sends the data payload across to the device via the SPI line
type WriteablePin ¶
type WriteablePin interface { // High sets the pins output to digital high High() // Low sets the pins output to digital low Low() }
WriteablePin is a GPIO pin through which the driver can write digital data