wifisp1
wifiesp8266.h@0:5339903aacbc, 2021-05-23 (annotated)
- Committer:
- schnf30
- Date:
- Sun May 23 13:26:59 2021 +0000
- Revision:
- 0:5339903aacbc
- Child:
- 1:227c9c991c1b
Wifi esp8266 - esp10 module prog. SF
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
schnf30 | 0:5339903aacbc | 1 | #ifndef _WifiEsp8266_ |
schnf30 | 0:5339903aacbc | 2 | #define _WifiEsp8266_ |
schnf30 | 0:5339903aacbc | 3 | // taille maximum d'une phrase recue |
schnf30 | 0:5339903aacbc | 4 | #define maxdata 20 |
schnf30 | 0:5339903aacbc | 5 | #define Baud 921600 |
schnf30 | 0:5339903aacbc | 6 | class WifiEsp8266 : public RawSerial |
schnf30 | 0:5339903aacbc | 7 | { |
schnf30 | 0:5339903aacbc | 8 | public: |
schnf30 | 0:5339903aacbc | 9 | // WifiEsp8266(PinName Txd, PinName Rxd, PinName En); |
schnf30 | 0:5339903aacbc | 10 | WifiEsp8266(PinName Txd, PinName Rxd,PinName En); |
schnf30 | 0:5339903aacbc | 11 | void receive(); //recoit les data gps et les stocks puis produit les donnees en cas de reception |
schnf30 | 0:5339903aacbc | 12 | bool dataready(void); |
schnf30 | 0:5339903aacbc | 13 | char * read(void); |
schnf30 | 0:5339903aacbc | 14 | private: |
schnf30 | 0:5339903aacbc | 15 | // reception phrase Serial |
schnf30 | 0:5339903aacbc | 16 | char _DataTmp[maxdata + 1]; // tableau de donnees pour stocker pendant reception |
schnf30 | 0:5339903aacbc | 17 | char _Data[maxdata + 1]; // tableau de donnees lorsque toutes les donnees sont recues |
schnf30 | 0:5339903aacbc | 18 | int _DataPtr = 0; // position de stockage de la prochaine donnee a recevoir |
schnf30 | 0:5339903aacbc | 19 | bool _DataReady = false; |
schnf30 | 0:5339903aacbc | 20 | DigitalOut _En; |
schnf30 | 0:5339903aacbc | 21 | }; |
schnf30 | 0:5339903aacbc | 22 | #endif |