![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Versão limpa em 04/09/2014. Telnet funcionando.
Dependencies: EthernetInterface mbed-rtos mbed NTPClient
Headers/Capture.h@42:d6f9ce115eaf, 2016-01-18 (annotated)
- Committer:
- rebonatto
- Date:
- Mon Jan 18 18:01:59 2016 +0000
- Revision:
- 42:d6f9ce115eaf
- Parent:
- 40:b87bbdb97ac7
- Child:
- 43:69afea5f5a4d
Aquisi??o pelo AD sem DMA. Com FFT e envio.; Buffer em dobro para ocupar o mesmo. Trava com acesso a telnet e processamento de eventos.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rebonatto | 40:b87bbdb97ac7 | 1 | /* |
rebonatto | 40:b87bbdb97ac7 | 2 | * capture.h |
rebonatto | 40:b87bbdb97ac7 | 3 | * |
rebonatto | 40:b87bbdb97ac7 | 4 | * Created on: |
rebonatto | 40:b87bbdb97ac7 | 5 | * Author: |
rebonatto | 40:b87bbdb97ac7 | 6 | */ |
rebonatto | 40:b87bbdb97ac7 | 7 | |
rebonatto | 40:b87bbdb97ac7 | 8 | #ifndef CAPTURE_H |
rebonatto | 40:b87bbdb97ac7 | 9 | #define CAPTURE_H |
rebonatto | 40:b87bbdb97ac7 | 10 | |
rebonatto | 40:b87bbdb97ac7 | 11 | #include <stdio.h> |
rebonatto | 40:b87bbdb97ac7 | 12 | #include <string.h> |
rebonatto | 40:b87bbdb97ac7 | 13 | #include <math.h> |
rebonatto | 40:b87bbdb97ac7 | 14 | |
rebonatto | 40:b87bbdb97ac7 | 15 | #include "mbed.h" |
rebonatto | 40:b87bbdb97ac7 | 16 | #include "rtos.h" |
rebonatto | 40:b87bbdb97ac7 | 17 | #include "dma.h" |
rebonatto | 40:b87bbdb97ac7 | 18 | #include "adc.h" |
rebonatto | 40:b87bbdb97ac7 | 19 | |
rebonatto | 40:b87bbdb97ac7 | 20 | #include "Settings.h" |
rebonatto | 40:b87bbdb97ac7 | 21 | |
rebonatto | 40:b87bbdb97ac7 | 22 | class Capture |
rebonatto | 40:b87bbdb97ac7 | 23 | { |
rebonatto | 40:b87bbdb97ac7 | 24 | |
rebonatto | 40:b87bbdb97ac7 | 25 | protected: |
rebonatto | 42:d6f9ce115eaf | 26 | static bool flag_capture; |
rebonatto | 42:d6f9ce115eaf | 27 | static int cnt_buffer; |
rebonatto | 42:d6f9ce115eaf | 28 | static int channel_number; |
rebonatto | 42:d6f9ce115eaf | 29 | static int cnt_interrupt; |
rebonatto | 40:b87bbdb97ac7 | 30 | |
rebonatto | 40:b87bbdb97ac7 | 31 | public: |
rebonatto | 42:d6f9ce115eaf | 32 | //Usa buffe r de 256 * 2 valores para usar na FFT |
rebonatto | 42:d6f9ce115eaf | 33 | static float m_AdcBuffers[NUMBER_OF_CHANNELS][NUMBER_OF_SAMPLES*2]; |
rebonatto | 40:b87bbdb97ac7 | 34 | |
rebonatto | 40:b87bbdb97ac7 | 35 | public: |
rebonatto | 40:b87bbdb97ac7 | 36 | |
rebonatto | 42:d6f9ce115eaf | 37 | static float GetValue(int nsamples, int nchannel); |
rebonatto | 42:d6f9ce115eaf | 38 | static void PutValue(int nsamples, int nchannel, float value); |
rebonatto | 42:d6f9ce115eaf | 39 | static void CopyBuffer(int channel, float *dest); |
rebonatto | 40:b87bbdb97ac7 | 40 | |
rebonatto | 42:d6f9ce115eaf | 41 | static void AcquireValues(); |
rebonatto | 42:d6f9ce115eaf | 42 | static void InitializeAD(); |
rebonatto | 42:d6f9ce115eaf | 43 | static void FcnTimerInt(void); |
rebonatto | 42:d6f9ce115eaf | 44 | |
rebonatto | 40:b87bbdb97ac7 | 45 | static void ReadRFID(int channel,char *rfid); |
rebonatto | 40:b87bbdb97ac7 | 46 | |
rebonatto | 40:b87bbdb97ac7 | 47 | }; |
rebonatto | 40:b87bbdb97ac7 | 48 | |
rebonatto | 40:b87bbdb97ac7 | 49 | #endif |