Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of WIZnet_Library by
Revision 9:885c89b0b5ed, committed 2016-01-24
- Comitter:
- antanenko
- Date:
- Sun Jan 24 04:57:23 2016 +0000
- Parent:
- 6:ca8405b9564d
- Commit message:
- first commit
Changed in this revision
--- a/WIZnetInterface/WIZnet/W5100.cpp Fri Apr 24 08:19:14 2015 +0000 +++ b/WIZnetInterface/WIZnet/W5100.cpp Sun Jan 24 04:57:23 2016 +0000 @@ -140,6 +140,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; +} + void WIZnet_Chip::reset() { reset_pin = 1;
--- a/WIZnetInterface/WIZnet/W5100.h Fri Apr 24 08:19:14 2015 +0000 +++ b/WIZnetInterface/WIZnet/W5100.h Sun Jan 24 04:57:23 2016 +0000 @@ -144,7 +144,7 @@ * @returns true if successful */ bool is_connected(int socket); - + bool is_fin_received(int socket); /* * Close a tcp connection *
--- a/WIZnetInterface/WIZnet/wiznet.h Fri Apr 24 08:19:14 2015 +0000 +++ b/WIZnetInterface/WIZnet/wiznet.h Sun Jan 24 04:57:23 2016 +0000 @@ -22,9 +22,9 @@ #include "mbed.h" #include "mbed_debug.h" -#define USE_W5500 +//#define USE_W5500 //#define USE_W5200 -//#define USE_W5100 +#define USE_W5100 #if defined(USE_W5500) #include "W5500.h"