Changeset 3954a63b in mainline for uspace/lib/usb/src/pipesio.c
- Timestamp:
- 2011-03-21T14:10:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 68b5ed6e
- Parents:
- a372663
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/pipesio.c
ra372663 r3954a63b 58 58 * @return Error code. 59 59 */ 60 static int usb_ endpoint_pipe_read_no_checks(usb_pipe_t *pipe,60 static int usb_pipe_read_no_checks(usb_pipe_t *pipe, 61 61 void *buffer, size_t size, size_t *size_transfered) 62 62 { … … 140 140 * @return Error code. 141 141 */ 142 int usb_ endpoint_pipe_read(usb_pipe_t *pipe,142 int usb_pipe_read(usb_pipe_t *pipe, 143 143 void *buffer, size_t size, size_t *size_transfered) 144 144 { … … 153 153 } 154 154 155 if (!usb_ endpoint_pipe_is_session_started(pipe)) {155 if (!usb_pipe_is_session_started(pipe)) { 156 156 return EBADF; 157 157 } … … 168 168 int rc; 169 169 170 rc = usb_ endpoint_pipe_read_no_checks(pipe, buffer, size, &act_size);170 rc = usb_pipe_read_no_checks(pipe, buffer, size, &act_size); 171 171 if (rc != EOK) { 172 172 return rc; … … 190 190 * @return Error code. 191 191 */ 192 static int usb_ endpoint_pipe_write_no_check(usb_pipe_t *pipe,192 static int usb_pipe_write_no_check(usb_pipe_t *pipe, 193 193 void *buffer, size_t size) 194 194 { … … 247 247 * @return Error code. 248 248 */ 249 int usb_ endpoint_pipe_write(usb_pipe_t *pipe,249 int usb_pipe_write(usb_pipe_t *pipe, 250 250 void *buffer, size_t size) 251 251 { … … 260 260 } 261 261 262 if (!usb_ endpoint_pipe_is_session_started(pipe)) {262 if (!usb_pipe_is_session_started(pipe)) { 263 263 return EBADF; 264 264 } … … 272 272 } 273 273 274 int rc = usb_ endpoint_pipe_write_no_check(pipe, buffer, size);274 int rc = usb_pipe_write_no_check(pipe, buffer, size); 275 275 276 276 return rc; … … 289 289 * @return Error code. 290 290 */ 291 static int usb_ endpoint_pipe_control_read_no_check(usb_pipe_t *pipe,291 static int usb_pipe_control_read_no_check(usb_pipe_t *pipe, 292 292 void *setup_buffer, size_t setup_buffer_size, 293 293 void *data_buffer, size_t data_buffer_size, size_t *data_transfered_size) … … 365 365 * @return Error code. 366 366 */ 367 int usb_ endpoint_pipe_control_read(usb_pipe_t *pipe,367 int usb_pipe_control_read(usb_pipe_t *pipe, 368 368 void *setup_buffer, size_t setup_buffer_size, 369 369 void *data_buffer, size_t data_buffer_size, size_t *data_transfered_size) … … 379 379 } 380 380 381 if (!usb_ endpoint_pipe_is_session_started(pipe)) {381 if (!usb_pipe_is_session_started(pipe)) { 382 382 return EBADF; 383 383 } … … 389 389 390 390 size_t act_size = 0; 391 int rc = usb_ endpoint_pipe_control_read_no_check(pipe,391 int rc = usb_pipe_control_read_no_check(pipe, 392 392 setup_buffer, setup_buffer_size, 393 393 data_buffer, data_buffer_size, &act_size); … … 414 414 * @return Error code. 415 415 */ 416 static int usb_ endpoint_pipe_control_write_no_check(usb_pipe_t *pipe,416 static int usb_pipe_control_write_no_check(usb_pipe_t *pipe, 417 417 void *setup_buffer, size_t setup_buffer_size, 418 418 void *data_buffer, size_t data_buffer_size) … … 473 473 * @return Error code. 474 474 */ 475 int usb_ endpoint_pipe_control_write(usb_pipe_t *pipe,475 int usb_pipe_control_write(usb_pipe_t *pipe, 476 476 void *setup_buffer, size_t setup_buffer_size, 477 477 void *data_buffer, size_t data_buffer_size) … … 491 491 } 492 492 493 if (!usb_ endpoint_pipe_is_session_started(pipe)) {493 if (!usb_pipe_is_session_started(pipe)) { 494 494 return EBADF; 495 495 } … … 500 500 } 501 501 502 int rc = usb_ endpoint_pipe_control_write_no_check(pipe,502 int rc = usb_pipe_control_write_no_check(pipe, 503 503 setup_buffer, setup_buffer_size, data_buffer, data_buffer_size); 504 504
Note:
See TracChangeset
for help on using the changeset viewer.