8266

Dependencies:   mbed

esp8266.h

Committer:
brainliang
Date:
2017-10-11
Revision:
0:63af4719467f

File content as of revision 0:63af4719467f:



class Esp8266 {                                                                 //声明一个类
    bool network_start;
    bool mqtt_start;
public:
    // 0--client mode 1--host mode
    Esp8266(int mode = 0);
    
    // 通用
    bool reset();
    
    // 连接模式
    bool connect_wifi();
    bool weblogin();
    bool connect_mqtt_broker(char *ip);
    
    bool publish(char *topic, char *data, int size = -1);
    bool subscribe_poll(char *topic, char *data, int size = -1);
    // 热点模式
};