Alexandre Lemay / Mbed 2 deprecated APP1_s5_A17

Dependencies:   mbed MMA8452

Revision:
7:b1b4db3eedb4
Parent:
2:3576839565ae
Child:
8:5124be43c963
--- a/Afficheur.h	Tue Sep 05 00:05:38 2017 +0000
+++ b/Afficheur.h	Tue Sep 05 09:50:38 2017 +0000
@@ -1,9 +1,14 @@
+#ifndef AFFICHEUR_H
+#define AFFICHEUR_H
+
+
 #include "mbed.h"
 
-#define USESPI
+#include "CommUART.h"
 
 class Afficheur
 {
+    typedef CommUART3 CommInterface;
 public:
     Afficheur();
     
@@ -14,11 +19,8 @@
     void hideDot();
     
     private:
-    #ifdef USESPI
-    SPI afficheur;
-    #endif
-    #ifdef USEUART
-    UARTAfficheur afficheur;
-    #endif
+    CommInterface afficheur;
     DigitalOut chipSelect;
-};
\ No newline at end of file
+};
+
+#endif
\ No newline at end of file