Versão estável sem DMA e FFT. 128 amostras.

Dependencies:   EthernetInterface NTPClient mbed-rtos mbed

Revision:
0:fac116e94d44
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Headers/Capture.h	Tue Jan 05 11:47:35 2016 +0000
@@ -0,0 +1,62 @@
+/*
+ * capture.h
+ *
+ *  Created on: 
+ *      Author: 
+ */
+
+#ifndef CAPTURE_H
+#define CAPTURE_H
+
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+
+#include "mbed.h"
+#include "rtos.h"
+#include "dma.h"
+#include "adc.h"
+
+#include "Settings.h"
+
+#define CHANNEL0         p15
+#define CHANNEL1         p16
+#define CHANNEL2         p17
+#define CHANNEL3         p18
+#define CHANNEL4         p19
+#define CHANNEL5         p20
+
+class Capture
+{
+    
+protected:
+    
+    //static Semaphore m_CaptureSemaphore; //used to alert the capture thread about a ready capture 
+    //static int m_BufferIndex;
+
+    
+    //static dmaLinkedListNode m_Nodes[2]; //this list holds the buffer configuration for the DMA peripheral
+public:
+    static short int m_AdcBuffers[NUMBER_OF_CHANNELS][NUMBER_OF_SAMPLES];    
+    // matrix m_AdcBuffers[6][128]
+    
+public:
+
+    static short int GetValue(int nsamples, int nchannel);
+    static void      PutValue(int nsamples, int nchannel, short int value);
+    static void      CopyBuffer(int channel, short int *dest);    
+    //static void CopyBufferFloat(int channel, float *dest);
+
+    //static void ISRHandler();
+
+    //static void Initialize();
+    static void AcquireValues();
+    //static void Start();
+    //static void Stop();
+    //static void Wait();   
+    
+    static void ReadRFID(int channel,char *rfid);
+
+};
+
+#endif
\ No newline at end of file