aboutsummaryrefslogtreecommitdiffstats
path: root/core/usb/descriptors.h
diff options
context:
space:
mode:
authorAJM <poslathian@poslathian.(none)>2010-04-19 17:06:25 -0400
committerbnewbold <bnewbold@robocracy.org>2010-05-20 22:09:15 -0400
commit06f5a1d3ec3f54a4a6ec9bbe6b9e7c45d9c18c7c (patch)
treecb9495581dd001a18f1288b9e8a638fae6e13708 /core/usb/descriptors.h
parenta81a7475f55feb33116a9101c9c24f9568f28678 (diff)
downloadlibrambutan-06f5a1d3ec3f54a4a6ec9bbe6b9e7c45d9c18c7c.tar.gz
librambutan-06f5a1d3ec3f54a4a6ec9bbe6b9e7c45d9c18c7c.zip
added the string descriptors to the descriptor set so that when you plug in the device it can actually report "LeafLabs Maple R3"
Diffstat (limited to 'core/usb/descriptors.h')
-rw-r--r--core/usb/descriptors.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/usb/descriptors.h b/core/usb/descriptors.h
index 1463221..1beabcc 100644
--- a/core/usb/descriptors.h
+++ b/core/usb/descriptors.h
@@ -18,6 +18,8 @@
uint8 Data[DataSize]; \
}
+#define USB_DESCRIPTOR_STRING_LEN(x) (2 + (x << 1))
+
typedef struct {
uint8 bLength;
uint8 bDescriptorType;
@@ -78,7 +80,13 @@ typedef struct {
USB_Descriptor_Interface DCI_Interface;
USB_Descriptor_Endpoint DataOutEndpoint;
USB_Descriptor_Endpoint DataInEndpoint;
-} USB_Descriptor_Configuration;
+}USB_Descriptor_Configuration;
+
+typedef struct {
+ uint8 bLength;
+ uint8 bDescriptorType;
+ uint16 bString[];
+} USB_Descriptor_String;
#if defined(__cplusplus)