Changeset b4b534ac in mainline for uspace/lib/usbdev/src/pipesinit.c
- Timestamp:
- 2016-07-22T08:24:47Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f76d2c2
- Parents:
- 5b18137 (diff), 8351f9a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/pipesinit.c
r5b18137 rb4b534ac 34 34 * 35 35 */ 36 #include <usb/usb.h>37 36 #include <usb/dev/pipes.h> 38 37 #include <usb/dev/dp.h> 39 38 #include <usb/dev/request.h> 39 #include <usb/usb.h> 40 #include <usb/descriptor.h> 41 42 #include <assert.h> 40 43 #include <errno.h> 41 #include <assert.h>42 44 43 45 #define DEV_DESCR_MAX_PACKET_SIZE_OFFSET 7 … … 148 150 * @param interface Interface descriptor under which belongs the @p endpoint. 149 151 * @param endpoint Endpoint descriptor. 150 * @param wire Connection backing the endpoint pipes.151 152 * @return Error code. 152 153 */ … … 155 156 usb_standard_interface_descriptor_t *interface, 156 157 usb_standard_endpoint_descriptor_t *endpoint_desc, 157 usb_dev ice_connection_t *wire)158 usb_dev_session_t *bus_session) 158 159 { 159 160 … … 193 194 } 194 195 195 int rc = usb_pipe_initialize(&ep_mapping->pipe, wire,196 int rc = usb_pipe_initialize(&ep_mapping->pipe, 196 197 ep_no, description.transfer_type, 197 uint16_usb2host(endpoint_desc->max_packet_size), 198 description.direction); 198 ED_MPS_PACKET_SIZE_GET( 199 uint16_usb2host(endpoint_desc->max_packet_size)), 200 description.direction, 201 ED_MPS_TRANS_OPPORTUNITIES_GET( 202 uint16_usb2host(endpoint_desc->max_packet_size)), bus_session); 199 203 if (rc != EOK) { 200 204 return rc; … … 220 224 usb_endpoint_mapping_t *mapping, size_t mapping_count, 221 225 const usb_dp_parser_t *parser, const usb_dp_parser_data_t *parser_data, 222 const uint8_t *interface_descriptor )226 const uint8_t *interface_descriptor, usb_dev_session_t *bus_session) 223 227 { 224 228 const uint8_t *descriptor = usb_dp_get_nested_descriptor(parser, … … 236 240 (usb_standard_endpoint_descriptor_t *) 237 241 descriptor, 238 (usb_device_connection_t *) parser_data->arg);242 bus_session); 239 243 } 240 244 … … 280 284 usb_endpoint_mapping_t *mapping, size_t mapping_count, 281 285 const uint8_t *config_descriptor, size_t config_descriptor_size, 282 usb_device_connection_t *connection) 283 { 284 assert(connection); 286 usb_dev_session_t *bus_session) 287 { 285 288 286 289 if (config_descriptor == NULL) { … … 306 309 .data = config_descriptor, 307 310 .size = config_descriptor_size, 308 .arg = connection309 311 }; 310 312 … … 319 321 do { 320 322 (void) process_interface(mapping, mapping_count, 321 &dp_parser, &dp_data, interface );323 &dp_parser, &dp_data, interface, bus_session); 322 324 interface = usb_dp_get_sibling_descriptor(&dp_parser, &dp_data, 323 325 config_descriptor, interface); … … 347 349 return EINVAL; 348 350 } 349 350 351 usb_pipe_start_long_transfer(pipe);352 351 353 352 uint8_t dev_descr_start[CTRL_PIPE_MIN_PACKET_SIZE]; … … 367 366 } 368 367 } 369 usb_pipe_end_long_transfer(pipe);370 368 if (rc != EOK) { 371 369 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.