Engravity-CDU / 4DGL

Dependents:   CDUFinal CDU_Mbed_21 CDU_Mbed_26 CDU_Mbed_30

Fork of 4DGL by Adam Green

Revision:
1:ebc67b51c225
Parent:
0:d6e186427f3e
--- a/TFT_4DGL_Graphics.cpp	Tue Jul 05 11:45:02 2011 +0000
+++ b/TFT_4DGL_Graphics.cpp	Thu Jun 26 11:28:11 2014 +0000
@@ -164,6 +164,25 @@
     writeCOMMAND(command, 11);
 }
 
+
+//****************************************************************************************************
+//Get and display a picture from SD
+void TFT_4DGL :: showpicture( int x_lo, int x_hi, int y_lo, int y_hi, int SectorAdd_hi, int SectorAdd_mid, int SectorAdd_lo ){
+    char command[9]= "";
+
+    command[0] = 0x40;  // "@" Extended command header byte
+    command[1] = 0x49;  // "I" Command header byte
+    command[2] = x_lo;     // position on screen, here 0,0
+    command[3] = x_hi;
+    command[4] = y_lo;
+    command[5] = y_hi;
+    command[6] = SectorAdd_hi;
+    command[7] = SectorAdd_mid;
+    command[8] = SectorAdd_lo;
+    
+    writeCOMMAND(command, 9);
+    
+}
 //****************************************************************************************************
 void TFT_4DGL :: pixel(int x, int y, int color) {   // draw a pixel
     char command[7]= "";