summaryrefslogtreecommitdiff
path: root/include/usbdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/usbdevice.h')
-rw-r--r--include/usbdevice.h22
1 files changed, 21 insertions, 1 deletions
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);