summaryrefslogtreecommitdiff
path: root/firmware/usbstack/usb_class_driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/usbstack/usb_class_driver.h')
-rw-r--r--firmware/usbstack/usb_class_driver.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/firmware/usbstack/usb_class_driver.h b/firmware/usbstack/usb_class_driver.h
index bda0b7663c..e089c488a8 100644
--- a/firmware/usbstack/usb_class_driver.h
+++ b/firmware/usbstack/usb_class_driver.h
@@ -35,6 +35,9 @@ struct usb_class_driver {
35 /* Set this to true if the driver needs exclusive disk access (e.g. usb storage) */ 35 /* Set this to true if the driver needs exclusive disk access (e.g. usb storage) */
36 bool needs_exclusive_ata; 36 bool needs_exclusive_ata;
37 37
38 /* Let the driver request endpoints it need. Returns zero on success */
39 int (*request_endpoints)(struct usb_class_driver *);
40
38 /* Tells the driver what its first interface number will be. The driver 41 /* Tells the driver what its first interface number will be. The driver
39 returns the number of the first available interface for the next driver 42 returns the number of the first available interface for the next driver
40 (i.e. a driver with one interface will return interface+1) 43 (i.e. a driver with one interface will return interface+1)
@@ -42,12 +45,6 @@ struct usb_class_driver {
42 Mandatory function */ 45 Mandatory function */
43 int (*set_first_interface)(int interface); 46 int (*set_first_interface)(int interface);
44 47
45 /* Tells the driver what its first endpoint pair number will be. The driver
46 returns the number of the first available endpoint pair for the next
47 driver (i.e. a driver with one endpoint pair will return endpoint +1)
48 Mandatory function */
49 int (*set_first_endpoint)(int endpoint);
50
51 /* Asks the driver to put the interface descriptor and all other 48 /* Asks the driver to put the interface descriptor and all other
52 needed descriptor for this driver at dest. 49 needed descriptor for this driver at dest.
53 Returns the number of bytes taken by these descriptors. 50 Returns the number of bytes taken by these descriptors.
@@ -69,10 +66,10 @@ struct usb_class_driver {
69 Optional function */ 66 Optional function */
70 void (*disconnect)(void); 67 void (*disconnect)(void);
71 68
72 /* Tells the driver that a usb transfer has been completed. Note that "in" 69 /* Tells the driver that a usb transfer has been completed. Note that "dir"
73 is relative to the host 70 is relative to the host
74 Optional function */ 71 Optional function */
75 void (*transfer_complete)(int ep,bool in, int status, int length); 72 void (*transfer_complete)(int ep,int dir, int status, int length);
76 73
77 /* Tells the driver that a control request has come in. If the driver is 74 /* Tells the driver that a control request has come in. If the driver is
78 able to handle it, it should ack the request, and return true. Otherwise 75 able to handle it, it should ack the request, and return true. Otherwise