ECE 4180 - Final Project Team / Mbed 2 deprecated WalkieTalkie

Dependencies:   mbed 4DGL-uLCD-SE mbed-rtos nRF24L01P

Revision:
14:4637a9f02919
Child:
16:d0d3bb2fc3ce
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CircularBuf.h	Fri Apr 20 15:15:59 2018 +0000
@@ -0,0 +1,33 @@
+template <T>
+class CircularBuff {
+public:
+    CircularBuff(unsigned int size);
+    ~CircularBuff();
+    
+    // Pushes data onto the buffer
+    // Arguement:
+    //          data, The array of data to push
+    //          size, The amount of data in the array
+    void push(T* data, unsigned int size);
+    
+    
+    // Pops data from the buffer
+    // Arguement:
+    //          data, The array of data popped
+    //          size, The amount of data to pop
+    // Return:
+    //          Amount of data actually popped
+    unsigned int pop(T* data, unsigned int size);
+    
+    // Amount of data in the buffer
+    unsigned int size();
+    
+    // Clears the buffer completely
+    void clear();
+    
+private:
+    T* _data;
+    unsigned int _size;
+    unsigned int _start;
+    unsigned int _end;
+};
\ No newline at end of file