Alexandre Lemay / Mbed 2 deprecated APP1_s5_A17

Dependencies:   mbed MMA8452

Revision:
7:b1b4db3eedb4
Parent:
2:3576839565ae
Child:
8:5124be43c963
--- a/Afficheur.cpp	Tue Sep 05 00:05:38 2017 +0000
+++ b/Afficheur.cpp	Tue Sep 05 09:50:38 2017 +0000
@@ -1,23 +1,28 @@
 
 
 #include "Afficheur.h"
-
+#ifdef USESPI
     Afficheur::Afficheur():afficheur(p5,p6,p7),chipSelect(p8)
     {
         afficheur.format(8,0);
         afficheur.frequency(50000);
         chipSelect = 0;
     }
-    
+#else
+    Afficheur::Afficheur():afficheur(),chipSelect(p8)
+    {
+        chipSelect = 1;
+    }
+#endif
     void Afficheur::write(char* characters,int length ) 
     {
-        static char buf[20];
-        resetDisplay();
+        char buf[20];
+        //resetDisplay();
         afficheur.write(characters,length,buf,20);      
     }
     void Afficheur::write(char ch)
     {
-        static char buf[1];
+        char buf[1];
         afficheur.write(&ch,1,buf,1);
     }
     void Afficheur::resetDisplay()