Library for ethernet

Dependents:   VC0706_FTP_Client_Ethernet_MQTT

Fork of WIZnetInterface by Akshay Tom

Files at this revision

API Documentation at this revision

Comitter:
Ricky_Kwon
Date:
Tue Jul 21 15:39:29 2015 +0000
Parent:
19:d8773cd4edc5
Child:
21:584efa51ee60
Commit message:
FTPClient with WIZwiki-W7500

Changed in this revision

Socket/TCPSocketConnection.cpp Show annotated file Show diff for this revision Revisions of this file
arch/int/W7500x_toe.cpp Show annotated file Show diff for this revision Revisions of this file
arch/int/W7500x_toe.h Show annotated file Show diff for this revision Revisions of this file
--- a/Socket/TCPSocketConnection.cpp	Wed Jul 01 04:02:50 2015 +0000
+++ b/Socket/TCPSocketConnection.cpp	Tue Jul 21 15:39:29 2015 +0000
@@ -108,9 +108,11 @@
 		return -1;
 
     int size = eth->wait_readable(_sock_fd, _blocking ? -1 : _timeout);
+    //int size = eth->wait_readable(_sock_fd, _blocking ? _timeout : -1 );
     if (size < 0) {
         return -1;
     }
+
     if (size > length) {
         size = length;
     }
--- a/arch/int/W7500x_toe.cpp	Wed Jul 01 04:02:50 2015 +0000
+++ b/arch/int/W7500x_toe.cpp	Tue Jul 21 15:39:29 2015 +0000
@@ -196,6 +196,7 @@
 	if (socket < 0) {
 		return -1;
 	}
+	#if 0
 	Timer t;
 	t.reset();
 	t.start();
@@ -209,6 +210,8 @@
 		}
 	}
 	return -1;
+	#endif
+	return sreg<uint16_t>(socket, Sn_RX_RSR);
 }
 
 int WIZnet_Chip::wait_writeable(int socket, int wait_time_ms, int req_size)
--- a/arch/int/W7500x_toe.h	Wed Jul 01 04:02:50 2015 +0000
+++ b/arch/int/W7500x_toe.h	Tue Jul 21 15:39:29 2015 +0000
@@ -151,9 +151,9 @@
     */
     void reset();
    
-    int wait_readable(int socket, int wait_time_ms, int req_size = 0);
+    int wait_readable(int socket, int wait_time_ms= 3*1000, int req_size = 0);
 
-    int wait_writeable(int socket, int wait_time_ms, int req_size = 0);
+    int wait_writeable(int socket, int wait_time_ms= 3*1000, int req_size = 0);
 
     /*
     * Check if an ethernet link is pressent or not.