Changeset c4fb5ecd in mainline for uspace/lib/usbhost
- Timestamp:
- 2011-06-18T19:18:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 497b6f31
- Parents:
- 84eb7432
- Location:
- uspace/lib/usbhost
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/batch.h
r84eb7432 rc4fb5ecd 61 61 }; 62 62 63 /** Printf formatting string for dumping usb_transfer_batch_t. */ 64 #define USB_TRANSFER_BATCH_FMT "[%d:%d %s %s-%s %zuB/%zu]" 65 66 /** Printf arguments for dumping usb_transfer_batch_t. 67 * @param batch USB transfer batch to be dumped. 68 */ 69 #define USB_TRANSFER_BATCH_ARGS(batch) \ 70 (batch).ep->address, (batch).ep->endpoint, \ 71 usb_str_speed((batch).ep->speed), \ 72 usb_str_transfer_type_short((batch).ep->transfer_type), \ 73 usb_str_direction((batch).ep->direction), \ 74 (batch).buffer_size, (batch).ep->max_packet_size 75 76 63 77 void usb_transfer_batch_init( 64 78 usb_transfer_batch_t *instance, -
uspace/lib/usbhost/src/batch.c
r84eb7432 rc4fb5ecd 128 128 memcpy(instance->buffer, instance->data_buffer, instance->buffer_size); 129 129 130 usb_log_debug("Batch(%p) done (T%d.%d, %s %s in, %zuB): %s (%d).\n", 131 instance, instance->ep->address, instance->ep->endpoint, 132 usb_str_speed(instance->ep->speed), 133 usb_str_transfer_type_short(instance->ep->transfer_type), 134 instance->transfered_size, str_error(instance->error), 135 instance->error); 130 usb_log_debug("Batch %p " USB_TRANSFER_BATCH_FMT " completed (%zuB): %s.\n", 131 instance, USB_TRANSFER_BATCH_ARGS(*instance), 132 instance->transfered_size, str_error(instance->error)); 136 133 137 134 instance->callback_in(instance->fun, instance->error, … … 148 145 assert(instance->callback_out); 149 146 150 usb_log_debug("Batch(%p) done (T%d.%d, %s %s out): %s (%d).\n", 151 instance, instance->ep->address, instance->ep->endpoint, 152 usb_str_speed(instance->ep->speed), 153 usb_str_transfer_type_short(instance->ep->transfer_type), 154 str_error(instance->error), instance->error); 147 usb_log_debug("Batch %p " USB_TRANSFER_BATCH_FMT " completed: %s.\n", 148 instance, USB_TRANSFER_BATCH_ARGS(*instance), 149 str_error(instance->error)); 155 150 156 151 instance->callback_out(instance->fun, … … 165 160 { 166 161 assert(instance); 167 usb_log_debug("Batch(%p) disposing.\n", instance); 162 usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " disposing.\n", 163 instance, USB_TRANSFER_BATCH_ARGS(*instance)); 168 164 if (instance->private_data) { 169 165 assert(instance->private_data_dtor);
Note:
See TracChangeset
for help on using the changeset viewer.