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:
12:99e8386ba225
diff -r ec1c34e9ec45 -r 2101ab5ee40f arch/ext/W5500.h
--- a/arch/ext/W5500.h	Tue Jun 16 13:03:28 2015 +0900
+++ b/arch/ext/W5500.h	Wed Jun 17 00:24:45 2015 +0000
@@ -151,7 +151,6 @@
 	HalfDuplex100 = 3,
 	FullDuplex100 = 4,
 };
-
 class WIZnet_Chip {
 public:
 enum Protocol {
@@ -350,11 +349,13 @@
         return *reinterpret_cast<T*>(buf);
     }
 
-    void reg_rd_mac(uint16_t addr, uint8_t* data) {
+    void reg_rd_mac(uint16_t addr, uint8_t* data);
+/*     {
         spi_read(addr, 0x00, data, 6);
-    }
+    }*/
 
-    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];
         char* p = (char*)ip;
         for(int i = 0; i < 4; i++) {
@@ -367,18 +368,21 @@
         }
         spi_write(addr, cb, buf, sizeof(buf));
     }
-    
-    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, (0x0C + (socket << 5)), ip);
-    }
+    }*/
     
-    void reg_rd_ip_byte(uint16_t addr, uint8_t* data) {
+    void reg_rd_ip_byte(uint16_t addr, uint8_t* data);
+/*     {
         spi_read(addr, 0x00, data, 4);
-    }
+    }*/
     
-    void reg_wr_ip_byte(uint16_t addr, uint8_t* data) {
+    void reg_wr_ip_byte(uint16_t addr, uint8_t* data);
+/*     {
         spi_write(addr, 0x04, data, 4);
-    }
+    }*/
        
 /////////////////////////////////
 // Common Register I/O function //
@@ -623,7 +627,7 @@
  * @return uint8_t. Value of @ref PHYCFGR register.
  * @sa getPHYCFGR()
  */
-    uint8_t getPHYCFGR() {
+     uint8_t getPHYCFGR() {
         return reg_rd<uint8_t>(PHYCFGR);
     }
 
@@ -978,6 +982,8 @@
     }
 
 
+	int ethernet_link(void);
+	void ethernet_set_link(int speed, int duplex);
 protected:
     uint8_t mac[6];
     uint32_t ip;
@@ -986,22 +992,19 @@
     uint32_t dnsaddr;
     bool dhcp;
     
-    
-
+    void spi_write(uint16_t addr, uint8_t cb, const uint8_t *buf, uint16_t len);
+    void spi_read(uint16_t addr, uint8_t cb, uint8_t *buf, uint16_t len);
+    SPI* spi;
+    DigitalOut cs;
+    DigitalOut reset_pin;
     static WIZnet_Chip* inst;
 
     void reg_wr_mac(uint16_t addr, uint8_t* data) {
         spi_write(addr, 0x04, data, 6);
     }
 
-    void spi_write(uint16_t addr, uint8_t cb, const uint8_t *buf, uint16_t len);
-    void spi_read(uint16_t addr, uint8_t cb, uint8_t *buf, uint16_t len);
-    SPI* spi;
-    DigitalOut cs;
-    DigitalOut reset_pin;
 };
-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);