Changeset 69334af in mainline for uspace/lib/usb/include/usb/devdrv.h
- Timestamp:
- 2011-03-13T17:18:55Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4bf94df
- Parents:
- 489c3e7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/devdrv.h
r489c3e7 r69334af 38 38 #include <usb/pipes.h> 39 39 40 /** USB device structure. */ 40 41 typedef struct { 42 /** The default control pipe. */ 41 43 usb_endpoint_pipe_t ctrl_pipe; 44 /** Other endpoint pipes. 45 * This is an array of other endpoint pipes in the same order as 46 * in usb_driver_t. 47 */ 42 48 usb_endpoint_mapping_t *pipes; 49 /** Generic DDF device backing this one. */ 43 50 ddf_dev_t *ddf_dev; 51 /** Custom driver data. 52 * Do not use the entry in generic device, that is already used 53 * by the framework. 54 */ 44 55 void *driver_data; 56 57 /** Connection backing the pipes. 58 * Typically, you will not need to use this attribute at all. 59 */ 45 60 usb_device_connection_t wire; 46 61 } usb_device_t; 47 62 63 /** USB driver ops. */ 48 64 typedef struct { 65 /** Callback when new device is about to be controlled by the driver. */ 49 66 int (*add_device)(usb_device_t *); 50 67 } usb_driver_ops_t; 51 68 69 /** USB driver structure. */ 52 70 typedef struct { 71 /** Driver name. 72 * This name is copied to the generic driver name and must be exactly 73 * the same as the directory name where the driver executable resides. 74 */ 53 75 const char *name; 76 /** Expected endpoints description. */ 54 77 usb_endpoint_description_t **endpoints; 78 /** Driver ops. */ 55 79 usb_driver_ops_t *ops; 56 80 } usb_driver_t;
Note:
See TracChangeset
for help on using the changeset viewer.