Remarks
Rm68140 | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
public class MeadowApp : App<F7Micro, MeadowApp>
{
Rm68140 display;
GraphicsLibrary graphics;
public MeadowApp ()
{
display = new Rm68140(
device: Device,
spiBus: Device.CreateSpiBus(),
chipSelectPin: Device.Pins.D02,
dcPin: Device.Pins.D01,
resetPin: Device.Pins.D00,
width: 320, height: 480,
displayColorMode: DisplayColorMode.Format12bppRgb444);
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 Rm68140 to your Meadow board, connect the following:
Rm68140 | Meadow Pin |
---|---|
GND | GND |
VCC | 3V3 |
SCL | SCK |
SDA | MOSI |
CS | D02 |
DC | D01 |
RESET | D00 |
It should look like the following diagram:
Syntax
public class Rm68140 : TftSpiBase, IDisposable
Constructors
Rm68140(IIODevice, ISpiBus, IPin, IPin, IPin, Int32, Int32, DisplayBase.DisplayColorMode)
Declaration
public Rm68140(IIODevice device, ISpiBus spiBus, IPin chipSelectPin, IPin dcPin, IPin resetPin, int width = 320, int height = 480, DisplayBase.DisplayColorMode displayColorMode = DisplayBase.DisplayColorMode.Format12bppRgb444)
Parameters
Type | Name | Description |
---|---|---|
IIODevice | device | |
ISpiBus | spiBus | |
IPin | chipSelectPin | |
IPin | dcPin | |
IPin | resetPin | |
System.Int32 | width | |
System.Int32 | height | |
DisplayBase.DisplayColorMode | displayColorMode |
Properties
DefautColorMode
Declaration
public override DisplayBase.DisplayColorMode DefautColorMode { get; }
Property Value
Type | Description |
---|---|
DisplayBase.DisplayColorMode |
Overrides
Methods
Initialize()
Declaration
protected override void Initialize()
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 |