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: mbed
RingBuffer.h
- Committer:
- tmav123
- Date:
- 2010-11-21
- Revision:
- 0:9df942ea84f4
File content as of revision 0:9df942ea84f4:
/*
* 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