Programa mbed1 excelencia

Dependencies:   mbed

Committer:
JuanManuelAmador
Date:
Wed Jan 18 12:58:15 2017 +0000
Revision:
0:a5908bca4740
primer commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JuanManuelAmador 0:a5908bca4740 1 #ifndef BUFFERING_H
JuanManuelAmador 0:a5908bca4740 2 #define BUFFERING_H
JuanManuelAmador 0:a5908bca4740 3
JuanManuelAmador 0:a5908bca4740 4 #include "mbed.h"
JuanManuelAmador 0:a5908bca4740 5
JuanManuelAmador 0:a5908bca4740 6 #define BUFFERSIZEBIG 300
JuanManuelAmador 0:a5908bca4740 7 // Buffering de datos tipo float
JuanManuelAmador 0:a5908bca4740 8 class Buffering
JuanManuelAmador 0:a5908bca4740 9 {
JuanManuelAmador 0:a5908bca4740 10 private:
JuanManuelAmador 0:a5908bca4740 11 unsigned char data[BUFFERSIZEBIG];
JuanManuelAmador 0:a5908bca4740 12 unsigned int windex;
JuanManuelAmador 0:a5908bca4740 13 unsigned int rindex;
JuanManuelAmador 0:a5908bca4740 14 bool full;
JuanManuelAmador 0:a5908bca4740 15 bool empty;
JuanManuelAmador 0:a5908bca4740 16 unsigned int bufSize;
JuanManuelAmador 0:a5908bca4740 17 public:
JuanManuelAmador 0:a5908bca4740 18 Buffering();
JuanManuelAmador 0:a5908bca4740 19 void put(unsigned char val);
JuanManuelAmador 0:a5908bca4740 20 unsigned char get();
JuanManuelAmador 0:a5908bca4740 21 int getSize();
JuanManuelAmador 0:a5908bca4740 22 bool isFull();
JuanManuelAmador 0:a5908bca4740 23 bool isEmpty();
JuanManuelAmador 0:a5908bca4740 24 unsigned int getWritingIndex();
JuanManuelAmador 0:a5908bca4740 25 unsigned int getReadingIndex();
JuanManuelAmador 0:a5908bca4740 26 unsigned int getDif();
JuanManuelAmador 0:a5908bca4740 27 };
JuanManuelAmador 0:a5908bca4740 28
JuanManuelAmador 0:a5908bca4740 29 #endif // BUFFERING_H
JuanManuelAmador 0:a5908bca4740 30