summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/usbdescriptors.h15
-rw-r--r--include/usbdevice.h22
2 files changed, 36 insertions, 1 deletions
diff --git a/include/usbdescriptors.h b/include/usbdescriptors.h
index 2dec3b9..de1069f 100644
--- a/include/usbdescriptors.h
+++ b/include/usbdescriptors.h
@@ -241,6 +241,21 @@ struct usb_device_descriptor {
u8 bNumConfigurations;
} __attribute__ ((packed));
+#if defined(CONFIG_USBD_HS)
+struct usb_qualifier_descriptor {
+ u8 bLength;
+ u8 bDescriptorType;
+
+ u16 bcdUSB;
+ u8 bDeviceClass;
+ u8 bDeviceSubClass;
+ u8 bDeviceProtocol;
+ u8 bMaxPacketSize0;
+ u8 bNumConfigurations;
+ u8 breserved;
+} __attribute__ ((packed));
+#endif
+
struct usb_string_descriptor {
u8 bLength;
u8 bDescriptorType; /* 0x03 */
diff --git a/include/usbdevice.h b/include/usbdevice.h
index 4171636..3edaf8b 100644
--- a/include/usbdevice.h
+++ b/include/usbdevice.h
@@ -210,6 +210,10 @@ struct usb_bus_instance;
#define USB_DT_INTERFACE 0x04
#define USB_DT_ENDPOINT 0x05
+#if defined(CONFIG_USBD_HS)
+#define USB_DT_QUAL 0x06
+#endif
+
#define USB_DT_HID (USB_TYPE_CLASS | 0x01)
#define USB_DT_REPORT (USB_TYPE_CLASS | 0x02)
#define USB_DT_PHYSICAL (USB_TYPE_CLASS | 0x03)
@@ -291,7 +295,11 @@ struct usb_bus_instance;
* USB Spec Release number
*/
+#if defined(CONFIG_USBD_HS)
+#define USB_BCD_VERSION 0x0200
+#else
#define USB_BCD_VERSION 0x0110
+#endif
/*
@@ -565,6 +573,9 @@ struct usb_device_instance {
/* generic */
char *name;
struct usb_device_descriptor *device_descriptor; /* per device descriptor */
+#if defined(CONFIG_USBD_HS)
+ struct usb_qualifier_descriptor *qualifier_descriptor;
+#endif
void (*event) (struct usb_device_instance *device, usb_device_event_t event, int data);
@@ -657,8 +668,17 @@ struct usb_class_report_descriptor *usbd_device_class_report_descriptor_index( s
struct usb_endpoint_descriptor *usbd_device_endpoint_descriptor (struct usb_device_instance *, int, int, int, int, int);
int usbd_device_endpoint_transfersize (struct usb_device_instance *, int, int, int, int, int);
struct usb_string_descriptor *usbd_get_string (u8);
-struct usb_device_descriptor *usbd_device_device_descriptor (struct usb_device_instance *, int);
+struct usb_device_descriptor *usbd_device_device_descriptor(struct
+ usb_device_instance *, int);
+#if defined(CONFIG_USBD_HS)
+/*
+ * is_usbd_high_speed routine needs to be defined by specific gadget driver
+ * It returns TRUE if device enumerates at High speed
+ * Retuns FALSE otherwise
+ */
+int is_usbd_high_speed(void);
+#endif
int usbd_endpoint_halted (struct usb_device_instance *device, int endpoint);
void usbd_rcv_complete(struct usb_endpoint_instance *endpoint, int len, int urb_bad);
void usbd_tx_complete (struct usb_endpoint_instance *endpoint);