emw3162 driver for mbed os 5

Fork of emw3162-driver by Maggie Mei

Revision:
3:a6f80a95b039
Parent:
2:fb6251306b21
diff -r fb6251306b21 -r a6f80a95b039 EMW3162Interface.cpp
--- a/EMW3162Interface.cpp	Mon Nov 14 02:30:49 2016 +0000
+++ b/EMW3162Interface.cpp	Thu Nov 17 03:52:22 2016 +0000
@@ -34,10 +34,12 @@
     _esp.attach(this, &EMW3162Interface::event);
 }
 
-int EMW3162Interface::connect(
-    const char *ssid,
-    const char *pass,
-    nsapi_security_t security)
+int EMW3162Interface::connect()
+{
+    return 0;
+}
+int EMW3162Interface::connect(const char *ssid, const char *pass, nsapi_security_t security,
+                                        uint8_t channel)
 {
     _esp.setTimeout(EMW3162_CONNECT_TIMEOUT);
 
@@ -57,9 +59,19 @@
         return NSAPI_ERROR_DHCP_FAILURE;
     }
 
+    return NSAPI_ERROR_OK;
+}
+
+int EMW3162Interface::set_credentials(const char *ssid, const char *pass, nsapi_security_t security)
+{
     return 0;
 }
 
+int EMW3162Interface::set_channel(uint8_t channel)
+{
+    return NSAPI_ERROR_UNSUPPORTED;
+}
+
 int EMW3162Interface::disconnect()
 {
     _esp.setTimeout(EMW3162_MISC_TIMEOUT);
@@ -81,6 +93,26 @@
     return _esp.getMACAddress();
 }
 
+const char *EMW3162Interface::get_gateway()
+{
+    return NULL;
+}
+
+const char *EMW3162Interface::get_netmask()
+{
+    return NULL;
+}
+
+int8_t EMW3162Interface::get_rssi()
+{
+    return 0;
+}
+
+int EMW3162Interface::scan(WiFiAccessPoint *res, unsigned count)
+{
+    return 0;
+}
+
 struct EMW3162_socket {
     int id;
     int socketId;
@@ -158,7 +190,7 @@
     return 0;
 }
     
-int EMW3162Interface::socket_accept(void **handle, void *server)
+int EMW3162Interface::socket_accept(void *handle, void **socket, SocketAddress *address)
 {
     return NSAPI_ERROR_UNSUPPORTED;
 }