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

Committer:
WiredHome
Date:
Sat Jan 23 17:48:06 2016 +0000
Revision:
11:2fcc3ee75ebd
Parent:
6:8e392d0ff74a
update libs

Who changed what in which revision?

UserRevisionLine numberNew contents of line
WiredHome 11:2fcc3ee75ebd 1 #include "mbed.h" // v112
WiredHome 11:2fcc3ee75ebd 2 #include "RA8875.h" // v102
WiredHome 5:bb970d40cd7d 3 #include "MyFont18x32.h"
WiredHome 5:bb970d40cd7d 4 #include "BPG_Arial08x08.h"
WiredHome 5:bb970d40cd7d 5 #include "BPG_Arial10x10.h"
WiredHome 5:bb970d40cd7d 6 #include "BPG_Arial20x20.h"
WiredHome 5:bb970d40cd7d 7 #include "BPG_Arial31x32.h"
WiredHome 5:bb970d40cd7d 8 #include "BPG_Arial63x63.h"
WiredHome 0:037b95a5cc85 9
WiredHome 5:bb970d40cd7d 10 LocalFileSystem local("local"); // Because I want <PrintScreen>
WiredHome 5:bb970d40cd7d 11 Serial pc(USBTX, USBRX); // And a little feedback
WiredHome 0:037b95a5cc85 12
WiredHome 0:037b95a5cc85 13 int main()
WiredHome 0:037b95a5cc85 14 {
WiredHome 5:bb970d40cd7d 15 RA8875 lcd(p5, p6, p7, p12, NC, "tft"); // MOSI, MISO, SCK, /ChipSelect, /reset, name
WiredHome 2:2076d9cc6db9 16
WiredHome 5:bb970d40cd7d 17 pc.baud(460800); // I like a snappy terminal, so crank it up!
WiredHome 5:bb970d40cd7d 18 pc.printf("\r\nRA8875 Soft Fonts - Build " __DATE__ " " __TIME__ "\r\n");
WiredHome 2:2076d9cc6db9 19
WiredHome 3:ca6a1026c28e 20 lcd.init();
WiredHome 6:8e392d0ff74a 21
WiredHome 6:8e392d0ff74a 22
WiredHome 6:8e392d0ff74a 23 // **************************
WiredHome 6:8e392d0ff74a 24 //RunTestSet(lcd, pc);
WiredHome 6:8e392d0ff74a 25
WiredHome 6:8e392d0ff74a 26
WiredHome 5:bb970d40cd7d 27 lcd.foreground(BrightBlue);
WiredHome 5:bb970d40cd7d 28 lcd.puts(0,0, "RA8875 Soft Fonts - Build " __DATE__ " " __TIME__ "\r\n");
WiredHome 0:037b95a5cc85 29
WiredHome 5:bb970d40cd7d 30 lcd.SelectUserFont(Dave_Smart18x32);
WiredHome 5:bb970d40cd7d 31 lcd.puts("**** ! Soft Fonts ! **** 0123456789\r\n");
WiredHome 5:bb970d40cd7d 32 lcd.puts("ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
WiredHome 5:bb970d40cd7d 33 lcd.puts("abcdefghijklmnopqrstuvwxyz\r\n");
WiredHome 5:bb970d40cd7d 34 lcd.SelectUserFont();
WiredHome 5:bb970d40cd7d 35 lcd.puts("Back to normal\r\n");
WiredHome 5:bb970d40cd7d 36 lcd.SelectUserFont(BPG_Arial08x08);
WiredHome 5:bb970d40cd7d 37 lcd.puts("BPG_Arial08x08 ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
WiredHome 11:2fcc3ee75ebd 38 lcd.puts("BPG_Arial08x08 abcdefghijklmnopqrstuvwxyz\r\n");
WiredHome 11:2fcc3ee75ebd 39 wait(3);
WiredHome 11:2fcc3ee75ebd 40
WiredHome 5:bb970d40cd7d 41 lcd.SelectUserFont(BPG_Arial10x10);
WiredHome 5:bb970d40cd7d 42 lcd.puts("BPG_Arial10x10 ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
WiredHome 5:bb970d40cd7d 43 lcd.puts("BPG_Arial10x10 abcdefghijklmnopqrstuvwxyz\r\n");
WiredHome 11:2fcc3ee75ebd 44 wait(3);
WiredHome 11:2fcc3ee75ebd 45
WiredHome 5:bb970d40cd7d 46 lcd.SelectUserFont(BPG_Arial20x20);
WiredHome 11:2fcc3ee75ebd 47 lcd.puts("BPG_Arial20x20 ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
WiredHome 11:2fcc3ee75ebd 48
WiredHome 11:2fcc3ee75ebd 49 wait(3);
WiredHome 5:bb970d40cd7d 50 lcd.SelectUserFont(BPG_Arial31x32);
WiredHome 11:2fcc3ee75ebd 51 lcd.puts("BPG_Arial31x32 ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
WiredHome 11:2fcc3ee75ebd 52
WiredHome 11:2fcc3ee75ebd 53 wait(3);
WiredHome 5:bb970d40cd7d 54 lcd.SelectUserFont(BPG_Arial63x63);
WiredHome 11:2fcc3ee75ebd 55 lcd.puts("BPG_Arial63x63 ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
WiredHome 5:bb970d40cd7d 56
WiredHome 11:2fcc3ee75ebd 57 wait(6);
WiredHome 11:2fcc3ee75ebd 58 lcd.cls();
WiredHome 11:2fcc3ee75ebd 59 lcd.SelectUserFont(BPG_Arial31x32);
WiredHome 11:2fcc3ee75ebd 60 lcd.puts("BPG_Arial31x32 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 0123456789\r\n");
WiredHome 11:2fcc3ee75ebd 61 lcd.puts("BPG_Arial31x32 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
WiredHome 11:2fcc3ee75ebd 62
WiredHome 11:2fcc3ee75ebd 63 //RetCode_t r = lcd.PrintScreen(0,0,480,272,"/local/file.bmp");
WiredHome 11:2fcc3ee75ebd 64 //pc.printf(" PrintScreen returned %d\r\n", r);
WiredHome 3:ca6a1026c28e 65
WiredHome 3:ca6a1026c28e 66 while(1) {
WiredHome 5:bb970d40cd7d 67 ; // end
WiredHome 3:ca6a1026c28e 68 }
WiredHome 0:037b95a5cc85 69 }