protegemed, aquisição via A/D simples utilizando interrupção do timer
Dependencies: EthernetInterface NTPClient mbed-rtos mbed
Fork of ptgm_semDMA by
Diff: Headers/Capture.h
- Revision:
- 1:8129536051df
- Parent:
- 0:fac116e94d44
diff -r fac116e94d44 -r 8129536051df Headers/Capture.h --- a/Headers/Capture.h Tue Jan 05 11:47:35 2016 +0000 +++ b/Headers/Capture.h Wed Jan 13 18:53:25 2016 +0000 @@ -33,15 +33,20 @@ //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 short int m_AdcBuffers[NUMBER_OF_CHANNELS][NUMBER_OF_SAMPLES]; + 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); @@ -51,11 +56,16 @@ //static void Initialize(); static void AcquireValues(); + static void InitializeAD(); + //static void Start(); //static void Stop(); //static void Wait(); static void ReadRFID(int channel,char *rfid); + + static void FcnTimerInt(void); + //static void AdInitialize(); };