TCP Socket Hello World with Ethernet

Dependencies:   EthernetInterface mbed-rtos mbed

Fork of TCPSocket_HelloWorld by mbed_example

Files at this revision

API Documentation at this revision

Comitter:
yihui
Date:
Thu Apr 23 02:01:38 2015 +0000
Parent:
16:bfcf5f6274a2
Commit message:
add mbed_mac_address() to use a specific mac address

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Apr 22 13:38:58 2015 +0000
+++ b/main.cpp	Thu Apr 23 02:01:38 2015 +0000
@@ -29,3 +29,14 @@
     
     while(1) {}
 }
+
+// override the default weak function to provide a specific mac address
+extern "C" void mbed_mac_address(char *mac)
+{
+    mac[0] = 0x01;
+    mac[1] = 0x23;
+    mac[2] = 0x45;
+    mac[3] = 0x67;
+    mac[4] = 0x89;
+    mac[5] = 0xAB;
+};