Programa mbed 2 excelencia
Dependencies: mbed
Diff: RingBuffer/BufferBig.h
- Revision:
- 0:5aeb9544a6fe
diff -r 000000000000 -r 5aeb9544a6fe RingBuffer/BufferBig.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/RingBuffer/BufferBig.h Wed Jan 18 13:00:27 2017 +0000 @@ -0,0 +1,30 @@ +#ifndef BUFFERBIG_H +#define BUFFERBIG_H + +#include "mbed.h" + +#define BUFFERSIZE 1000 +// Buffering de datos tipo float +class BufferBig +{ +private: + unsigned char data[BUFFERSIZE]; + unsigned int windex; + unsigned int rindex; + bool full; + bool empty; + unsigned int bufSize; +public: + BufferBig(); + void put(unsigned char val); + unsigned char get(); + int getSize(); + bool isFull(); + bool isEmpty(); + unsigned int getWritingIndex(); + unsigned int getReadingIndex(); + unsigned int getDif(); +}; + +#endif // BUFFERBIG_H +