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

Files at this revision

API Documentation at this revision

Comitter:
WiredHome
Date:
Sun Dec 28 21:56:03 2014 +0000
Parent:
2:2076d9cc6db9
Child:
4:5b1e85519d73
Commit message:
Minor updates to match the RA8875 library updates.

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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/RA8875.lib	Fri Jan 17 17:24:52 2014 +0000
+++ b/RA8875.lib	Sun Dec 28 21:56:03 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/WiredHome/code/RA8875/#ed102fc442c4
+http://mbed.org/users/WiredHome/code/RA8875/#01da2e34283d
--- a/main.cpp	Fri Jan 17 17:24:52 2014 +0000
+++ b/main.cpp	Sun Dec 28 21:56:03 2014 +0000
@@ -8,6 +8,8 @@
 int main()
 {
     int i;
+    Timer t;
+    float f = 10000000;
     
     pc.baud(460800);    // I like a snappy terminal, so crank it up!
     pc.printf("\r\nRA8875 Test - Build " __DATE__ " " __TIME__ "\r\n");
@@ -15,11 +17,15 @@
     pc.printf("Turning on display\r\n");
     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);
-    
+    t.start();
+    lcd.init();
+    lcd.frequency(f);
+    lcd.cls();
+    wait_ms(250);
+    uint32_t tStart = t.read_us();
     lcd.puts(0,0,
-        "RA8875 lcd(p5, p6, p7, p12, NC, \"tft\");\r\n\r\n"
+        "RA8875 lcd(p5, p6, p7, p12, NC, \"tft\");\r\n"
+        "lcd.init(true, 480,272,16);\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"
@@ -47,6 +53,17 @@
     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)
-        ;
+    uint32_t tEnd = t.read_us();
+    pc.printf("@ %4.2f MHz, elapsed time is %u usec.\r\n", (float)f/1000000, tEnd-tStart);
+    
+    lcd.KeypadInit();
+    while(1) {
+        while(!lcd.readable())
+            ;
+        if (lcd.readable()) {
+            int k = lcd.getc();
+            pc.printf("key: %02X \r\n", k);
+        }
+        wait_ms(50);
+    }
 }
--- a/mbed.bld	Fri Jan 17 17:24:52 2014 +0000
+++ b/mbed.bld	Sun Dec 28 21:56:03 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013
\ No newline at end of file