Changeset f18d82f0 in mainline for uspace/lib/usbhost/src/batch.c
- Timestamp:
- 2011-08-31T21:45:59Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9c10e51
- Parents:
- 70fb822
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/batch.c
r70fb822 rf18d82f0 84 84 * 85 85 */ 86 void usb_transfer_batch_finish(usb_transfer_batch_t *instance) 86 void usb_transfer_batch_finish( 87 usb_transfer_batch_t *instance, const void *data, size_t size) 87 88 { 88 89 assert(instance); 89 if (instance->next_step) 90 instance->next_step(instance); 90 assert(instance->ep); 91 /* we care about the data and there are some to copy */ 92 if (instance->ep->direction != USB_DIRECTION_OUT 93 && data) { 94 const size_t min_size = 95 size < instance->buffer_size ? size : instance->buffer_size; 96 memcpy(instance->buffer, data, min_size); 97 } 98 if (instance->callback_out) 99 usb_transfer_batch_call_out(instance); 100 if (instance->callback_in) 101 usb_transfer_batch_call_in(instance); 102 91 103 } 92 104 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.