Loading JPG to FT800 screen

Dependencies:   FT800 mbed

Test program to load a JPG to a FT800 controlled lcd screen. First the graphics data have to be load to the FT800 buffer. The FT800 will decode the JPG data into a bitmap. In the second step this bitmap will displayed on the LCD.

Files at this revision

API Documentation at this revision

Comitter:
dreschpe
Date:
Mon Feb 09 20:46:41 2015 +0000
Parent:
0:a6545392ca42
Commit message:
Add some doku

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r a6545392ca42 -r c603024cbd1d main.cpp
--- a/main.cpp	Wed Jan 28 23:36:29 2015 +0000
+++ b/main.cpp	Mon Feb 09 20:46:41 2015 +0000
@@ -14,6 +14,7 @@
 
 
 /* function to load jpg file from internal filesystem */
+/* into FT800 buffer and decode JPG to bitmap         */        
 /* return 0 if jpg is ok                              */
 /* return x_size and y_size of jpg                    */
 
@@ -82,13 +83,13 @@
     TFT.Ft_App_WrCoCmd_Buffer(COLOR_RGB(255,255,255));         // set current color
 
 
-    err = load_jpg("/local/ARML2.jpg",& x_size,& y_size);
-    if(err != 0) {
+    err = load_jpg("/local/ARML2.jpg",& x_size,& y_size);      // load graphic data into buffer and decode jpg to bitmap
+    if(err != 0) {                                           // something is wrong - display error   
         TFT.Ft_App_WrCoCmd_Buffer(COLOR_RGB(0,0,0));         // set current color
         TFT.Ft_Gpu_CoCmd_Text((TFT.FT_DispWidth/2), TFT.FT_DispHeight/2, 25, OPT_CENTERX, "Error"); // draw Text with font 31
         TFT.Ft_Gpu_CoCmd_Number(50,50,25,OPT_SIGNED,err);
 
-    } else {
+    } else {   // jpg is loaded and decoded into bitmap
 
         TFT.Ft_App_WrCoCmd_Buffer(BEGIN(BITMAPS));
         TFT.Ft_Gpu_CoCmd_LoadIdentity();
@@ -121,8 +122,6 @@
     TFT.Ft_Gpu_Hal_WaitCmdfifo_empty();                                     // Wait till coprocessor completes the operation
 
 
-
-
 }