Skip to main content

Class Pcd8544

Represents a Pcd8544 monochrome display

Assembly: Pcd8544.dll
View Source
public class Pcd8544 : IGraphicsDisplay, ISpiPeripheral, IDisposable

Implements:
Meadow.Foundation.Graphics.IGraphicsDisplay, Meadow.Hardware.ISpiPeripheral, System.IDisposable

Properties

ColorMode

Display color mode

View Source
public ColorMode ColorMode { get; }

SupportedColorModes

The Color mode supported by the display

View Source
public ColorMode SupportedColorModes { get; }

Height

Height of display in pixels

View Source
public int Height { get; }

Width

Width of display in pixels

View Source
public int Width { get; }

PixelBuffer

The buffer the holds the pixel data for the display

View Source
public IPixelBuffer PixelBuffer { get; }

IsDisplayInverted

Is the display inverted

View Source
public bool IsDisplayInverted { get; }

DefaultSpiBusSpeed

The default SPI bus speed for the device

View Source
public Frequency DefaultSpiBusSpeed { get; }

SpiBusSpeed

The SPI bus speed for the device

View Source
public Frequency SpiBusSpeed { get; set; }

DefaultSpiBusMode

The default SPI bus mode for the device

View Source
public SpiClockConfiguration.Mode DefaultSpiBusMode { get; }

SpiBusMode

The SPI bus mode for the device

View Source
public SpiClockConfiguration.Mode SpiBusMode { get; set; }

IsDisposed

Is the object disposed

View Source
public bool IsDisposed { get; }

Fields

spiComms

SPI Communication bus used to communicate with the peripheral

View Source
protected ISpiCommunications spiComms

imageBuffer

Buffer to hold display data

View Source
protected Buffer1bpp imageBuffer

commandBuffer

Buffer to hold internal command data to be sent over the SPI bus

View Source
protected Memory<byte> commandBuffer

Methods

Clear(bool)

Clear the display

View Source
public void Clear(bool updateDisplay = false)
Parameters
TypeNameDescription
System.BooleanupdateDisplayIf true, it will force a display update

DrawPixel(int, int, bool)

Draw pixel at location

View Source
public void DrawPixel(int x, int y, bool enabled)
Parameters
TypeNameDescription
System.Int32xx position in pixels
System.Int32yy position in pixels
System.BooleanenabledTrue = turn on pixel, false = turn off pixel

InvertPixel(int, int)

Invert pixel at a location

View Source
public void InvertPixel(int x, int y)
Parameters
TypeNameDescription
System.Int32xx position in pixels
System.Int32yy position in pixels

DrawPixel(int, int, Color)

Draw pixel at location

View Source
public void DrawPixel(int x, int y, Color color)
Parameters
TypeNameDescription
System.Int32xx position in pixels
System.Int32yy position in pixels
Meadow.Colorcolorany value other than black will make the pixel visible

Show()

Update the display

View Source
public void Show()

Show(int, int, int, int)

Update a region of the display Currently always does a full screen update for this display

View Source
public void Show(int left, int top, int right, int bottom)
Parameters
TypeNameDescription
System.Int32leftThe left position in pixels
System.Int32topThe top position in pixels
System.Int32rightThe right position in pixels
System.Int32bottomThe bottom position in pixels

InvertDisplay(bool)

Invert the entire display

View Source
public void InvertDisplay(bool inverse)
Parameters
TypeNameDescription
System.BooleaninverseInvert if true, normal if false

Fill(Color, bool)

Fill with color

View Source
public void Fill(Color fillColor, bool updateDisplay = false)
Parameters
TypeNameDescription
Meadow.ColorfillColorcolor - converted to on/off
System.BooleanupdateDisplayshould refresh display

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

Fill region with color

View Source
public void Fill(int x, int y, int width, int height, Color fillColor)
Parameters
TypeNameDescription
System.Int32xx position
System.Int32yy position
System.Int32widthwidth of region
System.Int32heightheight of region
Meadow.ColorfillColorcolor - converted to on/off

WriteBuffer(int, int, IPixelBuffer)

Draw buffer at location

View Source
public void WriteBuffer(int x, int y, IPixelBuffer displayBuffer)
Parameters
TypeNameDescription
System.Int32xx position in pixels
System.Int32yy position in pixels
Meadow.Foundation.Graphics.Buffers.IPixelBufferdisplayBufferbuffer to draw

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source
public void Dispose()

Dispose(bool)

Dispose of the object

View Source
protected virtual void Dispose(bool disposing)
Parameters
TypeNameDescription
System.BooleandisposingIs disposing

Implements