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.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/firmware/usbstack/usb_class_driver.h b/firmware/usbstack/usb_class_driver.h
index a9bc759a5b..c8d1e7047d 100644
--- a/firmware/usbstack/usb_class_driver.h
+++ b/firmware/usbstack/usb_class_driver.h
@@ -41,46 +41,46 @@ struct usb_class_driver {
41 /* 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
42 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
43 (i.e. a driver with one interface will return interface+1) 43 (i.e. a driver with one interface will return interface+1)
44 A driver must have at least one interface 44 A driver must have at least one interface
45 Mandatory function */ 45 Mandatory function */
46 int (*set_first_interface)(int interface); 46 int (*set_first_interface)(int interface);
47 47
48 /* Asks the driver to put the interface descriptor and all other 48 /* Asks the driver to put the interface descriptor and all other
49 needed descriptor for this driver at dest. 49 needed descriptor for this driver at dest.
50 Returns the number of bytes taken by these descriptors. 50 Returns the number of bytes taken by these descriptors.
51 Mandatory function */ 51 Mandatory function */
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
59 /* Initialises the driver. This can be called multiple times, 59 /* Initialises the driver. This can be called multiple times,
60 and should not perform any action that can disturb other threads 60 and should not perform any action that can disturb other threads
61 (like getting the audio buffer) 61 (like getting the audio buffer)
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, unsigned char *dest); 78 bool (*control_request)(struct usb_ctrlrequest* req, unsigned char *dest);
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
86}; 86};