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.
RingBuffer.h
00001 /* 00002 * mbed library for RingBuffer 00003 * Copyright (c) 2010 Hiroshi Suga 00004 * Released under the MIT License: http://mbed.org/license/mit 00005 */ 00006 00007 #ifndef RingBuffer_H 00008 #define RingBuffer_H 00009 00010 #include "mbed.h" 00011 00012 class RingBuffer : public Stream { 00013 public: 00014 RingBuffer (int p_size); 00015 // ~RingBuffer (); 00016 00017 #if DOXYGEN_ONLY 00018 int putc(int c); 00019 int printf(const char* format, ...); 00020 #endif 00021 // int putc (char); 00022 int put (char *, int); 00023 char get (); 00024 int get (char *, int); 00025 void clear (); 00026 int available (); 00027 int use (); 00028 00029 private: 00030 // Stream implementation functions 00031 virtual int _putc(int value); 00032 virtual int _getc(); 00033 00034 char *buf; 00035 int size; 00036 int addr_w, addr_r; 00037 }; 00038 00039 #endif
Generated on Tue Jul 12 2022 21:30:38 by
1.7.2