Update of W5500 Interface for mbed-os

Dependents:   PwrCond_mbed5

Revision:
1:2dee44ea52a9
Parent:
0:77e050d1fb12
diff -r 77e050d1fb12 -r 2dee44ea52a9 W5500Interface.h
--- a/W5500Interface.h	Fri Jun 02 22:00:49 2017 +0000
+++ b/W5500Interface.h	Thu Jun 15 20:19:23 2017 +0000
@@ -23,9 +23,22 @@
 #include "rtos.h"
 #include "WIZnet/W5500.h"
 
+/** w5500_socket struct
+ *  W5500 socket 
+ */
+ 
+struct w5500_socket {
+   int   fd;
+   nsapi_protocol_t proto;
+   void  (*callback)(void *);
+   void  *callback_data;
+   bool  connected;
+}; 
+
 /** W5500Interface class
  *  Implementation of the NetworkStack for the W5500
  */
+
 class W5500Interface : public NetworkStack, public EthInterface, public WIZnet_Chip 
 {
 public:
@@ -232,6 +245,17 @@
     bool ip_set;    
     
     int listen_port;
+    
+    void signal_event(nsapi_socket_t handle);
+    
+    //w5500 socket management
+    struct w5500_socket w5500_sockets[MAX_SOCK_NUM];
+    w5500_socket* get_sock(int fd);
+    void init_socks();
+
+    Thread *_daemon;
+    void daemon();
+
 };
 
 #endif