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.
Dependencies: IAP NTPClient RTC mbed-rtos mbed Socket lwip-sys lwip BurstSPI
Fork of LPC1768_Mini-DK by
Diff: main.cpp
- Revision:
- 1:557df792279c
- Parent:
- 0:ee7076d8260a
- Child:
- 2:d0acbd263ec7
diff -r ee7076d8260a -r 557df792279c main.cpp
--- 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);
