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 3:9997e2b7d459, committed 2014-07-10
- Comitter:
- Bongjun
- Date:
- Thu Jul 10 04:55:47 2014 +0000
- Parent:
- 2:96f102b31e72
- Commit message:
- fix Sn_IR read error
Changed in this revision
| WIZnetInterface/WIZnet/W5500.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/WIZnetInterface/WIZnet/W5500.cpp Thu Jul 10 04:43:49 2014 +0000
+++ b/WIZnetInterface/WIZnet/W5500.cpp Thu Jul 10 04:55:47 2014 +0000
@@ -222,8 +222,10 @@
spi_write(ptr, cntl_byte, (uint8_t*)str, len);
sreg<uint16_t>(socket, Sn_TX_WR, ptr + len);
scmd(socket, SEND);
-
- while ((sreg<uint8_t>(socket, Sn_IR) & INT_SEND_OK) != INT_SEND_OK) {
+
+ uint8_t tmp_Sn_IR;
+// while ((sreg<uint8_t>(socket, Sn_IR) & INT_SEND_OK) != INT_SEND_OK) {
+ while (( (tmp_Sn_IR = sreg<uint8_t>(socket, Sn_IR)) & INT_SEND_OK) != INT_SEND_OK) {
/*
if (sreg<uint8_t>(socket, Sn_SR) == CLOSED) {
close(socket);
@@ -238,14 +240,14 @@
//break;
case SOCK_UDP :
// ARP timeout is possible.
- if ((sreg<uint8_t>(socket, Sn_IR) & INT_TIMEOUT) != INT_TIMEOUT) {
+ if ((tmp_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);
