wifisp1

Revision:
0:5339903aacbc
Child:
1:227c9c991c1b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wifiesp8266.h	Sun May 23 13:26:59 2021 +0000
@@ -0,0 +1,22 @@
+#ifndef _WifiEsp8266_
+#define _WifiEsp8266_
+// taille maximum d'une phrase recue
+#define maxdata 20
+#define Baud 921600
+class WifiEsp8266 : public RawSerial
+{
+public:
+ //   WifiEsp8266(PinName Txd, PinName Rxd, PinName En);
+    WifiEsp8266(PinName Txd, PinName Rxd,PinName En);    
+    void receive();  //recoit les data gps et les stocks puis produit les donnees en cas de reception
+    bool dataready(void);
+    char * read(void);
+private:
+// reception phrase Serial
+    char _DataTmp[maxdata + 1]; // tableau de donnees pour stocker pendant reception
+    char _Data[maxdata + 1]; // tableau de donnees lorsque toutes les donnees sont recues
+    int _DataPtr = 0; // position de stockage de la prochaine donnee a recevoir
+    bool _DataReady = false;
+    DigitalOut  _En;
+};
+#endif
\ No newline at end of file