display

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEInk

func NewEInk(config config.DisplayConfig) dev.Display

NewEInk creates new EInk driver instance by implementing dev.Display interface.

Types

type EInk

type EInk struct {
	*periphery.SPI
	// contains filtered or unexported fields
}

EInk is an implementation of dev.Display driver for E-Ink 2.13" display.

func (*EInk) Bounds

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

Bounds implements display.Drawer. Min is guaranteed to be {0, 0}.

func (*EInk) Clear

func (d *EInk) Clear() error

Clear clears the EInk display.

func (*EInk) ClearAndRefresh

func (d *EInk) ClearAndRefresh() error

ClearAndRefresh clears the EInk display and triggers update of the frame.

func (*EInk) ColorModel

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

ColorModel implements display.Drawer. It is a one bit color model, as implemented by image1bit.Bit.

func (*EInk) Draw

func (d *EInk) Draw(src image.Image) error

Draw sends `src` image binary representation to EInk display buffer. Use Refresh() or DrawAndRefresh() to display image.

func (*EInk) DrawAndRefresh

func (d *EInk) DrawAndRefresh(src image.Image) error

DrawAndRefresh sends `src` image binary representation to EInk display buffer and triggers update of the frame.

func (*EInk) DrawRaw

func (d *EInk) DrawRaw(r image.Rectangle, src image.Image, sp image.Point) error

DrawRaw implements display.Drawer.

func (*EInk) Init

func (d *EInk) Init() error

Init performs EInk display device initialization.

func (*EInk) Refresh

func (d *EInk) Refresh() error

Refresh updates the EInk display.

func (*EInk) Reset

func (d *EInk) Reset() (err error)

Reset performs hardware reset of the EInk display.

func (*EInk) ResetFrameMemory

func (d *EInk) ResetFrameMemory(color byte) error

ResetFrameMemory clear the frame memory with the specified color. this won't update the display.

func (*EInk) SendCommand

func (d *EInk) SendCommand(cmd byte) (err error)

SendCommand overrides periphery.SPI send command method by additionally sending signals to DC and CS GPIO pins.

func (*EInk) SendCommandArgs

func (d *EInk) SendCommandArgs(cmd byte, data ...byte) error

SendCommandArgs overrides periphery.SPI send command with args method by additionally sending signals to DC and CS GPIO pins.

func (*EInk) SendData

func (d *EInk) SendData(data ...byte) (err error)

SendData overrides periphery.SPI send data method by additionally sending signals to DC and CS GPIO pins.

func (*EInk) Sleep

func (d *EInk) Sleep() error

Sleep puts EInk display to deep-sleep mode to save power. Use Reset() to awaken and Init to re-initialize the device.

Jump to

Keyboard shortcuts

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