working lib with k64f

Dependents:   weather

Fork of SPI_TFT_ILI9341 by Peter Drescher

Revision:
14:508bce6cfeb5
Parent:
13:b2b3e5430f81
--- a/SPI_TFT_ILI9341.cpp	Wed Jun 25 16:51:27 2014 +0000
+++ b/SPI_TFT_ILI9341.cpp	Fri Mar 20 14:16:36 2015 +0000
@@ -318,7 +318,7 @@
     SPI::write(y);
     _cs = 1;
     wr_cmd(0x2C);  // send pixel
-    #if defined TARGET_KL25Z  // 8 Bit SPI
+    #if defined TARGET_K64F  // 8 Bit SPI
     SPI::write(color >> 8);
     SPI::write(color & 0xff);
     #else 
@@ -403,7 +403,7 @@
     w = x1 - x0 + 1;
     window(x0,y,w,1);
     wr_cmd(0x2C);  // send pixel
-    #if defined TARGET_KL25Z  // 8 Bit SPI
+    #if defined TARGET_K64F  // 8 Bit SPI
     int j;
     for (j=0; j<w; j++) {
         SPI::write(color >> 8);
@@ -428,7 +428,7 @@
     h = y1 - y0 + 1;
     window(x,y0,1,h);
     wr_cmd(0x2C);  // send pixel
-    #if defined TARGET_KL25Z  // 8 Bit SPI
+    #if defined TARGET_K64F  // 8 Bit SPI
     for (int y=0; y<h; y++) {
         SPI::write(color >> 8);
         SPI::write(color & 0xff);
@@ -547,7 +547,7 @@
     int pixel = h * w;
     window(x0,y0,w,h);
     wr_cmd(0x2C);  // send pixel 
-    #if defined TARGET_KL25Z  // 8 Bit SPI
+    #if defined TARGET_K64F  // 8 Bit SPI
     for (int p=0; p<pixel; p++) {
         SPI::write(color >> 8);
         SPI::write(color & 0xff);
@@ -625,7 +625,7 @@
     }
     window(char_x, char_y,hor,vert); // char box
     wr_cmd(0x2C);  // send pixel
-    #ifndef TARGET_KL25Z  // 16 Bit SPI 
+    #ifndef TARGET_K64F  // 16 Bit SPI 
     SPI::format(16,3);   
     #endif                         // switch to 16 bit Mode 3
     zeichen = &font[((c -32) * offset) + 4]; // start of char bitmap
@@ -635,14 +635,14 @@
             z =  zeichen[bpl * i + ((j & 0xF8) >> 3)+1];
             b = 1 << (j & 0x07);
             if (( z & b ) == 0x00) {
-               #ifndef TARGET_KL25Z  // 16 Bit SPI 
+               #ifndef TARGET_K64F  // 16 Bit SPI 
                 SPI::write(_background);
                #else
                 SPI::write(_background >> 8);
                 SPI::write(_background & 0xff);
                 #endif
             } else {
-                #ifndef TARGET_KL25Z  // 16 Bit SPI
+                #ifndef TARGET_K64F  // 16 Bit SPI
                 SPI::write(_foreground);
                 #else
                 SPI::write(_foreground >> 8);
@@ -652,7 +652,7 @@
         }
     }
     _cs = 1;
-    #ifndef TARGET_KL25Z  // 16 Bit SPI
+    #ifndef TARGET_K64F  // 16 Bit SPI
     SPI::format(8,3);
     #endif
     WindowMax();
@@ -674,7 +674,7 @@
     unsigned int  j;
     int padd;
     unsigned short *bitmap_ptr = (unsigned short *)bitmap;
-    #if defined TARGET_KL25Z  // 8 Bit SPI
+    #if defined TARGET_K64F  // 8 Bit SPI
         unsigned short pix_temp;
     #endif
     
@@ -688,12 +688,12 @@
     window(x, y, w, h);
     bitmap_ptr += ((h - 1)* (w + padd));
     wr_cmd(0x2C);  // send pixel
-    #ifndef TARGET_KL25Z  // 16 Bit SPI 
+    #ifndef TARGET_K64F  // 16 Bit SPI 
     SPI::format(16,3);
     #endif                            // switch to 16 bit Mode 3
     for (j = 0; j < h; j++) {         //Lines
         for (i = 0; i < w; i++) {     // one line
-            #if defined TARGET_KL25Z  // 8 Bit SPI
+            #if defined TARGET_K64F  // 8 Bit SPI
                 pix_temp = *bitmap_ptr;
                 SPI::write(pix_temp >> 8);
                 SPI::write(pix_temp);
@@ -707,7 +707,7 @@
         bitmap_ptr -= padd;
     }
     _cs = 1;
-    #ifndef TARGET_KL25Z  // 16 Bit SPI 
+    #ifndef TARGET_K64F  // 16 Bit SPI 
     SPI::format(8,3);
     #endif
     WindowMax();
@@ -780,7 +780,7 @@
 
     window(x, y,PixelWidth ,PixelHeigh);
     wr_cmd(0x2C);  // send pixel
-    #ifndef TARGET_KL25Z // only 8 Bit SPI 
+    #ifndef TARGET_K64F // only 8 Bit SPI 
     SPI::format(16,3);  
     #endif                          // switch to 16 bit Mode 3
     for (j = PixelHeigh - 1; j >= 0; j--) {               //Lines bottom up
@@ -788,7 +788,7 @@
         fseek(Image, off ,SEEK_SET);
         fread(line,1,PixelWidth * 2,Image);       // read a line - slow 
         for (i = 0; i < PixelWidth; i++) {        // copy pixel data to TFT
-        #ifndef TARGET_KL25Z // only 8 Bit SPI
+        #ifndef TARGET_K64F // only 8 Bit SPI
             SPI::write(line[i]);                  // one 16 bit pixel
         #else  
             SPI::write(line[i] >> 8);