Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- WiredHome
- Date:
- 2016-01-23
- Revision:
- 11:2fcc3ee75ebd
- Parent:
- 6:8e392d0ff74a
File content as of revision 11:2fcc3ee75ebd:
#include "mbed.h" // v112
#include "RA8875.h" // v102
#include "MyFont18x32.h"
#include "BPG_Arial08x08.h"
#include "BPG_Arial10x10.h"
#include "BPG_Arial20x20.h"
#include "BPG_Arial31x32.h"
#include "BPG_Arial63x63.h"
LocalFileSystem local("local"); // Because I want <PrintScreen>
Serial pc(USBTX, USBRX); // And a little feedback
int main()
{
RA8875 lcd(p5, p6, p7, p12, NC, "tft"); // MOSI, MISO, SCK, /ChipSelect, /reset, name
pc.baud(460800); // I like a snappy terminal, so crank it up!
pc.printf("\r\nRA8875 Soft Fonts - Build " __DATE__ " " __TIME__ "\r\n");
lcd.init();
// **************************
//RunTestSet(lcd, pc);
lcd.foreground(BrightBlue);
lcd.puts(0,0, "RA8875 Soft Fonts - Build " __DATE__ " " __TIME__ "\r\n");
lcd.SelectUserFont(Dave_Smart18x32);
lcd.puts("**** ! Soft Fonts ! **** 0123456789\r\n");
lcd.puts("ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
lcd.puts("abcdefghijklmnopqrstuvwxyz\r\n");
lcd.SelectUserFont();
lcd.puts("Back to normal\r\n");
lcd.SelectUserFont(BPG_Arial08x08);
lcd.puts("BPG_Arial08x08 ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
lcd.puts("BPG_Arial08x08 abcdefghijklmnopqrstuvwxyz\r\n");
wait(3);
lcd.SelectUserFont(BPG_Arial10x10);
lcd.puts("BPG_Arial10x10 ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
lcd.puts("BPG_Arial10x10 abcdefghijklmnopqrstuvwxyz\r\n");
wait(3);
lcd.SelectUserFont(BPG_Arial20x20);
lcd.puts("BPG_Arial20x20 ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
wait(3);
lcd.SelectUserFont(BPG_Arial31x32);
lcd.puts("BPG_Arial31x32 ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
wait(3);
lcd.SelectUserFont(BPG_Arial63x63);
lcd.puts("BPG_Arial63x63 ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
wait(6);
lcd.cls();
lcd.SelectUserFont(BPG_Arial31x32);
lcd.puts("BPG_Arial31x32 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 0123456789\r\n");
lcd.puts("BPG_Arial31x32 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n");
//RetCode_t r = lcd.PrintScreen(0,0,480,272,"/local/file.bmp");
//pc.printf(" PrintScreen returned %d\r\n", r);
while(1) {
; // end
}
}