Changeset 33b88723 in mainline
- Timestamp:
- 2011-01-30T23:39:33Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 284c629
- Parents:
- fe4dd14
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/pipes.c
rfe4dd14 r33b88723 264 264 void *data_buffer, size_t data_buffer_size, size_t *data_transfered_size) 265 265 { 266 return ENOTSUP; 266 assert(pipe); 267 268 int rc; 269 usb_handle_t handle; 270 271 rc = usb_endpoint_pipe_async_control_read(pipe, 272 setup_buffer, setup_buffer_size, 273 data_buffer, data_buffer_size, data_transfered_size, 274 &handle); 275 if (rc != EOK) { 276 return rc; 277 } 278 279 rc = usb_endpoint_pipe_wait_for(pipe, handle); 280 return rc; 267 281 } 268 282 … … 283 297 void *data_buffer, size_t data_buffer_size) 284 298 { 285 return ENOTSUP; 299 assert(pipe); 300 301 int rc; 302 usb_handle_t handle; 303 304 rc = usb_endpoint_pipe_async_control_write(pipe, 305 setup_buffer, setup_buffer_size, 306 data_buffer, data_buffer_size, 307 &handle); 308 if (rc != EOK) { 309 return rc; 310 } 311 312 rc = usb_endpoint_pipe_wait_for(pipe, handle); 313 return rc; 286 314 } 287 315 … … 391 419 usb_handle_t *handle) 392 420 { 393 return ENOTSUP; 421 assert(pipe); 422 423 if (pipe->hc_phone < 0) { 424 return EBADF; 425 } 426 427 if ((pipe->direction != USB_DIRECTION_BOTH) 428 || (pipe->transfer_type != USB_TRANSFER_CONTROL)) { 429 return EBADF; 430 } 431 432 int rc; 433 _PREPARE_TARGET(target, pipe); 434 435 rc = usb_drv_async_control_read(pipe->hc_phone, target, 436 setup_buffer, setup_buffer_size, 437 data_buffer, data_buffer_size, data_transfered_size, 438 handle); 439 440 return rc; 394 441 } 395 442 … … 412 459 usb_handle_t *handle) 413 460 { 414 return ENOTSUP; 461 assert(pipe); 462 463 if (pipe->hc_phone < 0) { 464 return EBADF; 465 } 466 467 if ((pipe->direction != USB_DIRECTION_BOTH) 468 || (pipe->transfer_type != USB_TRANSFER_CONTROL)) { 469 return EBADF; 470 } 471 472 int rc; 473 _PREPARE_TARGET(target, pipe); 474 475 rc = usb_drv_async_control_write(pipe->hc_phone, target, 476 setup_buffer, setup_buffer_size, 477 data_buffer, data_buffer_size, 478 handle); 479 480 return rc; 415 481 } 416 482
Note:
See TracChangeset
for help on using the changeset viewer.