Skip to main content

Class Pcd8544

Represents a Pcd8544 monochrome display

Assembly: Pcd8544.dll
View Source
Declaration
public class Pcd8544 : IPixelDisplay, IDisplay, ISpiPeripheral, IDisposable

Implements:
Meadow.Peripherals.Displays.IPixelDisplay, Meadow.Peripherals.Displays.IDisplay, Meadow.Hardware.ISpiPeripheral, System.IDisposable

Properties

ColorMode

The currently set color mode for the display

View Source
Declaration
public ColorMode ColorMode { get; }

SupportedColorModes

The Color mode supported by the display

View Source
Declaration
public ColorMode SupportedColorModes { get; }

Height

Height of the display in pixels

View Source
Declaration
public int Height { get; }

Width

Width of the display in pixels

View Source
Declaration
public int Width { get; }

PixelBuffer

Provide a buffer that matches this display's color depth, height, and width This should be the buffer that is sent to the device when Show is called

View Source
Declaration
public IPixelBuffer PixelBuffer { get; }

IsDisplayInverted

Is the display inverted

View Source
Declaration
public bool IsDisplayInverted { get; }

DefaultSpiBusSpeed

The default SPI bus speed for the device

View Source
Declaration
public Frequency DefaultSpiBusSpeed { get; }

SpiBusSpeed

The SPI bus speed for the device

View Source
Declaration
public Frequency SpiBusSpeed { get; set; }

DefaultSpiBusMode

The default SPI bus mode for the device

View Source
Declaration
public SpiClockConfiguration.Mode DefaultSpiBusMode { get; }

SpiBusMode

The SPI bus mode for the device

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

IsDisposed

Is the object disposed

View Source
Declaration
public bool IsDisposed { get; }

Fields

spiComms

SPI Communication bus used to communicate with the peripheral

View Source
Declaration
protected ISpiCommunications spiComms

imageBuffer

Buffer to hold display data

View Source
Declaration
protected Buffer1bpp imageBuffer

commandBuffer

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

View Source
Declaration
protected Memory<byte> commandBuffer

Methods

Clear(bool)

Clear the display

View Source
Declaration
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
Declaration
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
Declaration
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
Declaration
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
Declaration
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
Declaration
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
Declaration
public void InvertDisplay(bool inverse)
Parameters
TypeNameDescription
System.BooleaninverseInvert if true, normal if false

Fill(Color, bool)

Fill with color

View Source
Declaration
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
Declaration
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
Declaration
public void WriteBuffer(int x, int y, IPixelBuffer displayBuffer)
Parameters
TypeNameDescription
System.Int32xx position in pixels
System.Int32yy position in pixels
Meadow.Peripherals.Displays.IPixelBufferdisplayBufferbuffer to draw

Dispose()

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

View Source
Declaration
public void Dispose()

Dispose(bool)

Dispose of the object

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

Implements

  • Meadow.Peripherals.Displays.IPixelDisplay
  • Meadow.Peripherals.Displays.IDisplay
  • Meadow.Hardware.ISpiPeripheral
  • System.IDisposable