wifisp1
Revision 1:227c9c991c1b, committed 2021-06-06
- Comitter:
- schnf30
- Date:
- Sun Jun 06 12:19:53 2021 +0000
- Parent:
- 0:5339903aacbc
- Commit message:
- a
Changed in this revision
wifiesp8266.cpp | Show annotated file Show diff for this revision Revisions of this file |
wifiesp8266.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 5339903aacbc -r 227c9c991c1b wifiesp8266.cpp --- a/wifiesp8266.cpp Sun May 23 13:26:59 2021 +0000 +++ b/wifiesp8266.cpp Sun Jun 06 12:19:53 2021 +0000 @@ -1,20 +1,10 @@ #include "mbed.h" #include "wifiesp8266.h" - -/*WifiEsp8266::WifiEsp8266(PinName Txd, PinName Rxd) : RawSerial(Txd,Rxd) +WifiEsp8266::WifiEsp8266(PinName Txd, PinName Rxd) : RawSerial(Txd,Rxd) { baud(Baud); _DataPtr = 0; _DataReady = false; - // attach(this,&WifiEsp8266::receive, RawSerial::RxIrq); -}*/ - -WifiEsp8266::WifiEsp8266(PinName Txd, PinName Rxd, PinName En) : RawSerial(Txd,Rxd), _En(En) -{ - baud(Baud); - _En = 1; - _DataPtr = 0; - _DataReady = false; attach(this,&WifiEsp8266::receive, RawSerial::RxIrq); } char * WifiEsp8266::read(void)
diff -r 5339903aacbc -r 227c9c991c1b wifiesp8266.h --- a/wifiesp8266.h Sun May 23 13:26:59 2021 +0000 +++ b/wifiesp8266.h Sun Jun 06 12:19:53 2021 +0000 @@ -1,13 +1,12 @@ #ifndef _WifiEsp8266_ #define _WifiEsp8266_ // taille maximum d'une phrase recue -#define maxdata 20 +#define maxdata 100 #define Baud 921600 class WifiEsp8266 : public RawSerial { public: - // WifiEsp8266(PinName Txd, PinName Rxd, PinName En); - WifiEsp8266(PinName Txd, PinName Rxd,PinName En); + WifiEsp8266(PinName Txd, PinName Rxd); void receive(); //recoit les data gps et les stocks puis produit les donnees en cas de reception bool dataready(void); char * read(void); @@ -17,6 +16,5 @@ 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