Adjusted Initialization of MAC address

Fork of WIZnetInterface by WIZnet

Files at this revision

API Documentation at this revision

Comitter:
hjjeon
Date:
Mon Oct 05 05:44:39 2015 +0000
Parent:
26:d07c80e18b27
Parent:
23:0c6cbce7c860
Child:
28:200e63e513a8
Commit message:
Merged from branch.

Changed in this revision

EthernetInterface.cpp Show annotated file Show diff for this revision Revisions of this file
EthernetInterface.h Show annotated file Show diff for this revision Revisions of this file
arch/ext/W5500.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/EthernetInterface.cpp	Mon Oct 05 05:41:00 2015 +0000
+++ b/EthernetInterface.cpp	Mon Oct 05 05:44:39 2015 +0000
@@ -33,6 +33,14 @@
 }
 #endif
 
+int EthernetInterface::init()
+{
+    dhcp = true;
+    reset();
+	
+    return 0;
+}
+
 int EthernetInterface::init(uint8_t * mac)
 {
     dhcp = true;
--- a/EthernetInterface.h	Mon Oct 05 05:41:00 2015 +0000
+++ b/EthernetInterface.h	Mon Oct 05 05:44:39 2015 +0000
@@ -43,6 +43,7 @@
   * Initialize the interface and configure it to use DHCP (no connection at this point).
   * \return 0 on success, a negative number on failure
   */
+  int init();              //With DHCP
   int init(uint8_t * mac); //With DHCP
 
   /** Initialize the interface with a static IP address.
--- a/Socket/Endpoint.cpp	Mon Oct 05 05:41:00 2015 +0000
+++ b/Socket/Endpoint.cpp	Mon Oct 05 05:44:39 2015 +0000
@@ -41,6 +41,7 @@
     }
     uint32_t addr;
     if (!eth->gethostbyname(host, &addr)) {
+        error("DNS error : Cannot get url from DNS server\r\n");
         return -1;
     }
     snprintf(_ipAddress, sizeof(_ipAddress), "%d.%d.%d.%d", (addr>>24)&0xff, (addr>>16)&0xff, (addr>>8)&0xff, addr&0xff);