An example program using the RA8875 Display controller with the touch-screen option.

Dependencies:   RA8875

Files at this revision

API Documentation at this revision

Comitter:
WiredHome
Date:
Sun Jul 28 03:44:00 2019 +0000
Parent:
5:e627ad34c2a6
Child:
7:5194e00baf6f
Commit message:
update RA lib

Changed in this revision

RA8875.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/RA8875.lib	Mon Mar 04 12:17:10 2019 +0000
+++ b/RA8875.lib	Sun Jul 28 03:44:00 2019 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/WiredHome/code/RA8875/#f92c0f1f6db4
+http://mbed.org/users/WiredHome/code/RA8875/#c7fb7a4fb42f
--- a/main.cpp	Mon Mar 04 12:17:10 2019 +0000
+++ b/main.cpp	Sun Jul 28 03:44:00 2019 +0000
@@ -7,10 +7,10 @@
 const char * BUILD_DATE = __DATE__ " " __TIME__;
 
 // Define this for 800x480 panel, undefine for 480x272
-//#define BIG_SCREEN
+#define BIG_SCREEN
 
 // Define this for Cap touch panel, undefine for resistive
-//#define CAP_TOUCH
+#define CAP_TOUCH
 
 #ifdef CAP_TOUCH
 RA8875 lcd(p5, p6, p7, p12, NC, p9,p10,p13, "tft"); // SPI:{MOSI,MISO,SCK,/ChipSelect,/reset}, I2C:{SDA,SCL,/IRQ}, name
@@ -154,12 +154,12 @@
     // +----------------------------------------------------+ y = 271
     //   10                                             w-10
     rect_t RGBList[] = {
-        { 10,100, LCD_W-10,139 },    // R
-        { 10,150, LCD_W-10,189 },    // G
-        { 10,200, LCD_W-10,239 },    // B
-        { 10, 50, LCD_W-10, 89 }     // This for the Sample
+        rect_t( 10,100, LCD_W-10,139 ),    // R
+        rect_t( 10,150, LCD_W-10,189 ),    // G
+        rect_t( 10,200, LCD_W-10,239 ),    // B
+        rect_t( 10, 50, LCD_W-10, 89 )     // This for the Sample
     };
-    rect_t PrintScreenRect = { LCD_W/2-30, 5, LCD_W/2+30, 40};
+    rect_t PrintScreenRect = rect_t( LCD_W/2-30, 5, LCD_W/2+30, 40 );
     lcd.fillrect(RGBList[0], Red);
     lcd.fillrect(RGBList[1], Green);
     lcd.fillrect(RGBList[2], Blue);