This is WIZnet Ethernet Interface using Hardware TCP/IP chip, W5500, W5200 and W5100. One of them can be selected by enabling it in wiznet.h.
Fork of WIZnet_Library by
Revision 2:96f102b31e72, committed 2014-07-10
- Comitter:
- Bongjun
- Date:
- Thu Jul 10 04:43:49 2014 +0000
- Parent:
- 1:8138a268fbd2
- Child:
- 3:9997e2b7d459
- Commit message:
- // @Jul.10, 2014 fix contant name, and udp sendto function.
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 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);