Versión de Firmware con funciones de RAM incorporadas.
Dependencies: mbed
Fork of VmRecorderV1dot1 by
Diff: RingBuffer/Buffering.h
- Revision:
- 0:3d456b8ce449
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/RingBuffer/Buffering.h Mon Jun 15 15:34:27 2015 +0000 @@ -0,0 +1,30 @@ +#ifndef BUFFERING_H +#define BUFFERING_H + +#include "mbed.h" + +#define BUFFERSIZE 600 +// Buffering de datos tipo float +class Buffering +{ +private: + int16_t data[BUFFERSIZE]; + unsigned int windex; + unsigned int rindex; + bool full; + bool empty; + unsigned int bufSize; +public: + Buffering(); + void put(int16_t val); + int16_t get(); + int getSize(); + bool isFull(); + bool isEmpty(); + unsigned int getWritingIndex(); + unsigned int getReadingIndex(); + unsigned int getDif(); +}; + +#endif // BUFFERING_H +