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
Diff: WIZnetInterface/WIZnet/W5500.cpp
- Revision:
- 2:96f102b31e72
- Parent:
- 1:8138a268fbd2
- Child:
- 3:9997e2b7d459
--- a/WIZnetInterface/WIZnet/W5500.cpp Fri May 09 01:17:51 2014 +0000
+++ b/WIZnetInterface/WIZnet/W5500.cpp Thu Jul 10 04:43:49 2014 +0000
@@ -224,10 +224,28 @@
scmd(socket, SEND);
while ((sreg<uint8_t>(socket, Sn_IR) & INT_SEND_OK) != INT_SEND_OK) {
+/*
if (sreg<uint8_t>(socket, Sn_SR) == CLOSED) {
close(socket);
return 0;
}
+*/
+ // @Jul.10, 2014 fix contant name, and udp sendto function.
+ switch (sreg<uint8_t>(socket, Sn_SR)) {
+ case SOCK_CLOSED :
+ close(socket);
+ return 0;
+ //break;
+ case SOCK_UDP :
+ // ARP timeout is possible.
+ if ((sreg<uint8_t>(socket, Sn_IR) & INT_TIMEOUT) != INT_TIMEOUT) {
+ sreg<uint8_t>(socket, Sn_IR, INT_TIMEOUT);
+ return 0;
+ }
+ break;
+ default :
+ break;
+ }
}
sreg<uint8_t>(socket, Sn_IR, INT_SEND_OK);
