Remarks

Gc9a01
Status
Source code GitHub
NuGet package

Code Example

public class MeadowApp : App<F7Micro, MeadowApp>
{
    Gc9a01 display;
    GraphicsLibrary graphics;

    public MeadowApp ()
    {
        display = new Gc9a01(
            device: Device, 
            spiBus: Device.CreateSpiBus(),
            chipSelectPin: Device.Pins.D02,
            dcPin: Device.Pins.D01,
            resetPin: Device.Pins.D00);

        graphics = new GraphicsLibrary(display);

        graphics.CurrentFont = new Font8x8();
        graphics.Clear();
        graphics.DrawTriangle(10, 10, 50, 50, 10, 50, Meadow.Foundation.Color.Red);
        graphics.DrawRectangle(20, 15, 40, 20, Meadow.Foundation.Color.Yellow, false);
        graphics.DrawCircle(50, 50, 40, Meadow.Foundation.Color.Blue, false);
        graphics.DrawText(5, 5, "Meadow F7 SPI");
        graphics.Show();
    }
}

Circuit Example

To wire a Gc9a01 to your Meadow board, connect the following:

Gc9a01 Meadow Pin
GND GND
VCC 3V3
SCL SCK
SDA MOSI
CS D02
DC D01
RESET D00

It should look like the following diagram:

Characteristic Locus
Inheritance System.Object DisplayBase TftSpiBase > Gc9a01
Implements System.IDisposable
Inherited Members TftSpiBase.NO_OP TftSpiBase.MADCTL TftSpiBase.MADCTL_MY TftSpiBase.MADCTL_MX TftSpiBase.MADCTL_MV TftSpiBase.MADCTL_ML TftSpiBase.MADCTL_RGB TftSpiBase.MADCTL_BGR TftSpiBase.MADCTL_MH TftSpiBase.MADCTL_SS TftSpiBase.MADCTL_GS TftSpiBase.COLOR_MODE TftSpiBase.ColorMode TftSpiBase.colorMode TftSpiBase.Width TftSpiBase.Height TftSpiBase.dataCommandPort TftSpiBase.resetPort TftSpiBase.chipSelectPort TftSpiBase.spi TftSpiBase.spiDisplay TftSpiBase.spiBuffer TftSpiBase.spiReceive TftSpiBase.currentPen TftSpiBase.width TftSpiBase.height TftSpiBase.xMin TftSpiBase.xMax TftSpiBase.yMin TftSpiBase.yMax TftSpiBase.Data TftSpiBase.Command TftSpiBase.SetColorMode(DisplayBase.DisplayColorMode) TftSpiBase.Clear(Boolean) TftSpiBase.Clear(Color, Boolean) TftSpiBase.Clear(UInt16, Boolean) TftSpiBase.SetPenColor(Color) TftSpiBase.DrawPixel(Int32, Int32) TftSpiBase.DrawPixel(Int32, Int32, Boolean) TftSpiBase.DrawPixel(Int32, Int32, UInt16) TftSpiBase.DrawPixel(Int32, Int32, Color) TftSpiBase.DrawPixel(Int32, Int32, Byte, Byte, Byte) TftSpiBase.InvertPixel(Int32, Int32) TftSpiBase.InvertPixelRgb444(Int32, Int32) TftSpiBase.Show() TftSpiBase.Show(Int32, Int32, Int32, Int32) TftSpiBase.Write(Byte) TftSpiBase.Write(Byte[]) TftSpiBase.DelayMs(Int32) TftSpiBase.SendCommand(Byte) TftSpiBase.SendData(Int32) TftSpiBase.SendData(Byte) TftSpiBase.SendData(Byte[]) TftSpiBase.ClearScreen(UInt16) TftSpiBase.Dispose() DisplayBase.IgnoreOutOfBoundsPixels
Namespace Meadow.Foundation.Displays.Tft
Assembly TftSpi.dll

Syntax

public class Gc9a01 : TftSpiBase, IDisposable

Constructors

Gc9a01(IIODevice, ISpiBus, IPin, IPin, IPin)

Declaration
public Gc9a01(IIODevice device, ISpiBus spiBus, IPin chipSelectPin, IPin dcPin, IPin resetPin)

Parameters

Type Name Description
IIODevice device
ISpiBus spiBus
IPin chipSelectPin
IPin dcPin
IPin resetPin

Properties

DefautColorMode

Declaration
public override DisplayBase.DisplayColorMode DefautColorMode { get; }

Property Value

Type Description
DisplayBase.DisplayColorMode

Overrides

Methods

Initialize()

Declaration
protected override void Initialize()

Overrides

IsColorModeSupported(DisplayBase.DisplayColorMode)

Declaration
public override bool IsColorModeSupported(DisplayBase.DisplayColorMode mode)

Parameters

Type Name Description
DisplayBase.DisplayColorMode mode

Returns

Type Description
System.Boolean

Overrides

SetAddressWindow(Int32, Int32, Int32, Int32)

Declaration
protected override void SetAddressWindow(int x0, int y0, int x1, int y1)

Parameters

Type Name Description
System.Int32 x0
System.Int32 y0
System.Int32 x1
System.Int32 y1

Overrides

SetRotation(TftSpiBase.Rotation)

Declaration
public void SetRotation(TftSpiBase.Rotation rotation)

Parameters

Type Name Description
TftSpiBase.Rotation rotation