Mac addr added ICRS

Dependencies:   mbed

Fork of Email2Screen by Oliver Mattos

Files at this revision

API Documentation at this revision

Comitter:
je310
Date:
Wed Nov 20 21:22:22 2013 +0000
Parent:
0:1619a6b826d7
Commit message:
This is a maced version of olivers code ICRS

Changed in this revision

NetServicesProxy/lwip/netif/ethernetif.c Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/NetServicesProxy/lwip/netif/ethernetif.c	Mon Nov 21 18:25:34 2011 +0000
+++ b/NetServicesProxy/lwip/netif/ethernetif.c	Wed Nov 20 21:22:22 2013 +0000
@@ -90,9 +90,13 @@
   netif->hwaddr_len = ETHARP_HWADDR_LEN;
 
   /* set MAC hardware address */
-  netif->hwaddr[0] = ;
+  netif->hwaddr[0] = 8C;
+  netif->hwaddr[1] = 70;
+  netif->hwaddr[2] = 5a;
+  netif->hwaddr[3] = d4;
+  netif->hwaddr[4] = 96;
   ...
-  netif->hwaddr[5] = ;
+  netif->hwaddr[5] = c4;
 
   /* maximum transfer unit */
   netif->mtu = 1500;
--- a/main.cpp	Mon Nov 21 18:25:34 2011 +0000
+++ b/main.cpp	Wed Nov 20 21:22:22 2013 +0000
@@ -18,20 +18,41 @@
 const int H=128;
 byte PenisData[ H*W/8 ];
 
+extern "C" void mbed_mac_address(char * mac) {
+ 
+// define your own MAC Address
+  mac[0] = 0x8C;  
+  mac[1] = 0x70;  
+  mac[2] = 0x5A;  
+  mac[3] = 0xD4;  
+  mac[4] = 0x96;  
+  mac[5] = 0xC4;           
+  
+};
+
 
 
 
 int main() {
     EN = 0;
     wait_us(1);
+
     
     timer.start();
     
     printf("\r\nSetting up...\r\n");
     EthernetErr ethErr = eth.setup();
     if(ethErr) {
-        printf("Error %d in setup.\n", ethErr);
-        return -1;
+//        printf("Error %d in setup.\n", ethErr);
+//        return -1;
+    int myint = int(ethErr);
+            while(myint>0){
+                myled = 1;
+                wait(1);
+                myled =0;
+                wait(1);
+                myint--;
+            }
     }
     printf("\r\nSetup OK\r\n");