Changeset 2c381250 in mainline for uspace/lib/usbvirt/device.h
- Timestamp:
- 2010-10-13T06:49:48Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7da3219
- Parents:
- fd17ab5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbvirt/device.h
rfd17ab5 r2c381250 46 46 uint8_t *data); 47 47 48 /** Device operations. */ 48 49 typedef struct { 50 /** Callback for standard USB request. 51 * Called only when the request could not be handled by this 52 * framework. 53 */ 49 54 usbvirt_on_device_request_t on_devreq_std; 55 /** Callback for class-specific USB request. */ 50 56 usbvirt_on_device_request_t on_devreq_class; 57 /** Callback for all other incoming data. */ 51 58 int (*on_data)(struct usbvirt_device *dev, 52 59 usb_endpoint_t endpoint, void *buffer, size_t size); 53 60 } usbvirt_device_ops_t; 61 62 /** Extra configuration data for GET_CONFIGURATION request. */ 63 typedef struct { 64 /** Actual data. */ 65 uint8_t *data; 66 /** Data length. */ 67 size_t length; 68 } usbvirt_device_configuration_extras_t; 69 70 /** Single device configuration. */ 71 typedef struct { 72 /** Standard configuration descriptor. */ 73 usb_standard_configuration_descriptor_t *descriptor; 74 /** Array of extra data. */ 75 usbvirt_device_configuration_extras_t *extra; 76 /** Length of @c extra array. */ 77 size_t extra_count; 78 } usbvirt_device_configuration_t; 79 80 /** Standard USB descriptors. */ 81 typedef struct { 82 /** Standard device descriptor. 83 * There is always only one such descriptor for the device. 84 */ 85 usb_standard_device_descriptor_t *device; 86 87 /** Configurations. */ 88 usbvirt_device_configuration_t *configuration; 89 /** Number of configurations. */ 90 size_t configuration_count; 91 } usbvirt_descriptors_t; 92 54 93 55 94 typedef struct usbvirt_device { … … 69 108 /* Device attributes. */ 70 109 71 /** Standard device descriptor. 72 * If this descriptor is set (i.e. not NULL), the framework 73 * automatically handles call for its retrieval. 74 */ 75 usb_standard_device_descriptor_t *standard_descriptor; 110 /** Standard descriptors. */ 111 usbvirt_descriptors_t *descriptors; 76 112 77 113
Note:
See TracChangeset
for help on using the changeset viewer.