diff --git a/Ethernet/Socket_APIs.chm b/Ethernet/Socket_APIs.chm deleted file mode 100644 index 1d10d65..0000000 Binary files a/Ethernet/Socket_APIs.chm and /dev/null differ diff --git a/Ethernet/Socket_APIs_V3.0.3.chm b/Ethernet/Socket_APIs_V3.0.3.chm new file mode 100644 index 0000000..5ed4b92 Binary files /dev/null and b/Ethernet/Socket_APIs_V3.0.3.chm differ diff --git a/Ethernet/Socket_APIs_V3.0.chm b/Ethernet/Socket_APIs_V3.0.chm deleted file mode 100644 index 58570f2..0000000 Binary files a/Ethernet/Socket_APIs_V3.0.chm and /dev/null differ diff --git a/Ethernet/socket.c b/Ethernet/socket.c index 79a6207..06b1f6a 100644 --- a/Ethernet/socket.c +++ b/Ethernet/socket.c @@ -197,7 +197,22 @@ int8_t socket(uint8_t sn, uint8_t protocol, uint16_t port, uint8_t flag) int8_t close(uint8_t sn) { CHECK_SOCKNUM(); - +//A20160426 : Applied the erratum 1 of W5300 +#if (_WIZCHIP_ == 5300) + if( ((getSn_MR(s)& 0x0F) == Sn_MR_TCP) && (getSn_TX_FSR(s) != getSn_TxMAX(s)) ) + { + uint8 destip[4] = {0, 0, 0, 1}; + // TODO + // You can wait for completing to sending data; + // wait about 1 second; + // if you have completed to send data, skip the code of erratum 1 + // ex> wait_1s(); + // if (getSn_TX_FSR(s) == getSn_TxMAX(s)) continue; + // + socket(s,Sn_MR_UDP,0x3000,0); + sendto(s,destip,1,destip,0x3000); // send the dummy data to an unknown destination(0.0.0.1). + }; +#endif setSn_CR(sn,Sn_CR_CLOSE); /* wait to process the command... */ while( getSn_CR(sn) ); diff --git a/README.md b/README.md index 365ac18..5c09e42 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ This driver provides the Berkeley Socket type APIs. - Define what Host I/F mode is used in **wizchip_conf.h** ## Revision History + * ioLibrary V3.0.2 Released : 26, April, 2016 + * Applied the erratum #1 in close() of socket.c (Refer to A20160426) * ioLibrary V3.0.1 Released : 15, July, 2015 * Bug fixed : In W5100, Fixed CS control problem in read/write buffer with SPI. Refer to M20150715. * ioLibrary V3.0 Released : 01, June, 2015