Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterface mbed-rtos mbed
Capture.h
00001 /* 00002 * capture.h 00003 * 00004 * Created on: 00005 * Author: 00006 */ 00007 00008 #ifndef CAPTURE_H 00009 #define CAPTURE_H 00010 00011 #include <stdio.h> 00012 #include <string.h> 00013 #include <math.h> 00014 00015 #include "mbed.h" 00016 #include "rtos.h" 00017 #include "dma.h" 00018 #include "adc.h" 00019 00020 #include "Settings.h" 00021 00022 // MTR: Estes defines nao deveriam estar no arquivo de configuraçeos? 00023 //#define SAMPLE_RATE 256U 00024 00025 00026 class Capture 00027 { 00028 00029 protected: 00030 00031 static Semaphore m_CaptureSemaphore; //used to alert the capture thread about a ready capture 00032 static int m_BufferIndex; 00033 00034 static dmaLinkedListNode m_Nodes[2]; //this list holds the buffer configuration for the DMA peripheral 00035 public: 00036 static unsigned short int m_AdcBuffers[2][NUMBER_OF_SAMPLES][NUMBER_OF_CHANNELS]; 00037 00038 public: 00039 00040 static unsigned short int GetValue(int nsamples, int nchannel); 00041 static void CopyBuffer(int channel, unsigned short int *dest); 00042 00043 static void ISRHandler(); 00044 00045 static void Initialize(); 00046 static void Start(); 00047 static void Stop(); 00048 static void Wait(); 00049 00050 void ReadRFID(int channel,char *rfid); 00051 00052 }; 00053 00054 #endif
Generated on Fri Jul 22 2022 19:25:55 by
