EZR

Dependencies:   CRC16 FreescaleIAP FreescaleWatchdog GGSProtocol LM75B PIMA Parameters PersistentCircularQueue SerialNumberV2COM mbed-dev-watchdog_2016_03_04

Fork of smartRamalKW by Equipe Firmware V2COM

Revision:
31:ef0e073126a1
Parent:
29:fec8fdf25d87
Child:
32:dee631435a62
--- a/main.cpp	Tue Feb 23 20:45:18 2016 +0000
+++ b/main.cpp	Wed Feb 24 14:31:25 2016 +0000
@@ -78,18 +78,17 @@
     }
 #endif    
     
-#ifdef  DIRECT_UART
+// initializes serial
+#ifdef USE_PINO
+    pinoSerial.baud( APP_PARAMETERS.RADIO_BAUDRATE_BPS );
+    #ifdef  UART_8N2
+        pinoSerial.format( 8, Serial::None, 2 );
+    #endif
+#else
     ggsStream.baud( APP_PARAMETERS.RADIO_BAUDRATE_BPS );
     #ifdef  UART_8N2
         ggsStream.format( 8, Serial::None, 2 );
     #endif
-#else
-    // initializes serial
-    pinoSerial.baud( APP_PARAMETERS.RADIO_BAUDRATE_BPS );
-    #ifdef  UART_8N2
-        pinoSerial.format( 8, Serial::None, 2 );
-    #endif
-
 #endif
 
     exec.carregaEndereco(sn.get());
@@ -98,7 +97,7 @@
     announce.setIntervals(APP_PARAMETERS.ANNOUNCE_INTERVAL_S, APP_PARAMETERS.INTERVALO_SILENCIO_S);
     
     
-#ifndef  DIRECT_UART
+#ifdef USE_PINO
     // configures Pino stack
     ggsStream.init( _SrcEndpoint, _DestNode, _DestEndpoint, _DynamicDest );
     PinoCfgStr pinoCfg = {
@@ -124,7 +123,7 @@
 #endif
 
     while(1){
-#ifndef  DIRECT_UART
+#ifdef  USE_PINO
         ggsStream.handleFrames();
         ggsStream.handleStream();
 #endif