Kerry Martin
/
Liz_Test_Code
KSM edits
Diff: main.cpp
- Revision:
- 15:ab07c064c952
- Parent:
- 14:07b3f223d9ba
- Child:
- 16:231837aa2c37
--- a/main.cpp Tue May 03 10:52:01 2016 +0000 +++ b/main.cpp Sat Aug 06 14:50:48 2016 +0000 @@ -1,6 +1,6 @@ -#include "mbed.h" // v115 -#include "RA8875.h" // v107 +#include "mbed.h" // v122 +#include "RA8875.h" // v125 #include "MyFont18x32.h" #include "BPG_Arial08x08.h" #include "BPG_Arial10x10.h" @@ -8,20 +8,38 @@ #include "BPG_Arial31x32.h" #include "BPG_Arial63x63.h" -LocalFileSystem local("local"); // Because I want <PrintScreen> +// These two defines can be enabled, or commented out +//#define BIG_SCREEN +//#define CAP_TOUCH +#define LCD_C 16 // color - bits per pixel + +#ifdef CAP_TOUCH +RA8875 lcd(p5, p6, p7, p12, NC, p9,p10,p13, "tft"); // MOSI,MISO,SCK,/ChipSelect,/reset, SDA,SCL,/IRQ, name +#else +RA8875 lcd(p5, p6, p7, p12, NC, "tft"); //MOSI, MISO, SCK, /ChipSelect, /reset, name +LocalFileSystem local("local"); // access to calibration file for resistive touch. +#endif + +#ifdef BIG_SCREEN + #define LCD_W 800 + #define LCD_H 480 +#else + #define LCD_W 480 + #define LCD_H 272 +#endif + Serial pc(USBTX, USBRX); // And a little feedback Timer measurement; 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"); measurement.start(); - lcd.init(480,272,8); - + lcd.init(LCD_W, LCD_H, LCD_C); + lcd.Backlight(0.5f); + // ************************** //RunTestSet(lcd, pc); // If the library was compiled for test mode...