renamed class CircBuffer to CircularBuffer WiflyInterface library already has a class named CircBuffer. When using this USBDevice library with WiflyInterface library, compilation error occurs stating that CircBuffer is already defined.
Fork of USBDevice by
Diff: USBSerial/CircBuffer.h
- Revision:
- 17:ac55820c1ae7
- Parent:
- 14:d495202c90f4
--- a/USBSerial/CircBuffer.h Thu Dec 05 13:00:15 2013 +0000 +++ b/USBSerial/CircBuffer.h Fri Dec 06 08:00:44 2013 +0000 @@ -16,20 +16,20 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef CIRCBUFFER_H -#define CIRCBUFFER_H +#ifndef CIRCULARBUFFER_H +#define CIRCULARBUFFER_H template <class T> -class CircBuffer { +class CircularBuffer { public: - CircBuffer(int length) { + CircularBuffer(int length) { write = 0; read = 0; size = length + 1; buf = (T *)malloc(size * sizeof(T)); }; - ~CircBuffer() { + ~CircularBuffer() { free(buf); } @@ -71,3 +71,4 @@ }; #endif +