Library for ethernet

Dependents:   VC0706_FTP_Client_Ethernet_MQTT

Fork of WIZnetInterface by Akshay Tom

Files at this revision

API Documentation at this revision

Comitter:
embeddist
Date:
Mon Jun 22 09:11:47 2015 +0000
Parent:
14:2101ab5ee40f
Child:
16:c830d2e7e0f5
Child:
17:7d7553e0578e
Commit message:
- fixed DHCP bug.; - fixed link check func.

Changed in this revision

Socket/DHCPClient.cpp Show annotated file Show diff for this revision Revisions of this file
arch/int/W7500x_toe.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Socket/DHCPClient.cpp	Wed Jun 17 00:24:45 2015 +0000
+++ b/Socket/DHCPClient.cpp	Mon Jun 22 09:11:47 2015 +0000
@@ -110,8 +110,8 @@
 
 void DHCPClient::callback()
 {
-    //Endpoint host;
-    int recv_len = m_udp->receiveFrom(m_server, (char*)m_buf, sizeof(m_buf));
+    Endpoint host;
+    int recv_len = m_udp->receiveFrom(host, (char*)m_buf, sizeof(m_buf));
     if (recv_len < 0) {
         return;
     }
--- a/arch/int/W7500x_toe.cpp	Wed Jun 17 00:24:45 2015 +0000
+++ b/arch/int/W7500x_toe.cpp	Mon Jun 22 09:11:47 2015 +0000
@@ -50,7 +50,6 @@
 WIZnet_Chip::WIZnet_Chip()
 {
 	inst = this;
-	mdio_init(GPIO_MDC, MDC, MDIO);
 }
 
 bool WIZnet_Chip::setmac()
@@ -146,6 +145,8 @@
 	wait_ms(10);//for S/W reset
 	wait_ms(10);//for MDC I/F RDY
 
+	mdio_init(GPIO_MDC, MDC, MDIO);
+	
 	/* S/W Reset WZTOE */
 	reg_wr<uint8_t>(MR, MR_RST);
 	// set PAD strengh and pull-up for TXD[3:0] and TXE