Library to control a Graphics TFT connected to 4-wire SPI - revised for the Raio RA8875 Display Controller.
Dependents: FRDM_RA8875_mPaint RA8875_Demo RA8875_KeyPadDemo SignalGenerator ... more
Fork of SPI_TFT by
See Components - RA8875 Based Display
Enhanced touch-screen support - where it previous supported both the Resistive Touch and Capacitive Touch based on the FT5206 Touch Controller, now it also has support for the GSL1680 Touch Controller.
Offline Help Manual (Windows chm)
/media/uploads/WiredHome/ra8875.zip.bin (download, rename to .zip and unzip)
Revision 50:2c4f474a2453, committed 2014-03-15
- Comitter:
- WiredHome
- Date:
- Sat Mar 15 17:35:51 2014 +0000
- Parent:
- 45:679c2fb8480c
- Child:
- 51:aa1f57b81da1
- Commit message:
- API name change from SelectLayer to SelectDrawingLayer.
Changed in this revision
RA8875.cpp | Show annotated file Show diff for this revision Revisions of this file |
RA8875.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/RA8875.cpp Mon Mar 10 23:53:40 2014 +0000 +++ b/RA8875.cpp Sat Mar 15 17:35:51 2014 +0000 @@ -72,7 +72,7 @@ //} -RetCode_t RA8875::SelectLayer(uint16_t layer) +RetCode_t RA8875::SelectDrawingLayer(uint16_t layer) { unsigned char mwcr1 = ReadCommand(0x41) & ~0x01; // retain all but the currently selected layer @@ -1156,11 +1156,14 @@ WriteCommand(0x20, 0x80); // DPCR - 2-layer mode } - // Clear ram image + // Set display image to Blue on Black as default window(0,0, width, height); // Initialize to full screen SetTextCursorControl(); foreground(Blue); background(Black); + SelectDrawingLayer(1); + cls(); + SelectDrawingLayer(0); cls(); return noerror; } @@ -1424,7 +1427,7 @@ if (!SuppressSlowStuff) pc.printf("Layer Test\r\n"); - display.SelectLayer(0); + display.SelectDrawingLayer(0); display.background(Black); display.foreground(Blue); display.cls(); @@ -1443,7 +1446,7 @@ if (!SuppressSlowStuff) wait_ms(1000); - display.SelectLayer(1); + display.SelectDrawingLayer(1); display.background(Black); display.foreground(Yellow); display.cls(); @@ -1460,7 +1463,7 @@ if (!SuppressSlowStuff) wait_ms(2000); - display.SelectLayer(0); + display.SelectDrawingLayer(0); display.SetLayerMode(0); // Show Layer 0 again if (!SuppressSlowStuff) wait_ms(1000);
--- a/RA8875.h Mon Mar 10 23:53:40 2014 +0000 +++ b/RA8875.h Sat Mar 15 17:35:51 2014 +0000 @@ -128,7 +128,7 @@ // at startup, and not at runtime. //~RA8875(); - /// Select the layer for subsequent commands. + /// Select the drawing layer for subsequent commands. /// /// If the screen configuration is 480 x 272, or if it is 800 x 480 /// and 8-bit color, the the display supports two layers, which can @@ -144,7 +144,7 @@ /// to in the user manual). /// @returns success/failure code. @see RetCode_t. /// - RetCode_t SelectLayer(uint16_t layer); + RetCode_t SelectDrawingLayer(uint16_t layer); /// Set the Layer presentation mode. ///