USB device stack

Dependents:   mbed-mX-USB-TEST1 USBMSD_SD_HID_HelloWorld HidTest MIDI_usb_bridge ... more

Legacy Warning

This is an mbed 2 library. To learn more about mbed OS 5, visit the docs.

Pull requests against this repository are no longer supported. Please raise against mbed OS 5 as documented above.

Revision:
14:d495202c90f4
Parent:
1:80ab0d068708
Child:
51:deafa44182d9
--- a/USBSerial/CircBuffer.h	Tue Sep 10 15:14:55 2013 +0300
+++ b/USBSerial/CircBuffer.h	Thu Sep 12 14:45:27 2013 +0100
@@ -29,6 +29,10 @@
         buf = (T *)malloc(size * sizeof(T));
     };
 
+    ~CircBuffer() {
+        free(buf);
+     }
+
     bool isFull() {
         return ((write + 1) % size == read);
     };