Alexandre Lemay / Mbed 2 deprecated APP1_s5_A17

Dependencies:   mbed MMA8452

Revision:
8:5124be43c963
Parent:
6:909e7877d915
Parent:
7:b1b4db3eedb4
Child:
9:b9ac1d914762
--- a/Afficheur.cpp	Tue Sep 05 05:51:17 2017 +0000
+++ b/Afficheur.cpp	Tue Sep 05 10:00:13 2017 +0000
@@ -1,18 +1,23 @@
 
 
 #include "Afficheur.h"
-
+#ifdef USESPI
     Afficheur::Afficheur():afficheur(p5,p6,p7),chipSelect(p8)
     {
         afficheur.format(8,0);
         afficheur.frequency(50000);
         chipSelect = 0;
     }
-    
-    void Afficheur::write(char* characters,int length,int expo ) 
+#else
+    Afficheur::Afficheur():afficheur(),chipSelect(p8)
+    {
+        chipSelect = 1;
+    }
+#endif
+    void Afficheur::write(char* characters,int length ) 
     {
         
-Serial pc(USBTX, USBRX);
+        Serial pc(USBTX, USBRX);
         pc.printf("1");
         static char buf[20];
         pc.printf("2");
@@ -24,7 +29,7 @@
     }
     void Afficheur::write(char ch)
     {
-        static char buf[1];
+        char buf[1];
         afficheur.write(&ch,1,buf,1);
     }
     void Afficheur::resetDisplay()