Codebase from CC1101_Transceiver, ported to LPC1114/LPC824/STM32F103 and other micros, will be merged with panStamp project to replace AVR/MSP.

Dependencies:   mbed

Fork of CC1101_Transceiver_LPC1114 by Kai Liu

Revision:
0:9df942ea84f4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RingBuffer.h	Sun Nov 21 11:37:56 2010 +0000
@@ -0,0 +1,39 @@
+/*
+ * mbed library for RingBuffer
+ * Copyright (c) 2010 Hiroshi Suga
+ * Released under the MIT License: http://mbed.org/license/mit
+ */
+
+#ifndef RingBuffer_H
+#define RingBuffer_H
+
+#include "mbed.h"
+
+class RingBuffer : public Stream  {
+public:
+    RingBuffer (int p_size);
+//    ~RingBuffer ();
+
+#if DOXYGEN_ONLY
+    int putc(int c);
+    int printf(const char* format, ...);
+#endif
+//    int putc (char);
+    int put (char *, int);
+    char get ();
+    int get (char *, int);
+    void clear ();
+    int available ();
+    int use ();
+
+private:
+    // Stream implementation functions
+    virtual int _putc(int value);
+    virtual int _getc();
+
+    char *buf;
+    int size;
+    int addr_w, addr_r;
+};
+
+#endif