Skip to main content

Class Uc1609c

Represents a UC1609C single color LCD display

Assembly: Uc1609c.dll​
View Source​
Declaration
public class Uc1609c : 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; }

Width​

Width of the display in pixels

View Source​
Declaration
public int Width { get; }

Height​

Height of the display in pixels

View Source​
Declaration
public int Height { 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; }

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 readonly ISpiCommunications spiComms

Methods​

SendData(byte)​

Send a command to the display

View Source​
Declaration
protected void SendData(byte data)
Parameters​
TypeNameDescription
System.BytedataCommand byte to send to the display

Reset()​

Reset the display

View Source​
Declaration
protected void Reset()

Clear(bool)​

Clear the display buffer

View Source​
Declaration
public void Clear(bool updateDisplay = false)
Parameters​
TypeNameDescription
System.BooleanupdateDisplayImmediately update the display when true

DrawPixel(int, int, Color)​

Draw pixel at a location

View Source​
Declaration
public void DrawPixel(int x, int y, Color color)
Parameters​
TypeNameDescription
System.Int32xAbscissa of the pixel to the set / reset
System.Int32yOrdinate of the pixel to the set / reset
Meadow.ColorcolorAny color = turn on pixel, black = turn off pixel

DrawPixel(int, int, bool)​

Draw pixel at a location

View Source​
Declaration
public void DrawPixel(int x, int y, bool enabled)
Parameters​
TypeNameDescription
System.Int32xAbscissa of the pixel to the set / reset
System.Int32yOrdinate of the pixel to the set / reset
System.BooleanenabledTrue = turn on pixel, false = turn off pixel

InvertPixel(int, int)​

Invert a pixel at a location

View Source​
Declaration
public void InvertPixel(int x, int y)
Parameters​
TypeNameDescription
System.Int32xAbscissa of the pixel to the set / reset
System.Int32yOrdinate of the pixel to the set / reset

Fill(Color, bool)​

Fill display buffer with a color

View Source​
Declaration
public void Fill(Color clearColor, bool updateDisplay = false)
Parameters​
TypeNameDescription
Meadow.ColorclearColorThe fill color
System.BooleanupdateDisplayIf true, update display

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

Fill with a color

View Source​
Declaration
public void Fill(int x, int y, int width, int height, Color color)
Parameters​
TypeNameDescription
System.Int32xX start position in pixels
System.Int32yY start position in pixels
System.Int32widthWidth in pixels
System.Int32heightHeight in pixels
Meadow.ColorcolorThe fill color

WriteBuffer(int, int, IPixelBuffer)​

Write a buffer to the display offscreen buffer

View Source​
Declaration
public void WriteBuffer(int x, int y, IPixelBuffer displayBuffer)
Parameters​
TypeNameDescription
System.Int32xThe x position in pixels to write the buffer
System.Int32yThe y position in pixels to write the buffer
Meadow.Peripherals.Displays.IPixelBufferdisplayBufferThe buffer to write

Show()​

Send the internal pixel buffer to display

View Source​
Declaration
public void Show()

Show(int, int, int, int)​

Send a region of the internal pixel buffer to display

View Source​
Declaration
public void Show(int left, int top, int right, int bottom)
Parameters​
TypeName
System.Int32left
System.Int32top
System.Int32right
System.Int32bottom

Scroll(byte)​

Scroll the display by 0 to 64 rows

View Source​
Declaration
public void Scroll(byte scrollValue)
Parameters​
TypeName
System.BytescrollValue
Exceptions​

System.ArgumentException

InvertDisplay(bool)​

Invert the display

View Source​
Declaration
public void InvertDisplay(bool invert)
Parameters​
TypeNameDescription
System.BooleaninvertTrue for inverted, False for normal

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