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 WIZnetInterface by
Revision 30:b67bcc6ee0bb, committed 2017-06-29
- Comitter:
- sgnezdov
- Date:
- Thu Jun 29 18:58:37 2017 +0000
- Parent:
- 29:c91884bd2713
- Commit message:
- Adjusted WIZnetInterface initialization to properly work with DHCP no-DHCP and use hardware mac address option
Changed in this revision
--- a/Socket/TCPSocketConnection.cpp Tue Nov 17 06:35:55 2015 +0000 +++ b/Socket/TCPSocketConnection.cpp Thu Jun 29 18:58:37 2017 +0000 @@ -34,14 +34,14 @@ if (_sock_fd < 0) { _sock_fd = eth->new_socket(); if (_sock_fd < 0) { - return -1; + return -2; } } if (set_address(host, port) != 0) { - return -1; + return -3; } if (!eth->connect(_sock_fd, get_address(), port)) { - return -1; + return -4; } set_blocking(false); // add code refer from EthernetInterface.
--- a/arch/ext/W5500.cpp Tue Nov 17 06:35:55 2015 +0000 +++ b/arch/ext/W5500.cpp Thu Jun 29 18:58:37 2017 +0000 @@ -167,9 +167,8 @@ reset_pin = 1; wait_ms(400); // 400ms (w5500) #if defined(USE_WIZ550IO_MAC) - // write MAC address inside the WZTOE MAC address register - reg_wr_mac(SHAR, mac); #endif + // set RX and TX buffer size #if 0 for (int socket = 0; socket < MAX_SOCK_NUM; socket++) { @@ -177,6 +176,10 @@ sreg<uint8_t>(socket, Sn_TXBUF_SIZE, 2); } #endif + + // write MAC address inside the WZTOE MAC address register + reg_wr_mac(SHAR, mac); + }
--- a/eth_arch.h Tue Nov 17 06:35:55 2015 +0000 +++ b/eth_arch.h Thu Jun 29 18:58:37 2017 +0000 @@ -30,6 +30,6 @@ #else #include "W5500.h" // W5500 Ethernet Shield -//#define USE_WIZ550IO_MAC // WIZ550io; using the MAC address +// #define USE_WIZ550IO_MAC // WIZ550io; using the MAC address #endif