Lib for the new LCD Display with ILI9341 controller Modified for huge fonts (>255 bytes/char). Needs modified font.h files with 2-byte size parameter. Window size is set on a per-character basis to minimise the number of pixels written (speed-up, plus better detection of whether one last character will fit on the current line). NUCLEO & NXP DMA-enabled versions are modified but untested.

Dependents:   Mandelbrot

Fork of SPI_TFT_ILI9341 by Peter Drescher

Revision:
17:8794e2eadd8d
Parent:
16:51b40ebe3280
diff -r 51b40ebe3280 -r 8794e2eadd8d SPI_TFT_ILI9341.cpp
--- a/SPI_TFT_ILI9341.cpp	Mon Dec 08 10:03:05 2014 +0000
+++ b/SPI_TFT_ILI9341.cpp	Mon Dec 08 13:20:28 2014 +0000
@@ -620,20 +620,20 @@
     w=zeichen[0];
     
     //check whether there are sufficient pixels to render character
-    if (char_x + w+2 > width()) { //was hor, now w+2 -> enables squeezing extra char at end of line)
+    if (char_x + (w+2) > width()) { //was hor, now w+2 -> enables squeezing extra char at end of line)
         char_x = 0;
         char_y = char_y + vert;
         if (char_y >= height() - vert) {
             char_y = 0;
         }
     }
-    window(char_x, char_y,w+2,vert); // was hor, now w+2 -> char box shrunk to smallest size we need (speedup)
+    window(char_x, char_y,(w+2),vert); // was hor, now w+2 -> char box shrunk to smallest size we need (speedup)
     wr_cmd(0x2C);  // send pixel
     #ifndef TARGET_KL25Z  // 16 Bit SPI 
     SPI::format(16,3);   
     #endif                         // switch to 16 bit Mode 3
      for (j=0; j<vert; j++) {  //  vert line
-        for (i=0; i<w+2; i++) {  //w+2 was hor, send just enough pixel data to fill window  //  horz line
+        for (i=0; i<(w+2); i++) {  //w+2 was hor, send just enough pixel data to fill window  //  horz line
             z =  zeichen[bpl * i + ((j & 0xF8) >> 3)+1];
             b = 1 << (j & 0x07);
             if (( z & b ) == 0x00) {