Characteristic Locus
Inheritance object EPaperBase > EPaperTriColorBase > Epd4in2bV2 > Il0373 > Il0376F > Il0398 > Il91874 > Ssd1680 > Ssd1681 > Uc8151c
Implements ISpiPeripheral IDisposable IGraphicsDisplay
Inherited Members EPaperBase.DefaultSpiBusSpeed EPaperBase.SpiBusSpeed EPaperBase.DefaultSpiBusMode EPaperBase.SpiBusMode EPaperBase.IsDisposed EPaperBase.commandBuffer EPaperBase.dataCommandPort EPaperBase.resetPort EPaperBase.chipSelectPort EPaperBase.busyPort EPaperBase.spiComms EPaperBase.DataState EPaperBase.CommandState EPaperBase.createdPorts EPaperBase.Write(byte) EPaperBase.Reset() EPaperBase.DelayMs(int) EPaperBase.SendCommand(byte) EPaperBase.SendData(int) EPaperBase.SendData(byte) EPaperBase.SendData(byte[]) EPaperBase.WaitUntilIdle() EPaperBase.Dispose() EPaperBase.Dispose(bool) object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
Namespace Meadow.Foundation.Displays
Assembly EPaper.dll

Syntax

public abstract class EPaperTriColorBase : EPaperBase, ISpiPeripheral, IDisposable, IGraphicsDisplay

Constructors

EPaperTriColorBase(ISpiBus, IDigitalOutputPort, IDigitalOutputPort, IDigitalOutputPort, IDigitalInputPort, int, int)

Create a new ePaper display object

Declaration
public EPaperTriColorBase(ISpiBus spiBus, IDigitalOutputPort chipSelectPort, IDigitalOutputPort dataCommandPort, IDigitalOutputPort resetPort, IDigitalInputPort busyPort, int width, int height)

Parameters

Type Name Description
ISpiBus spiBus

SPI bus connected to display

IDigitalOutputPort chipSelectPort

Chip select output port

IDigitalOutputPort dataCommandPort

Data command output port

IDigitalOutputPort resetPort

Reset output port

IDigitalInputPort busyPort

Busy input port

int width

Width of display in pixels

int height

Height of display in pixels

EPaperTriColorBase(ISpiBus, IPin, IPin, IPin, IPin, int, int)

Create a new color ePaper display object

Declaration
public EPaperTriColorBase(ISpiBus spiBus, IPin chipSelectPin, IPin dcPin, IPin resetPin, IPin busyPin, int width, int height)

Parameters

Type Name Description
ISpiBus spiBus

SPI bus connected to display

IPin chipSelectPin

Chip select pin

IPin dcPin

Data command pin

IPin resetPin

Reset pin

IPin busyPin

Busy pin

int width

Width of display in pixels

int height

Height of display in pixels

Fields

imageBuffer

The buffer the holds the black pixel data for the display

Declaration
protected Buffer2bppEPaper imageBuffer

Field Value

Type Description
Buffer2bppEPaper

Properties

ColorMode

Display color mode

Declaration
public ColorMode ColorMode { get; }

Property Value

Type Description
ColorMode

DisabledColor

The color to draw when a pixel is disabled

Declaration
public Color DisabledColor { get; }

Property Value

Type Description
Color

EnabledColor

The color to draw when a pixel is enabled

Declaration
public Color EnabledColor { get; }

Property Value

Type Description
Color

Height

Height of display in pixels

Declaration
public virtual int Height { get; }

Property Value

Type Description
int

IsBlackInverted

Is the black pixel data inverted

Declaration
protected abstract bool IsBlackInverted { get; }

Property Value

Type Description
bool

IsColorInverted

Is the color pixel data inverted

Declaration
protected abstract bool IsColorInverted { get; }

Property Value

Type Description
bool

PixelBuffer

The pixel buffer - not directly accessible Use buffer.BlackBuffer and buffer.ColorBuffer to access byte arrays

