Version 6.0. Animaiton demo.

Dependents:   MIP8f_FRDM_Animation_sample

MIP8F_SPI_Ver6.0

Ver6.0 Addtional function is animation code sample.

Revision:
1:2b85e7edcc4e
Parent:
0:b2d46804658c
Child:
2:944f2968c19f
--- a/MIP8F_SPI.cpp	Mon Oct 22 04:21:43 2018 +0000
+++ b/MIP8F_SPI.cpp	Wed Oct 24 02:23:30 2018 +0000
@@ -84,28 +84,48 @@
     char_y = y;
 }
 /**
-* @brief  dispay character by font 
+* @brief  dispay character by font. int mode:: =0 :common font(defualt), =1 : big font
+* big font is that "char data" byte size is over 0xff.
+* 
 */
-void memLCD8::character(int x, int y, int c)
+void memLCD8::character(int x, int y, int c,int mode)
 {
     unsigned int hor,vert,offset0,offset1,bpl,j,i,b; // T.Okamoto modified, for big font
     unsigned char* zeichen;
     unsigned char z,w;
 //    int index;
-    if ((c < 31) || (c > 127)) return;   // test char range
+
+    if( mode == 0 ){
+        //for common font
+        if ((c < 31) || (c > 127)) return;   // test char range
+        offset0 = font[0];       // bytes / char
+        hor = font[1];                       // get hor size of font
+        vert = font[2];                      // get vert size of font
+        bpl = font[3];                       // bytes per line
 
-    offset0 = font[0];       // bytes / char
-    offset1 = font[1];       // bytes / char
-    hor = font[2];                       // get hor size of font
-    vert = font[3];                      // get vert size of font
-    bpl = font[4];                       // bytes per line
+        if (char_x + hor > _width) {
+            char_x = 0;
+            char_y = char_y + vert;
+            if (char_y >= _height - font[2]) char_y = 0; // original =  font[2]  T.Okamoto modified, for big font
+        }
+        zeichen = &font[(c -32) * (offset0) + 4]; // start of char bitmap // original =  +4  T.Okamoto modified, for big font
+    }else{
+        // for big font
+        if ((c < 31) || (c > 127)) return;   // test char range
+        offset0 = font[0];       // bytes / char
+        offset1 = font[1];       // bytes / char
+        hor = font[2];                       // get hor size of font
+        vert = font[3];                      // get vert size of font
+        bpl = font[4];                       // bytes per line
 
-    if (char_x + hor > _width) {
-        char_x = 0;
-        char_y = char_y + vert;
-        if (char_y >= _height - font[3]) char_y = 0; // original =  font[2]  T.Okamoto modified, for big font
+        if (char_x + hor > _width) {
+            char_x = 0;
+            char_y = char_y + vert;
+            if (char_y >= _height - font[3]) char_y = 0; // original =  font[2]  T.Okamoto modified, for big font
+        }
+        zeichen = &font[(c -32) * (offset0 *256 + offset1) + 5]; // start of char bitmap // original =  +4  T.Okamoto modified, for big font
     }
-    zeichen = &font[(c -32) * (offset0 *256 + offset1) + 5]; // start of char bitmap // original =  +4  T.Okamoto modified, for big font
+    
     w = zeichen[0];                          // width of actual char
     for (j=0; j<vert; j++) {  //  vert line
         for (i=0; i<hor; i++) {   //  horz line