exeption of receive(TCPSocketconnection)
Dependents: FTP_SDCard_File_Client_WIZwiki-W7500 FTPClient_example Freedman DigitalCamera_OV5642_WIZwiki-W7500 ... more
Fork of WIZnetInterface by
Revision 20:5a1969320666, committed 2015-07-21
- Comitter:
- Ricky_Kwon
- Date:
- Tue Jul 21 15:39:29 2015 +0000
- Parent:
- 19:d8773cd4edc5
- Commit message:
- FTPClient with WIZwiki-W7500
Changed in this revision
diff -r d8773cd4edc5 -r 5a1969320666 Socket/TCPSocketConnection.cpp --- 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; }
diff -r d8773cd4edc5 -r 5a1969320666 arch/int/W7500x_toe.cpp --- 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)
diff -r d8773cd4edc5 -r 5a1969320666 arch/int/W7500x_toe.h --- 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.