Kairi Kozuma / ESP8266_wifi_robot

Dependencies:   Motordriver Servo mbed-dev mbed-rtos

Fork of ESP8266_wifi_robot by Kairi Kozuma

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ESP8266.h Source File

ESP8266.h

00001 #ifndef ESP8266_H
00002 #define ESP8266_H
00003 
00004 #include "mbed.h"
00005 
00006 #define SND_BUF_SIZE 1024
00007 
00008 class ESP8266 
00009 {
00010 private:
00011     char _ssid[32];
00012     char _pwd[32];
00013     char _snd[SND_BUF_SIZE];
00014     RawSerial _esp;
00015     DigitalOut _reset;
00016     
00017 public:
00018     ESP8266(PinName tx, PinName rx, PinName reset, char * SSID, char * password); 
00019     void send();
00020     void send(char * command);
00021     void setup();
00022     void reset();
00023     void baud(int baudrate);
00024     void getMAC();
00025     void getIP();
00026     
00027     int putc(int c);
00028     int getc();
00029     int readable();
00030     int writeable();
00031     void attach(Callback< void()> func, SerialBase::IrqType type);
00032 };
00033 
00034 #endif