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:
5:d27e4c226965
Parent:
3:6d85e04fb59f
Child:
7:f8f057664123
diff -r eaa07ce86d49 -r d27e4c226965 USBMSD/USBMSD.cpp
--- a/USBMSD/USBMSD.cpp	Sun Oct 14 13:39:27 2012 +0000
+++ b/USBMSD/USBMSD.cpp	Sun Oct 14 15:08:52 2012 +0000
@@ -64,6 +64,9 @@
 
 
 USBMSD::USBMSD(uint16_t vendor_id, uint16_t product_id, uint16_t product_release): USBDevice(vendor_id, product_id, product_release) {
+    stage = READ_CBW;
+    memset((void *)&cbw, 0, sizeof(CBW));
+    memset((void *)&csw, 0, sizeof(CSW));
 }