adds getMACAddress() like getIPAddress(). Initializes in constructor.

Dependencies:   Socket lwip-eth lwip-sys lwip

Fork of EthernetInterface by Jonathon Fletcher

Files at this revision

API Documentation at this revision

Comitter:
emilmont
Date:
Wed Jul 25 15:00:12 2012 +0000
Parent:
14:cec293071eed
Child:
16:56438e188f04
Commit message:
Update socket library

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
Socket.lib Show annotated file Show diff for this revision Revisions of this file
--- a/EthernetInterface.cpp	Mon Jul 23 11:53:01 2012 +0000
+++ b/EthernetInterface.cpp	Wed Jul 25 15:00:12 2012 +0000
@@ -59,7 +59,7 @@
 int EthernetInterface::init() {
     use_dhcp = true;
     init_netif(NULL, NULL, NULL);
-    return OK;
+    return 0;
 }
 
 int EthernetInterface::init(const char* ip, const char* mask, const char* gateway) {
@@ -69,7 +69,7 @@
     inet_aton(mask, &mask_n);
     inet_aton(gateway, &gateway_n);
     init_netif(&ip_n, &mask_n, &gateway_n);
-    return OK;
+    return 0;
 }
 
 int EthernetInterface::connect() {
@@ -84,7 +84,7 @@
     
     netif_inited.wait();
     
-    return OK;
+    return 0;
 }
 
 int EthernetInterface::disconnect() {
@@ -97,7 +97,7 @@
     
     NVIC_DisableIRQ(ENET_IRQn);
     
-    return OK;
+    return 0;
 }
 
 char* EthernetInterface::getIPAddress() {
--- a/EthernetInterface.h	Mon Jul 23 11:53:01 2012 +0000
+++ b/EthernetInterface.h	Wed Jul 25 15:00:12 2012 +0000
@@ -59,7 +59,8 @@
 };
 
 //As a helper, include TCPSocket.h & UDPSocket.h here
-#include "TCPSocket.h"
+#include "TCPSocketConnection.h"
+#include "TCPSocketServer.h"
 #include "UDPSocket.h"
 
 #endif /* ETHERNETINTERFACE_H_ */
--- a/Socket.lib	Mon Jul 23 11:53:01 2012 +0000
+++ b/Socket.lib	Wed Jul 25 15:00:12 2012 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/Socket/#b227d242f3c7
+http://mbed.org/users/mbed_official/code/Socket/#e6474399e057