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:
10:7a1d1abb5172
Child:
13:eed9484a89bc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/memoriaMassa.h	Thu Jul 23 22:46:18 2015 +0000
@@ -0,0 +1,32 @@
+#ifndef MM_H
+#define MM_H
+
+#include "mbed.h"
+#include "queue.h"
+#include "sensor.h"
+
+typedef struct{
+    unsigned int time;
+    union{
+        float floatValue;
+        unsigned char bytes[4];
+    } value;
+} LeituraMM;
+
+class MemoriaMassa {
+
+    Ticker leituraPeriodica;
+    int mmPeriodoSec;
+    bool lerAgora;
+    
+    PersistentCircularQueue queue[2];
+    
+  public:
+    void iniciaLeituras(int periodoSec, int size);
+    void disparaLeitura();
+    void executaLeitura();
+    char* getMM(int channel);
+
+};
+
+#endif