Versão do protegemed que calcula o tempo em ms da fuga, calcula o numero de onverflow (valores muito baixo) e underflow (valores muito altos). Além disso, calcula um valor médio a partir dos valores capturados e não apenas pela fft.
Dependencies: EthernetInterface mbed-rtos mbed
Diff: Headers/Capture.h
- Revision:
- 1:917ca6b5d9d9
- Parent:
- 0:c64e1194230b
--- a/Headers/Capture.h Wed Jul 09 21:16:23 2014 +0000 +++ b/Headers/Capture.h Fri Jul 18 20:24:45 2014 +0000 @@ -22,17 +22,19 @@ // 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]; - + static unsigned short int m_AdcBuffers[2][NUMBER_OF_SAMPLES][NUMBER_OF_CHANNELS]; + public: static unsigned short int GetValue(int nsamples, int nchannel); @@ -43,7 +45,9 @@ static void Initialize(); static void Start(); static void Stop(); - static void Wait(); + static void Wait(); + + void ReadRFID(int channel,char *rfid); };