Demonstration of Soft Fonts

Dependencies:   mbed RA8875

Fork of RA8875_Demo by David Smart

Demo of Software based fonts mixed with RA8875 hosted fonts.

/media/uploads/WiredHome/softfont2.png

Revision:
0:037b95a5cc85
Child:
2:2076d9cc6db9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jan 17 03:19:55 2014 +0000
@@ -0,0 +1,47 @@
+#include "mbed.h"
+
+#include "RA8875.h"
+
+RA8875 lcd(p5, p6, p7, p12, NC, "tft");    // MOSI, MISO, SCK, /ChipSelect, /reset, name
+
+Serial pc(USBTX, USBRX);
+
+int main()
+{
+    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);
+    
+    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.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));
+    while (1)
+        ;
+}