![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Modularizando o src
Dependencies: EALib EthernetInterface_vz mbed-rtos mbed
Fork of header_main_colinas_V0-20-09-14 by
Diff: utils.cpp
- Revision:
- 50:d9b6577a70f5
- Parent:
- 48:195c97f12e8e
- Child:
- 53:bb492a8f115a
diff -r 4837ed2aad6b -r d9b6577a70f5 utils.cpp --- a/utils.cpp Mon Oct 20 16:32:12 2014 +0000 +++ b/utils.cpp Mon Oct 20 19:28:38 2014 +0000 @@ -46,9 +46,9 @@ int __init_eth__(){ static bool initialized = false; - char buff_ip[ 16 ]; - char buff_msk[ 16 ]; - char buff_gtw[ 16 ]; + char buff_ip[ 16 ] = ""; + char buff_msk[ 16 ] = ""; + char buff_gtw[ 16 ] = ""; wdt.kick(); pc.printf("\n\r"); FILE *fp = fopen( "/qspi/myip.txt", "r"); @@ -115,7 +115,8 @@ buff_gtw[ 15 ] = 0; if( !initialized ){ - eth.init( buff_ip, buff_msk, buff_gtw ); + //eth.init( buff_ip, buff_msk, buff_gtw ); + eth.init( buff_ip, buff_msk, __MY_GTW__ ); initialized = true; return eth.connect(); }