USB Composite support

Dependents:   mbed_cdc_hid_composite

Fork of USBDevice by mbed official

Revision:
55:7c559fcb1d17
Parent:
43:c0605f23f916
diff -r 461d954eee6b -r 7c559fcb1d17 USBDevice/USBDevice.cpp
--- a/USBDevice/USBDevice.cpp	Fri May 22 08:45:47 2015 +0100
+++ b/USBDevice/USBDevice.cpp	Sun May 31 15:36:50 2015 +0000
@@ -987,6 +987,8 @@
 }
 
 uint8_t * USBDevice::stringIinterfaceDesc() {
+    if (_intf)
+        return _intf->stringIinterfaceDesc();
     static uint8_t stringIinterfaceDescriptor[] = {
         0x08,               /*bLength*/
         STRING_DESCRIPTOR,  /*bDescriptorType 0x03*/
@@ -996,6 +998,8 @@
 }
 
 uint8_t * USBDevice::stringIproductDesc() {
+    if (_intf)
+        return _intf->stringIproductDesc();
     static uint8_t stringIproductDescriptor[] = {
         0x16,                                                       /*bLength*/
         STRING_DESCRIPTOR,                                          /*bDescriptorType 0x03*/