aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/usb
diff options
context:
space:
mode:
authorGareth McMullin2011-12-28 21:04:36 +1300
committerGareth McMullin2011-12-28 21:05:41 +1300
commit0731bba610715fd385c0d97237b9c4d00178ab36 (patch)
tree1cb85edc56b2c4c8eeb83c05ec46481d9f669116 /include/libopencm3/usb
parent651917aeb4b76afbb6c4a859e9a7aab4978b5008 (diff)
usb: Added support for Interface Association descriptors.
Diffstat (limited to 'include/libopencm3/usb')
-rw-r--r--include/libopencm3/usb/usbstd.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/libopencm3/usb/usbstd.h b/include/libopencm3/usb/usbstd.h
index ee65b70..e77d5f8 100644
--- a/include/libopencm3/usb/usbstd.h
+++ b/include/libopencm3/usb/usbstd.h
@@ -75,6 +75,10 @@ struct usb_setup_data {
#define USB_DT_DEVICE_QUALIFIER 6
#define USB_DT_OTHER_SPEED_CONFIGURATION 7
#define USB_DT_INTERFACE_POWER 8
+/* From ECNs */
+#define USB_DT_OTG 9
+#define USB_DT_DEBUG 10
+#define USB_DT_INTERFACE_ASSOCIATION 11
/* USB Standard Feature Selectors - Table 9-6 */
#define USB_FEAT_ENDPOINT_HALT 0
@@ -134,6 +138,7 @@ struct usb_config_descriptor {
/* Descriptor ends here. The following are used internally: */
const struct usb_interface {
int num_altsetting;
+ const struct usb_iface_assoc_descriptor *iface_assoc;
const struct usb_interface_descriptor *altsetting;
} *interface;
} __attribute__((packed));
@@ -201,4 +206,18 @@ struct usb_string_descriptor {
u16 wData[];
} __attribute__((packed));
+/* From ECN: Interface Association Descriptors, Table 9-Z */
+struct usb_iface_assoc_descriptor {
+ u8 bLength;
+ u8 bDescriptorType;
+ u8 bFirstInterface;
+ u8 bInterfaceCount;
+ u8 bFunctionClass;
+ u8 bFunctionSubClass;
+ u8 bFunctionProtocol;
+ u8 iFunction;
+} __attribute__((packed));
+#define USB_DT_INTERFACE_ASSOCIATION_SIZE \
+ sizeof(struct usb_iface_assoc_descriptor)
+
#endif