Changes in uspace/lib/usbdev/include/usb/dev/driver.h [77ad86c:b803845] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/include/usb/dev/driver.h
r77ad86c rb803845 33 33 * USB device driver framework. 34 34 */ 35 36 35 #ifndef LIBUSBDEV_DRIVER_H_ 37 36 #define LIBUSBDEV_DRIVER_H_ 38 37 39 #include <usb/hc.h>40 #include <usb/dev/usb_device_connection.h>41 38 #include <usb/dev/pipes.h> 42 39 … … 75 72 /** USB device structure. */ 76 73 typedef struct { 77 /** Connection to USB hc, used by wire and arbitrary requests. */78 usb_hc_connection_t hc_conn;79 /** Connection backing the pipes.80 * Typically, you will not need to use this attribute at all.81 */82 usb_device_connection_t wire;83 74 /** The default control pipe. */ 84 75 usb_pipe_t ctrl_pipe; … … 96 87 int interface_no; 97 88 98 /** Alternative interfaces. */ 99 usb_alternate_interfaces_t alternate_interfaces; 89 /** Alternative interfaces. 90 * Set to NULL when the driver controls whole device 91 * (i.e. more (or any) interfaces). 92 */ 93 usb_alternate_interfaces_t *alternate_interfaces; 100 94 101 95 /** Some useful descriptors. */ 102 96 usb_device_descriptors_t descriptors; 103 97 104 /** Generic DDF device backing this one. DO NOT TOUCH!*/98 /** Generic DDF device backing this one. RO: DO NOT TOUCH!*/ 105 99 ddf_dev_t *ddf_dev; 106 100 /** Custom driver data. … … 109 103 */ 110 104 void *driver_data; 105 106 /** Connection backing the pipes. 107 * Typically, you will not need to use this attribute at all. 108 */ 109 usb_device_connection_t wire; 111 110 } usb_device_t; 112 111 … … 162 161 } usb_driver_t; 163 162 164 int usb_driver_main(const usb_driver_t *); 165 166 int usb_device_init(usb_device_t *, ddf_dev_t *, 167 const usb_endpoint_description_t **, const char **); 168 void usb_device_deinit(usb_device_t *); 163 int usb_driver_main(usb_driver_t *); 169 164 170 165 int usb_device_select_interface(usb_device_t *, uint8_t, … … 172 167 173 168 int usb_device_retrieve_descriptors(usb_pipe_t *, usb_device_descriptors_t *); 174 void usb_device_release_descriptors(usb_device_descriptors_t *); 175 176 int usb_device_create_pipes(usb_device_connection_t *, 169 int usb_device_create_pipes(const ddf_dev_t *, usb_device_connection_t *, 177 170 const usb_endpoint_description_t **, const uint8_t *, size_t, int, int, 178 171 usb_endpoint_mapping_t **, size_t *); 179 void usb_device_destroy_pipes(usb_endpoint_mapping_t *, size_t); 180 172 int usb_device_destroy_pipes(const ddf_dev_t *, usb_endpoint_mapping_t *, size_t); 173 int usb_device_create(ddf_dev_t *, const usb_endpoint_description_t **, 174 usb_device_t **, const char **); 175 void usb_device_deinit(usb_device_t *); 181 176 void * usb_device_data_alloc(usb_device_t *, size_t); 182 177 183 178 size_t usb_interface_count_alternates(const uint8_t *, size_t, uint8_t); 184 int usb_alternate_interfaces_ init(usb_alternate_interfaces_t *,185 const uint8_t *, size_t, int);186 void usb_alternate_interfaces_deinit(usb_alternate_interfaces_t *); 179 int usb_alternate_interfaces_create(const uint8_t *, size_t, int, 180 usb_alternate_interfaces_t **); 181 187 182 #endif 188 183 /**
Note:
See TracChangeset
for help on using the changeset viewer.