Changeset 8582076 in mainline
- Timestamp:
- 2013-01-27T18:44:16Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 70a422b
- Parents:
- fe9d542
- Location:
- uspace/lib/usbdev
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/include/usb/dev/pipes.h
rfe9d542 r8582076 42 42 #include <usb/descriptor.h> 43 43 #include <usb/dev/usb_device_connection.h> 44 #include <usb_iface.h> 44 45 45 46 #define CTRL_PIPE_MIN_PACKET_SIZE 8 … … 69 70 */ 70 71 bool auto_reset_halt; 72 73 usb_dev_session_t *bus_session; 71 74 } usb_pipe_t; 72 75 … … 106 109 107 110 int usb_pipe_initialize(usb_pipe_t *, usb_device_connection_t *, 108 usb_endpoint_t, usb_transfer_type_t, size_t, usb_direction_t); 111 usb_endpoint_t, usb_transfer_type_t, size_t, usb_direction_t, 112 usb_dev_session_t *); 109 113 int usb_pipe_initialize_default_control(usb_pipe_t *, 110 usb_device_connection_t * );114 usb_device_connection_t *, usb_dev_session_t *); 111 115 112 116 int usb_pipe_probe_default_control(usb_pipe_t *); 113 117 int usb_pipe_initialize_from_configuration(usb_endpoint_mapping_t *, 114 size_t, const uint8_t *, size_t, usb_device_connection_t *); 118 size_t, const uint8_t *, size_t, usb_device_connection_t *, 119 usb_dev_session_t *); 115 120 116 121 int usb_pipe_register(usb_pipe_t *, unsigned); -
uspace/lib/usbdev/src/devdrv.c
rfe9d542 r8582076 237 237 int rc = usb_pipe_initialize_from_configuration(pipes, pipe_count, 238 238 usb_dev->descriptors.full_config, 239 usb_dev->descriptors.full_config_size, &usb_dev->wire); 239 usb_dev->descriptors.full_config_size, &usb_dev->wire, 240 usb_dev->bus_session); 240 241 if (rc != EOK) { 241 242 free(pipes); … … 454 455 * during device initialization. */ 455 456 rc = usb_pipe_initialize_default_control( 456 &usb_dev->ctrl_pipe, &usb_dev->wire );457 &usb_dev->ctrl_pipe, &usb_dev->wire, usb_dev->bus_session); 457 458 if (rc != EOK) { 458 459 usb_dev_disconnect(usb_dev->bus_session); -
uspace/lib/usbdev/src/pipes.c
rfe9d542 r8582076 273 273 usb_device_connection_t *connection, usb_endpoint_t endpoint_no, 274 274 usb_transfer_type_t transfer_type, size_t max_packet_size, 275 usb_direction_t direction )275 usb_direction_t direction, usb_dev_session_t *bus_session) 276 276 { 277 277 assert(pipe); … … 284 284 pipe->direction = direction; 285 285 pipe->auto_reset_halt = false; 286 pipe->bus_session = bus_session; 286 287 287 288 return EOK; … … 295 296 */ 296 297 int usb_pipe_initialize_default_control(usb_pipe_t *pipe, 297 usb_device_connection_t *connection )298 usb_device_connection_t *connection, usb_dev_session_t *bus_session) 298 299 { 299 300 assert(pipe); … … 301 302 302 303 int rc = usb_pipe_initialize(pipe, connection, 0, USB_TRANSFER_CONTROL, 303 CTRL_PIPE_MIN_PACKET_SIZE, USB_DIRECTION_BOTH );304 CTRL_PIPE_MIN_PACKET_SIZE, USB_DIRECTION_BOTH, bus_session); 304 305 305 306 pipe->auto_reset_halt = true; -
uspace/lib/usbdev/src/pipesinit.c
rfe9d542 r8582076 155 155 usb_standard_interface_descriptor_t *interface, 156 156 usb_standard_endpoint_descriptor_t *endpoint_desc, 157 usb_device_connection_t *wire )157 usb_device_connection_t *wire, usb_dev_session_t *bus_session) 158 158 { 159 159 … … 196 196 ep_no, description.transfer_type, 197 197 uint16_usb2host(endpoint_desc->max_packet_size), 198 description.direction );198 description.direction, bus_session); 199 199 if (rc != EOK) { 200 200 return rc; … … 220 220 usb_endpoint_mapping_t *mapping, size_t mapping_count, 221 221 const usb_dp_parser_t *parser, const usb_dp_parser_data_t *parser_data, 222 const uint8_t *interface_descriptor )222 const uint8_t *interface_descriptor, usb_dev_session_t *bus_session) 223 223 { 224 224 const uint8_t *descriptor = usb_dp_get_nested_descriptor(parser, … … 236 236 (usb_standard_endpoint_descriptor_t *) 237 237 descriptor, 238 (usb_device_connection_t *) parser_data->arg); 238 (usb_device_connection_t *) parser_data->arg, 239 bus_session); 239 240 } 240 241 … … 280 281 usb_endpoint_mapping_t *mapping, size_t mapping_count, 281 282 const uint8_t *config_descriptor, size_t config_descriptor_size, 282 usb_device_connection_t *connection )283 usb_device_connection_t *connection, usb_dev_session_t *bus_session) 283 284 { 284 285 assert(connection); … … 319 320 do { 320 321 (void) process_interface(mapping, mapping_count, 321 &dp_parser, &dp_data, interface );322 &dp_parser, &dp_data, interface, bus_session); 322 323 interface = usb_dp_get_sibling_descriptor(&dp_parser, &dp_data, 323 324 config_descriptor, interface);
Note:
See TracChangeset
for help on using the changeset viewer.