Declaration
public IPixelBuffer PixelBuffer { get; }

Property Value

Type Description
IPixelBuffer

SupportedColorModes

The Color mode supported by the display

Declaration
public ColorMode SupportedColorModes { get; }

Property Value

Type Description
ColorMode

Width

Width of display in pixels

Declaration
public virtual int Width { get; }

Property Value

Type Description
int

Methods

Clear(bool)

Clear the display buffer

Declaration
public void Clear(bool updateDisplay = false)

Parameters

Type Name Description
bool updateDisplay

Update the display if true

Clear(bool, bool)

Clear the display buffer

Declaration
public void Clear(bool enabled, bool updateDisplay = false)

Parameters

Type Name Description
bool enabled

If true, fill with the enabled color (default is white)

bool updateDisplay

If true, refresh the display

CreateBuffer(int, int)

Create an offscreen buffer for the display

Declaration
protected virtual void CreateBuffer(int width, int height)

Parameters

Type Name Description
int width

The width in pixels

int height

The height in pixels

DrawBlackPixel(int, int, bool)

Draw a black pixel

Declaration
public void DrawBlackPixel(int x, int y, bool enabled)

Parameters

Type Name Description
int x

The x location in pixels

int y

The y location in pixels

bool enabled

If true, use the enabled color (default is white)

DrawColoredPixel(int, int, bool)

Set a colored pixel (on or off)

Declaration
public void DrawColoredPixel(int x, int y, bool isOn)

Parameters

Type Name Description
int x

The x pixel location

int y

The y pixel location

bool isOn

True for on, false for off

DrawPixel(int, int, Color)

Draw a pixel

Declaration
public void DrawPixel(int x, int y, Color color)

Parameters

Type Name Description
int x

The x pixel location

int y

The y pixel location

Color color

The pixel color

DrawPixel(int, int, bool)

Draw a pixel

Declaration
public void DrawPixel(int x, int y, bool enabled)

Parameters

Type Name Description
int x

The x location in pixels

int y

The y location in pixels

bool enabled

If true, use the enabled color (default is white)

Fill(Color, bool)

Fill the display buffer with a color

Declaration
public void Fill(Color color, bool updateDisplay = false)

Parameters

Type Name Description
Color color

The color - normalized to black, white or color

bool updateDisplay

Refresh the display if true

Fill(int, int, int, int, Color)

Fill a region of the display buffer with a color

Declaration
public void Fill(int x, int y, int width, int height, Color color)

Parameters

Type Name Description
int x

The x location

int y

The y location

int width

The width to fill in pixels

int height

The height to fill in pixels

Color color

The color to fill - normalized to black, white or color

Initialize()

Initialize the display

Declaration
protected abstract void Initialize()

InvertPixel(int, int)

Invert a pixel

Declaration
public void InvertPixel(int x, int y)

Parameters

Type Name Description
int x

The x location in pixels

int y

The y location in pixels

SendCommand(Command)

Send a command to the display

Declaration
protected void SendCommand(EPaperTriColorBase.Command command)

Parameters

Type Name Description
EPaperTriColorBase.Command command

The command

Show()

Update the display

Declaration
public virtual void Show()

Exceptions

Type Condition
NotImplementedException

Show(int, int, int, int)

Update a region of the display from the offscreen buffer

Declaration
public virtual void Show(int left, int top, int right, int bottom)

Parameters

Type Name Description
int left

Left bounds in pixels

int top

Top bounds in pixels

int right

Right bounds in pixels

int bottom

Bottom bounds in pixels

WriteBuffer(int, int, IPixelBuffer)

Write a buffer to the display buffer

Declaration
public void WriteBuffer(int x, int y, IPixelBuffer displayBuffer)

Parameters

Type Name Description
int x

The x position in pixels to write the buffer

int y

The y position in pixels to write the buffer

IPixelBuffer displayBuffer

The buffer to write