Ring Buffer reconciled with RTOS. If with using RTOS, this lib is enabled Mutex. Default RingBuffer size is 256 Bytes, Max size is 1024 Bytes.

Dependents:   RN41 HC05 HC05 mySerial ... more

Revision:
3:dced590a2d1b
Parent:
2:db4675083c8c
diff -r db4675083c8c -r dced590a2d1b RingBuffer.h
--- a/RingBuffer.h	Mon Nov 02 06:59:10 2015 +0000
+++ b/RingBuffer.h	Thu Jan 21 06:21:06 2016 +0000
@@ -1,7 +1,6 @@
 /**
 Ring Buffer reconciled with RTOS.
 
-If with using RTOS, this lib is enabled Mutex.
 Default RingBuffer size is 256 Bytes, Max size is 1024 Bytes.
 */
 
@@ -41,11 +40,11 @@
 #include <string>
 
 #define MaxBufSize     1024
-
+/*
 #ifdef RTOS_H
 extern Mutex mutex;
 #endif
-
+*/
 class RingBuffer
 {
 public:
@@ -56,6 +55,10 @@
     /** Returned empty status of ringBuffer.
      */
     bool empty();
+    
+    /** Returned boolean of find CR(\r)
+     */
+    bool chkCR();
 
     /** Set char or string to ring-buffer.
      *  @param;     char or string.
@@ -69,6 +72,8 @@
      *  @return;    string: buffered string.
      */
     string get();
+    char getc();
+    string getLine();
     
 private:
     volatile bool _empty;