Modularizando o src

Dependencies:   EALib EthernetInterface_vz mbed-rtos mbed

Fork of header_main_colinas_V0-20-09-14 by VZTECH

Revision:
119:ee6a53069455
Parent:
100:09a23fcd3bdf
Child:
121:ee02790d00b7
--- a/eth.cpp	Fri Apr 24 13:54:24 2015 +0000
+++ b/eth.cpp	Thu Apr 30 15:42:41 2015 +0000
@@ -11,7 +11,7 @@
     FILE *fp = fopen( "/qspi/myip.txt", "r");
     if( fp == NULL ){
         if( debug_file ) debug_msg("Failed to open /qspi/myip.txt" );
-        strncpy( buff_ip, __MY_IP__, 20 );    
+        strncpy( buff_ip, MY_IP, 20 );    
     }else{
         int read = fread( buff_ip, 1, 512, fp );
         if( read > 0 ){
@@ -23,7 +23,7 @@
             if( debug_file ) debug_msg("Eth ip %s", buff_ip );
         }else{
             if( debug_file ) debug_msg("Failed to read /qspi/myip.txt" );
-            strncpy( buff_ip, __MY_IP__, 20 );
+            strncpy( buff_ip, MY_IP, 20 );
         }
     }
     fclose( fp );
@@ -31,7 +31,7 @@
     fp = fopen( "/qspi/mymask.txt", "r");
     if( fp == NULL ){
         if( debug_file ) debug_msg("Failed to open /qspi/mymask.txt" );
-        strncpy( buff_msk, __MY_MSK__, 20 );    
+        strncpy( buff_msk, MY_MSK, 20 );    
     }else{
         int read = fread( buff_msk, 1, 512, fp );
         if( read > 0 ){
@@ -43,7 +43,7 @@
             if( debug_file ) debug_msg("mascara de rede Eth %s", buff_msk );
         }else{
             if( debug_file ) debug_msg("Failed to read /qspi/mymask.txt" );
-            strncpy( buff_msk, __MY_MSK__, 20 );
+            strncpy( buff_msk, MY_MSK, 20 );
         }
     }
     fclose( fp );
@@ -51,7 +51,7 @@
     fp = fopen( "/qspi/mygateway.txt", "r");
     if( fp == NULL ){
         if( debug_file ) debug_msg("Failed to open /qspi/mygateway.txt" );
-        strncpy( buff_gtw, __MY_GTW__, 20 );    
+        strncpy( buff_gtw, MY_GTW, 20 );    
     }else{
         int read = fread( buff_gtw, 1, 512, fp );
         if( read > 0 ){
@@ -63,14 +63,14 @@
             if( debug_file ) debug_msg("Ip Gateway Eth %s", buff_gtw );
         }else{
             if( debug_file ) debug_msg("Failed to read /qspi/mygateway.txt" );
-            strncpy( buff_gtw, __MY_GTW__, 20 );
+            strncpy( buff_gtw, MY_GTW, 20 );
         }
     }
     fclose( fp );
     buff_gtw[ 15 ] = 0;
     if( !initialized ){
         //eth.init( buff_ip, buff_msk, buff_gtw );
-        eth.init( buff_ip, buff_msk, __MY_GTW__ );
+        eth.init( buff_ip, buff_msk, MY_GTW );
         initialized = true;
         return eth.connect();
     }