Changes in uspace/lib/usbdev/include/usb/dev/driver.h [b803845:77ad86c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/include/usb/dev/driver.h
rb803845 r77ad86c 33 33 * USB device driver framework. 34 34 */ 35 35 36 #ifndef LIBUSBDEV_DRIVER_H_ 36 37 #define LIBUSBDEV_DRIVER_H_ 37 38 39 #include <usb/hc.h> 40 #include <usb/dev/usb_device_connection.h> 38 41 #include <usb/dev/pipes.h> 39 42 … … 72 75 /** USB device structure. */ 73 76 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; 74 83 /** The default control pipe. */ 75 84 usb_pipe_t ctrl_pipe; … … 87 96 int interface_no; 88 97 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; 98 /** Alternative interfaces. */ 99 usb_alternate_interfaces_t alternate_interfaces; 94 100 95 101 /** Some useful descriptors. */ 96 102 usb_device_descriptors_t descriptors; 97 103 98 /** Generic DDF device backing this one. RO: DO NOT TOUCH!*/104 /** Generic DDF device backing this one. DO NOT TOUCH! */ 99 105 ddf_dev_t *ddf_dev; 100 106 /** Custom driver data. … … 103 109 */ 104 110 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;110 111 } usb_device_t; 111 112 … … 161 162 } usb_driver_t; 162 163 163 int usb_driver_main(usb_driver_t *); 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 *); 164 169 165 170 int usb_device_select_interface(usb_device_t *, uint8_t, … … 167 172 168 173 int usb_device_retrieve_descriptors(usb_pipe_t *, usb_device_descriptors_t *); 169 int usb_device_create_pipes(const ddf_dev_t *, usb_device_connection_t *, 174 void usb_device_release_descriptors(usb_device_descriptors_t *); 175 176 int usb_device_create_pipes(usb_device_connection_t *, 170 177 const usb_endpoint_description_t **, const uint8_t *, size_t, int, int, 171 178 usb_endpoint_mapping_t **, size_t *); 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 *); 179 void usb_device_destroy_pipes(usb_endpoint_mapping_t *, size_t); 180 176 181 void * usb_device_data_alloc(usb_device_t *, size_t); 177 182 178 183 size_t usb_interface_count_alternates(const uint8_t *, size_t, uint8_t); 179 int usb_alternate_interfaces_ create(const uint8_t *, size_t, int,180 usb_alternate_interfaces_t **);181 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 *); 182 187 #endif 183 188 /**
Note:
See TracChangeset
for help on using the changeset viewer.