This is WIZnet Ethernet Interface using Hardware TCP/IP chip, W5500, W5200 and W5100. One of them can be selected by enabling it in wiznet.h.

Dependents:   bigthingRecfinal

Fork of WIZnet_Library by WIZnet

Revision:
6:ca8405b9564d
Parent:
4:37a5586c4f64
--- a/WIZnetInterface/WIZnet/W5500.cpp	Mon Oct 06 01:35:09 2014 +0000
+++ b/WIZnetInterface/WIZnet/W5500.cpp	Fri Apr 24 08:19:14 2015 +0000
@@ -126,11 +126,6 @@
 
 bool WIZnet_Chip::is_connected(int socket)
 {
-    /*
-        if (sreg<uint8_t>(socket, Sn_SR) == SOCK_ESTABLISHED) {
-            return true;
-        }
-    */
     uint8_t tmpSn_SR;
     tmpSn_SR = sreg<uint8_t>(socket, Sn_SR);
     // packet sending is possible, when state is SOCK_CLOSE_WAIT.
@@ -140,6 +135,17 @@
     return false;
 }
 
+
+bool WIZnet_Chip::is_fin_received(int socket)
+{
+    uint8_t tmpSn_SR;
+    tmpSn_SR = sreg<uint8_t>(socket, Sn_SR);
+    // packet sending is possible, when state is SOCK_CLOSE_WAIT.
+    if (tmpSn_SR == SOCK_CLOSE_WAIT) {
+        return true;
+    }
+    return false;
+}
 // Reset the chip & set the buffer
 void WIZnet_Chip::reset()
 {