Free (GPLv2) TCP/IP stack developed by TASS Belgium
Fork of PicoTCP by
Revision 41:4c18c62b31b9, committed 2013-07-16
- Comitter:
- tass
- Date:
- Tue Jul 16 07:41:44 2013 +0000
- Parent:
- 40:c8ab0d2bba0b
- Child:
- 42:13e557b44f68
- Commit message:
- Cleaned up EthernetInterface from useless messages.
Changed in this revision
EthernetInterface/EthernetInterface.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/EthernetInterface/EthernetInterface.cpp Tue Jul 16 06:40:35 2013 +0000 +++ b/EthernetInterface/EthernetInterface.cpp Tue Jul 16 07:41:44 2013 +0000 @@ -62,7 +62,7 @@ { void *id = NULL; struct pico_ip4 address, gateway, zero = {}; - printf("DHCP callback : %d\n",code); + if (PICO_DHCP_SUCCESS != code) goto fail; @@ -80,10 +80,10 @@ printf("Default gateway assigned : %s\n",gw_addr); pico_ipv4_route_add(zero, zero, gateway, 1, NULL); } - printf("Unlocking\n"); + dhcp_mx.unlock(); dhcp_retval = 0; - printf("Returning\n"); + return; fail: @@ -105,7 +105,12 @@ snprintf(mac_addr, 19, "%02X:%02X:%02X:%02X:%02X:%02X", lpc_eth->eth->mac.addr[0], lpc_eth->eth->mac.addr[1], lpc_eth->eth->mac.addr[2], lpc_eth->eth->mac.addr[3], lpc_eth->eth->mac.addr[4], lpc_eth->eth->mac.addr[5]); } - printf("Lpc init : %x\n",lpc_eth); + + if(lpc_eth) + printf("Ethernet initialized...\n"); + else + printf("Failed to start Ethernet...\n"); + } int EthernetInterface::init() @@ -144,7 +149,7 @@ return -1; dhcp_mx.lock(timeout_ms); // wait for a sign - printf("dhcp wake up!\n"); + return dhcp_retval; } else {