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.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/firmware/usbstack/usb_class_driver.h b/firmware/usbstack/usb_class_driver.h
index b037e1dec2..22b1c6888c 100644
--- a/firmware/usbstack/usb_class_driver.h
+++ b/firmware/usbstack/usb_class_driver.h
@@ -25,14 +25,14 @@
25/* Common api, implemented by all class drivers */ 25/* Common api, implemented by all class drivers */
26 26
27struct usb_class_driver { 27struct usb_class_driver {
28 /* First some runtime data */ 28 /* First some runtime data */
29 bool enabled; 29 bool enabled;
30 int first_interface; 30 int first_interface;
31 int last_interface; 31 int last_interface;
32 32
33 /* Driver api starts here */ 33 /* Driver api starts here */
34 34
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_storage; 36 bool needs_exclusive_storage;
37 37
38 /* Let the driver request endpoints it need. Returns zero on success */ 38 /* Let the driver request endpoints it need. Returns zero on success */
@@ -52,7 +52,7 @@ struct usb_class_driver {
52 int (*get_config_descriptor)(unsigned char *dest, int max_packet_size); 52 int (*get_config_descriptor)(unsigned char *dest, int max_packet_size);
53 53
54 /* Tells the driver that a usb connection has been set up and is now 54 /* Tells the driver that a usb connection has been set up and is now
55 ready to use. 55 ready to use.
56 Optional function */ 56 Optional function */
57 void (*init_connection)(void); 57 void (*init_connection)(void);
58 58
@@ -62,24 +62,24 @@ struct usb_class_driver {
62 Optional function */ 62 Optional function */
63 void (*init)(void); 63 void (*init)(void);
64 64
65 /* Tells the driver that the usb connection is no longer active 65 /* Tells the driver that the usb connection is no longer active
66 Optional function */ 66 Optional function */
67 void (*disconnect)(void); 67 void (*disconnect)(void);
68 68
69 /* Tells the driver that a usb transfer has been completed. Note that "dir" 69 /* Tells the driver that a usb transfer has been completed. Note that "dir"
70 is relative to the host 70 is relative to the host
71 Optional function */ 71 Optional function */
72 void (*transfer_complete)(int ep,int dir, int status, int length); 72 void (*transfer_complete)(int ep,int dir, int status, int length);
73 73
74 /* 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
75 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
76 it should return false. 76 it should return false.
77 Optional function */ 77 Optional function */
78 bool (*control_request)(struct usb_ctrlrequest* req); 78 bool (*control_request)(struct usb_ctrlrequest* req);
79 79
80#ifdef HAVE_HOTSWAP 80#ifdef HAVE_HOTSWAP
81 /* Tells the driver that a hotswappable disk/card was inserted or 81 /* Tells the driver that a hotswappable disk/card was inserted or
82 extracted 82 extracted
83 Optional function */ 83 Optional function */
84 void (*notify_hotswap)(int volume, bool inserted); 84 void (*notify_hotswap)(int volume, bool inserted);
85#endif 85#endif