![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Versão limpa em 04/09/2014. Telnet funcionando.
Dependencies: EthernetInterface mbed-rtos mbed NTPClient
Diff: Headers/Capture.h
- Revision:
- 42:d6f9ce115eaf
- Parent:
- 40:b87bbdb97ac7
- Child:
- 43:69afea5f5a4d
diff -r b87bbdb97ac7 -r d6f9ce115eaf Headers/Capture.h --- a/Headers/Capture.h Thu Jan 14 17:26:05 2016 +0000 +++ b/Headers/Capture.h Mon Jan 18 18:01:59 2016 +0000 @@ -19,36 +19,29 @@ #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 bool flag_capture; + static int cnt_buffer; + static int channel_number; + static int cnt_interrupt; - 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]; + //Usa buffe r de 256 * 2 valores para usar na FFT + static float m_AdcBuffers[NUMBER_OF_CHANNELS][NUMBER_OF_SAMPLES*2]; 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 float GetValue(int nsamples, int nchannel); + static void PutValue(int nsamples, int nchannel, float value); + static void CopyBuffer(int channel, float *dest); - static void ISRHandler(); - - static void Initialize(); - static void Start(); - static void Stop(); - static void Wait(); - + static void AcquireValues(); + static void InitializeAD(); + static void FcnTimerInt(void); + static void ReadRFID(int channel,char *rfid); };