Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Peripherals SD_Lib Time_Lib_v2 Year3_Version5 BMP280 LCDFunctions TextLCD BME280 Serial_Lib
Diff: Buffer/circular_buffer.cpp
- Revision:
- 8:dde5976445b4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Buffer/circular_buffer.cpp Fri Nov 23 20:12:19 2018 +0000
@@ -0,0 +1,46 @@
+
+#include "mbed.h"
+#include "data_types.hpp"
+#include "platform/CircularBuffer.h"
+#define BUF_SIZE 120
+
+class Buffer
+{
+ //Variables
+ public:
+
+ private:
+ CircularBuffer<SensorData, BUF_SIZE> buf;
+
+ protected:
+
+ //Functions
+ public:
+ Buffer()
+ {
+
+ //char data_stream[] = "DataToBeAddedToBuffer";
+ }
+ ~Buffer(){}
+ void write_buffer()
+ {
+ if (!buf.full())
+ {
+ //buf.push(data)
+ }
+ }
+ void read_buffer()
+ {
+
+ }
+ void store_buffer()
+ {
+
+ }
+ private:
+ protected:
+
+};
+
+
+
\ No newline at end of file