epd2in13

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dev

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

Dev is open handle to display controller.

func NewSPI

func NewSPI(p spi.Port, dc, rst gpio.PinOut, busy gpio.PinIO) (*Dev, error)

NewSPI returns a Dev object that communicates over SPI to epd2in13 E-Paper display controller.

func NewSPIHat

func NewSPIHat(p spi.Port) (*Dev, error)

NewSPIHat returns a Dev object that communicates over SPI and have the default config for the e-paper hat for raspberry pi

func (*Dev) Bounds

func (d *Dev) Bounds() image.Rectangle

Bounds implements display.Drawer

func (*Dev) ColorModel

func (d *Dev) ColorModel() color.Model

ColorModel implements display.Drawer

func (*Dev) Draw

func (d *Dev) Draw(r image.Rectangle, src image.Image, sp image.Point) error

Draw implements display.Drawer

func (*Dev) Halt

func (d *Dev) Halt() error

Halt turns off the display (clean up)

func (*Dev) Init

func (d *Dev) Init(fullUpdate bool) error

Init initialize the display config. This method is already called when creating a device using NewSPI and NewSPIHat methods.

It should be only used when you put the device to sleep and need to re-init the device.

func (*Dev) Reset

func (d *Dev) Reset()

Reset can be also used to awaken the device

func (*Dev) Sleep

func (d *Dev) Sleep()

Sleep after this command is transmitted, the chip would enter the deep-sleep mode to save power.

The deep sleep mode would return to standby by hardware reset. You can use Reset() to awaken and Init to re-initialize the device.

func (*Dev) String

func (d *Dev) String() string

Jump to

Keyboard shortcuts

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