Changeset b591cab in mainline
- Timestamp:
- 2012-12-22T20:47:25Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f8d43aa
- Parents:
- 56a07e0
- Location:
- uspace/lib/usbhost
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
r56a07e0 rb591cab 80 80 */ 81 81 int error; 82 83 /** Driver specific data */84 void *private_data;85 /** Callback to properly remove driver data during destruction */86 void (*private_data_dtor)(void *p_data);87 82 } usb_transfer_batch_t; 88 83 … … 109 104 usbhc_iface_transfer_out_callback_t func_out, 110 105 void *arg, 111 ddf_fun_t *fun, 112 void *private_data, 113 void (*private_data_dtor)(void *p_data) 106 ddf_fun_t *fun 114 107 ); 115 108 void usb_transfer_batch_destroy(const usb_transfer_batch_t *instance); -
uspace/lib/usbhost/src/hcd.c
r56a07e0 rb591cab 109 109 usb_transfer_batch_t *batch = 110 110 usb_transfer_batch_create(ep, data, size, setup_data, 111 in, out, arg, fun , NULL, NULL);111 in, out, arg, fun); 112 112 if (!batch) { 113 113 return ENOMEM; -
uspace/lib/usbhost/src/usb_transfer_batch.c
r56a07e0 rb591cab 62 62 usbhc_iface_transfer_out_callback_t func_out, 63 63 void *arg, 64 ddf_fun_t *fun, 65 void *private_data, 66 void (*private_data_dtor)(void *) 64 ddf_fun_t *fun 67 65 ) 68 66 { … … 82 80 instance->setup_size = 0; 83 81 instance->fun = fun; 84 instance->private_data = private_data;85 instance->private_data_dtor = private_data_dtor;86 82 instance->transfered_size = 0; 87 83 instance->error = EOK; … … 109 105 if (instance->ep) { 110 106 endpoint_release(instance->ep); 111 }112 if (instance->private_data) {113 assert(instance->private_data_dtor);114 instance->private_data_dtor(instance->private_data);115 107 } 116 108 free(instance);
Note:
See TracChangeset
for help on using the changeset viewer.