USB device stack; Added getter method for terminal_connected;

Fork of USBDevice by mbed official

Example of use:

#include "mbed.h"
#include "USBSerial.h"

USBSerial  pc;
DigitalOut blue_led(P0_20);

int main() {
    blue_led = 1;
    while(!pc.getTerminal_connected()); //Wait for serial terminal to connect...
    while(1) {
        blue_led = 0;
        wait(0.2);
        blue_led = 1;
        wait(0.2);
    }
}
Revision:
51:deafa44182d9
Parent:
47:a0cd9646ecd1
diff -r a3c50882f2c5 -r deafa44182d9 USBMSD/USBMSD.cpp
--- a/USBMSD/USBMSD.cpp	Mon Apr 20 10:45:54 2015 +0100
+++ b/USBMSD/USBMSD.cpp	Thu Apr 23 08:45:28 2015 +0100
@@ -135,10 +135,10 @@
 }
 
 void USBMSD::disconnect() {
+    USBDevice::disconnect();
     //De-allocate MSD page size:
     free(page);
     page = NULL;
-    USBDevice::disconnect();
 }
 
 void USBMSD::reset() {