grove_esp8266

Revision:
0:0ac7892e440f
diff -r 000000000000 -r 0ac7892e440f grove_esp8266_class.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/grove_esp8266_class.h	Tue Jun 09 10:18:06 2015 +0000
@@ -0,0 +1,32 @@
+
+
+
+#ifndef __GROVE_ESP8266_CLASS_H__
+#define __GROVE_ESP8266_CLASS_H__
+
+#include "grove_esp8266.h"
+
+//GROVE_NAME        "Grove_Esp8266"
+//IF_TYPE           UART
+//IMAGE_URL         http://www.seeedstudio.com/depot/includes/templates/bootstrap/images/ico/grove.png
+
+class GroveEsp8266
+{
+public:
+    GroveEsp8266(int pintx, int pinrx);
+    bool write_setup(void);
+    bool read_lux(uint32_t *lux);
+    bool attach_event_handler(CALLBACK_T handler);
+    
+    bool read_version(void);
+    bool write_joinwifi(char *ssid, char *pwd);
+    bool write_socketasclient(char *ip, unsigned int port);
+    bool read_aplist(void);
+    bool write_msg(char *msg, unsigned int len);
+    
+
+private:
+    UART_T *uart;
+};
+
+#endif