diff options
| author | Frank Gevaerts <frank@gevaerts.be> | 2008-10-03 22:43:16 +0000 |
|---|---|---|
| committer | Frank Gevaerts <frank@gevaerts.be> | 2008-10-03 22:43:16 +0000 |
| commit | 478fc5baed82e5573938041aed0f1a4f73f32128 (patch) | |
| tree | b7115cb1200101075bf93d93f61bd0be65ff9d42 /firmware/usbstack/usb_class_driver.h | |
| parent | 6219f4c862919367972e497c47324121fe48f3f6 (diff) | |
| download | rockbox-478fc5baed82e5573938041aed0f1a4f73f32128.zip rockbox-478fc5baed82e5573938041aed0f1a4f73f32128.tar.gz rockbox-478fc5baed82e5573938041aed0f1a4f73f32128.tar.bz2 rockbox-478fc5baed82e5573938041aed0f1a4f73f32128.tar.xz | |
reorganise the USB stack a bit to allow for easier integration of non-ARC controller drivers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18703 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usbstack/usb_class_driver.h')
| -rw-r--r-- | firmware/usbstack/usb_class_driver.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/firmware/usbstack/usb_class_driver.h b/firmware/usbstack/usb_class_driver.h index bda0b76..e089c48 100644 --- a/firmware/usbstack/usb_class_driver.h +++ b/firmware/usbstack/usb_class_driver.h @@ -35,6 +35,9 @@ struct usb_class_driver { /* Set this to true if the driver needs exclusive disk access (e.g. usb storage) */ bool needs_exclusive_ata; + /* Let the driver request endpoints it need. Returns zero on success */ + int (*request_endpoints)(struct usb_class_driver *); + /* Tells the driver what its first interface number will be. The driver returns the number of the first available interface for the next driver (i.e. a driver with one interface will return interface+1) @@ -42,12 +45,6 @@ struct usb_class_driver { Mandatory function */ int (*set_first_interface)(int interface); - /* Tells the driver what its first endpoint pair number will be. The driver - returns the number of the first available endpoint pair for the next - driver (i.e. a driver with one endpoint pair will return endpoint +1) - Mandatory function */ - int (*set_first_endpoint)(int endpoint); - /* Asks the driver to put the interface descriptor and all other needed descriptor for this driver at dest. Returns the number of bytes taken by these descriptors. @@ -69,10 +66,10 @@ struct usb_class_driver { Optional function */ void (*disconnect)(void); - /* Tells the driver that a usb transfer has been completed. Note that "in" + /* Tells the driver that a usb transfer has been completed. Note that "dir" is relative to the host Optional function */ - void (*transfer_complete)(int ep,bool in, int status, int length); + void (*transfer_complete)(int ep,int dir, int status, int length); /* Tells the driver that a control request has come in. If the driver is able to handle it, it should ack the request, and return true. Otherwise |