LPC1768 Mini-DK board with 2.8" SPI TFT and SPI touch

Dependencies:   Mini-DK mbed SDFileSystem

WARNING: filetoflash (SD to CPU flash)

The SPI_TFT library called from Mini-DK.lib contains an option to copy an image from the SD card to the CPU flash memory. This allows you to use an image as background without speed loss when writing other text and graphics.

By default, this option is enabled.

It can be disabled by uncommenting the #define mentioned below in Mini_DK.h:

#define NO_FLASH_BUFFER

Since the flash memory has limited write endurance, DO NOT use this feature when you intend to read multiple images from the SD card (eg: when used as a photo frame).

Revision:
1:557df792279c
Parent:
0:ee7076d8260a
Child:
2:d0acbd263ec7
--- a/main.cpp	Tue Dec 11 08:58:06 2012 +0000
+++ b/main.cpp	Wed Dec 12 12:42:22 2012 +0000
@@ -60,10 +60,10 @@
     TFT.locate(120,115);
     TFT.printf("Graphic");
     TFT.line(0,0,100,200,Green);
-    TFT.rect(100,50,150,100,Red);
-    TFT.fillrect(180,25,220,70,Blue);
-    TFT.circle(80,150,33,White);
-    TFT.fillcircle(80,50,33,White);
+    TFT.rect(100,50,50,50,Red);
+    TFT.fillrect(180,25,40,45,Blue);
+    TFT.draw_ellipse(80, 150, 33, 33, White);
+    TFT.fill_ellipse(80, 50, 33, 33, White);
 
     wait(2);
 
@@ -114,12 +114,12 @@
     uint8_t r = 255, g = 0,  b = 0, step = 5, i;
     for (i=0;i<5;i++)
     {
-        for(;g<255;g+=step) {TFT.fillrect(70,110,170,210,RGB565CONVERT(r, g, b));}      // Cycle from FF0000 to FFFF00 : red to yellow
-        for(;r>0;r-=step)   {TFT.fillrect(70,110,170,210,RGB565CONVERT(r, g, b));}      // Cycle from FFFF00 to 00FF00 : yellow to green
-        for(;b<255;b+=step) {TFT.fillrect(70,110,170,210,RGB565CONVERT(r, g, b));}      // Cycle from 00FF00 to 00FFFF : green to cyan
-        for(;g>0;g-=step)   {TFT.fillrect(70,110,170,210,RGB565CONVERT(r, g, b));}      // Cycle from 00FFFF to 0000FF : cyan to blue
-        for(;r<255;r+=step) {TFT.fillrect(70,110,170,210,RGB565CONVERT(r, g, b));}      // Cycle from 0000FF to FF00FF : blue to purple
-        for(;b>0;b-=step)   {TFT.fillrect(70,110,170,210,RGB565CONVERT(r, g, b));}      // Cycle from FF00FF to FF0000 : purple to red
+       for(;g<255;g+=step) {TFT.fillrect(70,110,100,100,RGB565CONVERT(r, g, b));}      // Cycle from FF0000 to FFFF00 : red to yellow
+        for(;r>0;r-=step)   {TFT.fillrect(70,110,100,100,RGB565CONVERT(r, g, b));}      // Cycle from FFFF00 to 00FF00 : yellow to green
+        for(;b<255;b+=step) {TFT.fillrect(70,110,100,100,RGB565CONVERT(r, g, b));}      // Cycle from 00FF00 to 00FFFF : green to cyan
+        for(;g>0;g-=step)   {TFT.fillrect(70,110,100,100,RGB565CONVERT(r, g, b));}      // Cycle from 00FFFF to 0000FF : cyan to blue
+        for(;r<255;r+=step) {TFT.fillrect(70,110,100,100,RGB565CONVERT(r, g, b));}      // Cycle from 0000FF to FF00FF : blue to purple
+        for(;b>0;b-=step)   {TFT.fillrect(70,110,100,100,RGB565CONVERT(r, g, b));}      // Cycle from FF00FF to FF0000 : purple to red
     }
     wait(2);
 
@@ -143,7 +143,7 @@
             {
                 TFT.getDisplayPoint(&display, &screen, &matrix ) ;
                 TFT.TP_DrawPoint(display.x,display.y, Blue);
-//                TFT.rect(display.x,display.y,display.x+1,display.y+1,Red);
+//                TFT.rect(display.x,display.y,1,1,Red);
                 TFT.locate(25,0);
                 printf("%03d",display.x);
                 TFT.locate(95,0);