EZR

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

Fork of smartRamalKW by Equipe Firmware V2COM

Files at this revision

API Documentation at this revision

Comitter:
tpadovani
Date:
Wed Jun 17 22:44:40 2015 +0000
Parent:
1:6ac7168763b6
Child:
3:21598044a47f
Commit message:
cmd

Changed in this revision

GGSProtocol.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
main.h Show annotated file Show diff for this revision Revisions of this file
v2hardware.h Show annotated file Show diff for this revision Revisions of this file
--- a/GGSProtocol.lib	Tue Jun 16 22:16:02 2015 +0000
+++ b/GGSProtocol.lib	Wed Jun 17 22:44:40 2015 +0000
@@ -1,1 +1,1 @@
-GGSProtocol#0b846eac1798
+GGSProtocol#2e6d12c7ecd3
--- a/main.cpp	Tue Jun 16 22:16:02 2015 +0000
+++ b/main.cpp	Wed Jun 17 22:44:40 2015 +0000
@@ -2,23 +2,25 @@
 
 static Watchdog wd;
 static Ticker tickerWd;
-static SerialNumber sn;
-static Parameters param ((unsigned char *)&APP_PARAMETERS, sizeof(APP_PARAMETERS));
-
+//static SerialNumber sn;
+//static Parameters param ((unsigned char *)&APP_PARAMETERS, sizeof(APP_PARAMETERS));
+//CommandExecutor exec(1800, 2);
 
 int main()
 {
     iniciaWd();
     
     printf("##### %s #####\r\n", version);
-    printSerialNumber();
+//    printSerialNumber();
 
-    param.loadParameters();
-    network.baud(19200);
+//    param.loadParameters();
+//    ggsStream.baud(19200);
+//    exec.carregaEndereco(sn.get());
+//    exec.iniciaExecutorComandos();
     
-    while(1){
-        trataPacoteGGS();
-    }
+//    while(1){
+//        exec.trataPacoteGGS();
+//    }
     
 }
 
@@ -36,21 +38,21 @@
     wd.Service();
 }
 
-void softReset(){
-    printf("SoftReset\r\n");
-    tickerWd.detach();
-}
+//void softReset(){
+//    printf("SoftReset\r\n");
+//    tickerWd.detach();
+//}
 
-void enviaRespostaGGS(unsigned char * dados, int tamanho){
-    for(int i=0; i < tamanho; i++){
-        network.putc(dados[i]);
-    }
-}
+//void enviaRespostaGGS(unsigned char * dados, int tamanho){
+//    for(int i=0; i < tamanho; i++){
+//        ggsStream.putc(dados[i]);
+//    }
+//}
 
-void printSerialNumber(){
-    printf("SN: ");
-    for(int i=0; i < SERIAL_LENGTH; i++){
-        printf("%02x", sn.get()[i]);
-    }
-    printf("\r\n");
-}
+//void printSerialNumber(){
+//    printf("SN: ");
+//    for(int i=0; i < SERIAL_LENGTH; i++){
+//        printf("%02x", sn.get()[i]);
+//    }
+//    printf("\r\n");
+//}
--- a/main.h	Tue Jun 16 22:16:02 2015 +0000
+++ b/main.h	Wed Jun 17 22:44:40 2015 +0000
@@ -4,13 +4,14 @@
 #include "mbed.h"
 #include "settings.h"
 #include "version.h"
-#include "serialNumber.h"
-#include "parameters.h"
-#include "appParameters.h"
+//#include "serialNumber.h"
+//#include "parameters.h"
+//#include "appParameters.h"
 #include "FreescaleWatchdog.h"
-#include "ggs.h"
+//#include "v2hardware.h"
+//#include "ggs.h"
 
-ParametersBlock APP_PARAMETERS;
+//ParametersBlock APP_PARAMETERS;
 
 
 
--- a/v2hardware.h	Tue Jun 16 22:16:02 2015 +0000
+++ b/v2hardware.h	Wed Jun 17 22:44:40 2015 +0000
@@ -7,11 +7,11 @@
 #ifdef TEST_MODE
     DigitalOut reset_relay(PTC6);
     DigitalOut set_relay(PTC5);
-    Serial network(USBTX, USBRX);
+    Serial ggsStream(USBTX, USBRX);
 #else
     DigitalOut reset_relay(PTC6);
     DigitalOut set_relay(PTC5);
-    Serial network(PTC4, PTC3);
+    Serial ggsStream(PTC4, PTC3);
 #endif  // TEST_MODE
 
 #endif  // V2_HARDWARE_H