Versão limpa em 04/09/2014. Telnet funcionando.

Dependencies:   EthernetInterface mbed-rtos mbed NTPClient

Files at this revision

API Documentation at this revision

Comitter:
rebonatto
Date:
Thu Jan 14 17:26:05 2016 +0000
Parent:
39:9fd8397cbef9
Child:
42:d6f9ce115eaf
Commit message:
Commit inicial mesmo.

Changed in this revision

Headers/Capture.h Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Headers/Capture.h	Thu Jan 14 17:26:05 2016 +0000
@@ -0,0 +1,56 @@
+/*
+ * 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"
+
+// MTR: Estes defines nao deveriam estar no arquivo de configuraçeos?
+//#define SAMPLE_RATE         256U
+
+
+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 unsigned short int m_AdcBuffers[2][NUMBER_OF_SAMPLES][NUMBER_OF_CHANNELS];    
+    
+public:
+
+    static unsigned short int GetValue(int nsamples, int nchannel);
+    static void CopyBuffer(int channel, unsigned short int *dest);
+    static void CopyBufferSigned(int channel, short int *dest);
+    static void CopyBufferFloat(int channel, float *dest);
+
+    static void ISRHandler();
+
+    static void Initialize();
+    static void Start();
+    static void Stop();
+    static void Wait();        
+
+    static void ReadRFID(int channel,char *rfid);
+
+};
+
+#endif
\ No newline at end of file