NucleoF446 re + SSD1331 simple Library

Dependents:   Nucleo_446 Nucleo446_SSD1331

Revision:
1:85198abc3103
Parent:
0:9442efe129e7
--- a/ssd1331.cpp	Thu Oct 11 01:58:04 2018 +0000
+++ b/ssd1331.cpp	Thu Oct 11 04:10:23 2018 +0000
@@ -31,16 +31,7 @@
     _dc =1;
     _rst =0;
     
-    FntList[7].pFnt=(GFXfont *)0;
-    FntList[6].pFnt=(GFXfont *)0;
-    FntList[5].pFnt=(GFXfont *)0;
-    FntList[4].pFnt=(GFXfont *)0;
-    FntList[3].pFnt=(GFXfont *)0;
-    FntList[2].pFnt=(GFXfont *)0;
-    FntList[1].pFnt=(GFXfont *)0;
-
-    FntList[0].pFnt=(GFXfont *)&FreeMonoBold9pt7b;
-    strcpy(FntList[0].FontName,"MonoBold9pt7b\0");
+    SetFontInf();
 }
 
 
@@ -268,5 +259,45 @@
             j=j+k;
         }
     }
-    return 0;
+//    return 0;
+}
+
+void ssd1331::GetFontInfo(int FontNo, FontList  *FntLst){
+    FntLst->pFnt =FntList[FontNo].pFnt; 
+
+    for(int i=0;i<16;i++){
+        FntLst->FontName[i] = FntList[FontNo].FontName[i];
+    }
+
+//    strcpy(FntList->FontName,FntList[0].FontName);
+
+}
+int ssd1331::GetFontNum(void){
+    return FontNum;
 }
+
+int ssd1331::SetFontInf()
+{
+    FntList[7].pFnt=(GFXfont *)0;
+    FntList[6].pFnt=(GFXfont *)0;
+    FntList[5].pFnt=(GFXfont *)0;
+    FntList[4].pFnt=(GFXfont *)0;
+    FntList[3].pFnt=(GFXfont *)0;
+    FntList[2].pFnt=(GFXfont *)0;
+    FntList[1].pFnt=(GFXfont *)0;
+    FntList[0].pFnt=(GFXfont *)0;
+
+    FntList[3].pFnt=(GFXfont *)&TomThumb;
+    strcpy(FntList[3].FontName,"TomThumb\0");
+
+    FntList[2].pFnt=(GFXfont *)&FreeSerif9pt7b;
+    strcpy(FntList[2].FontName,"Serif9pt7b\0");
+
+    FntList[1].pFnt=(GFXfont *)&FreeSans9pt7b;
+    strcpy(FntList[1].FontName,"Sans9pt7b\0");
+
+    FntList[0].pFnt=(GFXfont *)&FreeMonoBold9pt7b;
+    strcpy(FntList[0].FontName,"MonoBold9pt7b\0");
+
+    return 5;
+}