FRDM-K64F version of David Smart's RA8875_Demo using SDFileSystem to write to an SD card instead of LocalFileSystem

Dependencies:   RA8875 SDFileSystem mbed

Fork of RA8875_Demo by David Smart

/media/uploads/unix_guru/ra8875_demo.png

Revision:
2:2076d9cc6db9
Parent:
0:037b95a5cc85
Child:
3:ca6a1026c28e
--- a/main.cpp	Fri Jan 17 03:23:24 2014 +0000
+++ b/main.cpp	Fri Jan 17 17:24:52 2014 +0000
@@ -2,46 +2,51 @@
 
 #include "RA8875.h"
 
-RA8875 lcd(p5, p6, p7, p12, NC, "tft");    // MOSI, MISO, SCK, /ChipSelect, /reset, name
 
 Serial pc(USBTX, USBRX);
 
 int main()
 {
+    int i;
+    
     pc.baud(460800);    // I like a snappy terminal, so crank it up!
     pc.printf("\r\nRA8875 Test - Build " __DATE__ " " __TIME__ "\r\n");
     
     pc.printf("Turning on display\r\n");
-    lcd.Reset();
-    lcd.Power(true);  // display power is on, but the backlight is independent
-    lcd.background(Black);
-    lcd.foreground(Blue);
-    lcd.cls();
-    lcd.Backlight(1.0);
+    RA8875 lcd(p5, p6, p7, p12, NC, "tft");    // MOSI, MISO, SCK, /ChipSelect, /reset, name
+
+    //lcd.Power(true);  // display power is on, but the backlight is independent
+    //lcd.Backlight(1.0);
     
-    lcd.puts(0,0, "Raio RA8875 Display Controller Library\r\n");
-    lcd.puts("This library uses a 4-wire SPI interface.\r\n\r\n"
-    "lcd.circle(       400,15,  15,    BrightRed);\r\n"
-    "lcd.fillcircle(   440,15,  15,    RGB(128,255,128));\r\n"
-    "lcd.ellipse(      400,50,  25,10,            BrightBlue);\r\n"
-    "lcd.fillellipse(  440,50,  25,10,            Blue);\r\n"
-    "lcd.triangle(     400,75,  430,90,  410,100, Magenta);\r\n"
-    "lcd.filltriangle( 440,100, 480,120, 450,130, Cyan);\r\n"
-    "lcd.rect(         400,150, 479,200,          Brown);\r\n"
-    "lcd.fillrect(     410,160, 470,190,          Pink);\r\n"
-    "lcd.roundrect(    405,200, 450,255, 10,16,   Yellow);\r\n"
-    "lcd.fillroundrect(420,220, 435,250,  5,8,    RGB(10,30,50));");
+    lcd.puts(0,0,
+        "RA8875 lcd(p5, p6, p7, p12, NC, \"tft\");\r\n\r\n"
+        "lcd.circle(       400,25,  25,  BrightRed);\r\n"
+        "lcd.fillcircle(   400,25,  15,  RGB(128,255,128));\r\n"
+        "lcd.ellipse(      440,75,  35,20, BrightBlue);\r\n"
+        "lcd.fillellipse(  440,75,  25,10, Blue);\r\n"
+        "lcd.triangle(     440,100, 475,110, 450,125, Magenta);\r\n"
+        "lcd.filltriangle( 445,105, 467,111, 452,120, Cyan);\r\n"
+        "lcd.rect(         400,130, 475,155,    Brown);\r\n"
+        "lcd.fillrect(     405,135, 470,150,    Pink);\r\n"
+        "lcd.roundrect(    410,160, 475,190, 10,8, Yellow);\r\n"
+        "lcd.fillroundrect(415,165, 470,185,  5,3, Orange);\r\n"
+        "lcd.line(         430,200, 460,230, RGB(0,255,0));\r\n"
+        "for (i=0; i<=30; i+=5)\r\n"
+        "    lcd.pixel(435+i,200+i, White);");
 
-    lcd.circle(       400,15,  15,               BrightRed);
-    lcd.fillcircle(   440,15,  15,               RGB(128,255,128));
-    lcd.ellipse(      400,50,  25,10,            BrightBlue);
-    lcd.fillellipse(  440,50,  25,10,            Blue);
-    lcd.triangle(     400,75,  430,90,  410,100, Magenta);
-    lcd.filltriangle( 440,100, 480,120, 450,130, Cyan);
-    lcd.rect(         400,150, 479,200,          Brown);
-    lcd.fillrect(     410,160, 470,190,          Pink);
-    lcd.roundrect(    405,200, 450,255, 10,16,   Yellow);
-    lcd.fillroundrect(420,220, 435,250,  5,8,    RGB(10,30,50));
+    lcd.circle(       400,25,  25,               BrightRed);
+    lcd.fillcircle(   400,25,  15,               RGB(128,255,128));
+    lcd.ellipse(      440,75,  35,20,            BrightBlue);
+    lcd.fillellipse(  440,75,  25,10,            Blue);
+    lcd.triangle(     440,100, 475,110, 450,125, Magenta);
+    lcd.filltriangle( 445,105, 467,111, 452,120, Cyan);
+    lcd.rect(         400,130, 475,155,          Brown);
+    lcd.fillrect(     405,135, 470,150,          Pink);
+    lcd.roundrect(    410,160, 475,190, 10,8,    Yellow);
+    lcd.fillroundrect(415,165, 470,185,  5,3,    Orange);
+    lcd.line(         430,200, 460,230,          RGB(0,255,0));
+    for (i=0; i<=30; i+=5) 
+        lcd.pixel(435+i,200+i, White);
     while (1)
         ;
 }