This is Library using WIZnet Hardware TCP/IP chip, W5500 and WIZnet TCP/IP Offload Engine, W7500.

Dependents:   HTTP_SDcard_file_server_WIZwiki-W7500 SSD1306_smart_watch TCPEchoServer-WIZwiki-W7500 httpServer-WIZwiki-W7500 ... more

Fork of WIZnetInterface by Soohwan Kim

This is WIZnet Ethernet Interface using Hardware TCP/IP chip, W5500 and TCP/IP Offload Engine, W7500.

[Users » embeddist » Code » WIZnetInterface](https://developer.mbed.org/users/embeddist/code/WIZnetInterface/) -> WIZnetInterface Lib will be released on [Team WIZnet](https://developer.mbed.org/teams/WIZnet/)

https://developer.mbed.org/media/cache/platforms/WIZwiki_W7500_enabled.JPG.250x250_q85.jpg

https://developer.mbed.org/media/cache/platforms/WIZwiki_W7500P_enabled2.JPG.250x250_q85.jpg

https://developer.mbed.org/media/cache/platforms/WIZwiki_W7500ECO_enabled2.JPG.250x250_q85.jpg

https://developer.mbed.org/media/cache/components/components/fetch.phpmediaoshw5500_ethernet_shieldw5500_main_picture2.png.200x200_q85.jpg

This library is an Ethernet Interface library port-based on [EthernetInterface](https://developer.mbed.org/users/mbed_official/code/EthernetInterface/docs/tip/).

For more detail, visit http://embeddist.blogspot.kr/2015/06/wiznetinterface-for-armmbed.html

Revision:
14:2101ab5ee40f
Parent:
8:4c02de1dbf3a
--- a/arch/int/W7500x_toe.h	Tue Jun 16 13:03:28 2015 +0900
+++ b/arch/int/W7500x_toe.h	Wed Jun 17 00:24:45 2015 +0000
@@ -249,7 +249,7 @@
 
     template<typename T>
     T reg_rd(uint16_t addr, uint8_t cb) {
-        uint8_t buf[sizeof(T)];
+        uint8_t buf[sizeof(T)] = {0,};
         for(int i = 0; i < sizeof(buf); i++) { //  Little Endian to Big Endian
         	buf[i] = *(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)((cb<<16)+addr)+i);
 		}
@@ -263,33 +263,16 @@
         return *reinterpret_cast<T*>(buf);
     }
 
-    void reg_rd_mac(uint16_t addr, uint8_t* data) {
-       	data[0] = *(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)(addr+3));
-       	data[1] = *(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)(addr+2));
-       	data[2] = *(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)(addr+1));
-       	data[3] = *(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)(addr+0));
-       	data[4] = *(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)(addr+7));
-       	data[5] = *(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)(addr+6));
-    }
+    void reg_rd_mac(uint16_t addr, uint8_t* data);
+    
+    void reg_wr_ip(uint16_t addr, uint8_t cb, const char* ip);
 
-    void reg_wr_ip(uint16_t addr, uint8_t cb, const char* ip) {
-        uint8_t buf[4];
-		uint32_t wr_ip = 0;
-        char* p = (char*)ip;
-        for(int i = 0; i < 4; i++) {
-            wr_ip = (wr_ip<<8);
-            buf[i] = atoi(p);
-            wr_ip |= buf[i];
-            p = strchr(p, '.');
-            if (p == NULL) break;
-            p++;
-        }
-       	*(volatile uint32_t *)(W7500x_WZTOE_BASE + (uint32_t)((cb<<16)+addr)) = wr_ip;
-    }
+    void sreg_ip(int socket, uint16_t addr, const char* ip);
 
-    void sreg_ip(int socket, uint16_t addr, const char* ip) {
-        reg_wr_ip(addr,  (uint8_t)(0x01+(socket<<2)), ip);
-    }
+	int ethernet_link(void);
+	
+	void ethernet_set_link(int speed, int duplex);
+
 
 protected:
     uint8_t mac[6];
@@ -310,8 +293,6 @@
        	*(volatile uint8_t *)(W7500x_WZTOE_BASE + (uint32_t)(addr+6)) = data[5] ;
     }
 };
-extern int ethernet_link(void);
-extern void ethernet_set_link(int speed, int duplex);
 
 extern uint32_t str_to_ip(const char* str);
 extern void printfBytes(char* str, uint8_t* buf, int len);