Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
eth.cpp
00001 #include "eth.h" 00002 00003 EthernetInterface eth; 00004 00005 int __init_eth__ ( void ) 00006 { 00007 static bool initialized = false; 00008 char buffer_header_ip [ 16 ] = ""; 00009 char buffer_header_mask [ 16 ] = ""; 00010 char buffer_header_gateway [ 16 ] = ""; 00011 if( debug_uart3 ) pc.printf("\n\r"); 00012 00013 cm -> get_header_ip ( buffer_header_ip ); 00014 cm -> get_net_mask ( buffer_header_mask ); 00015 cm -> get_gateway ( buffer_header_gateway ); 00016 00017 if( !initialized ){ 00018 eth.init( buffer_header_ip, buffer_header_mask, buffer_header_gateway ); 00019 initialized = true; 00020 return eth.connect(); 00021 } 00022 if( !eth.disconnect() ){ 00023 return eth.connect(); 00024 } 00025 else{ 00026 return eth.connect(); 00027 } 00028 } 00029 00030 void __reconnect ( void ) 00031 { 00032 eth.disconnect (); 00033 __init_eth__ (); 00034 }
Generated on Tue Jul 12 2022 16:25:03 by
