USB host library, support isochronous,bulk,interrupt and control.

Dependents:   BaseUsbHost_example BaseJpegDecode_example SimpleJpegDecode_example

Import programBaseUsbHost_example

BaseUsbHost example program

Revision:
5:8a2d056e9b38
Parent:
4:d931d24c2f81
--- a/BaseUsbHost.h	Fri Jan 25 14:51:33 2013 +0000
+++ b/BaseUsbHost.h	Mon Feb 11 12:00:47 2013 +0000
@@ -1,6 +1,7 @@
-// BaseUsbHost.h 2013/1/24
+// BaseUsbHost.h 2013/2/11
 #pragma once
 #include <vector>
+#include <string>
 
 #define USB_OK            0
 #define USB_PROCESSING   -1
@@ -82,6 +83,12 @@
     uint8_t bInterval;        // +6
 };                            // +7
 
+struct StandardStringDescriptor {// offset
+    uint8_t bLength;          // +0
+    uint8_t bDescriptorType;  // +1
+    char bString[0];          // +2
+};                            // +3
+
 struct HubDescriptor {        // offset
     uint8_t bDescLength;      // +0
     uint8_t bDescriptorType;  // +1
@@ -333,6 +340,7 @@
     int GetInterface(int interface, int *alternate);
     int controlSend(uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex=0, const uint8_t* data=NULL, int length=0);
     int controlReceive(uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint8_t* data, int length);
+    string GetStringDescriptor(int index);
 private:
     int open(int addr);
     virtual void enable(){};