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 BUFFERINGUINT_H
JuanManuelAmador 0:a5908bca4740 2 #define BUFFERINGUINT_H
JuanManuelAmador 0:a5908bca4740 3
JuanManuelAmador 0:a5908bca4740 4 #include "mbed.h"
JuanManuelAmador 0:a5908bca4740 5
JuanManuelAmador 0:a5908bca4740 6 #define BUFFERSIZE 100
JuanManuelAmador 0:a5908bca4740 7 // Buffering de datos tipo float
JuanManuelAmador 0:a5908bca4740 8 class Bufferinguint
JuanManuelAmador 0:a5908bca4740 9 {
JuanManuelAmador 0:a5908bca4740 10 private:
JuanManuelAmador 0:a5908bca4740 11 unsigned int data[BUFFERSIZE];
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 Bufferinguint();
JuanManuelAmador 0:a5908bca4740 19 void put(unsigned int val);
JuanManuelAmador 0:a5908bca4740 20 unsigned int 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