Changeset 76daaf9f in mainline for uspace/drv/vhc/hc.c
- Timestamp:
- 2010-12-13T14:33:23Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d5e7668
- Parents:
- 7feeb84
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/vhc/hc.c
r7feeb84 r76daaf9f 68 68 static link_t transaction_list; 69 69 70 #define TRANSACTION_FORMAT "T[%d :%d%s (%d)]"70 #define TRANSACTION_FORMAT "T[%d.%d %s/%s (%d)]" 71 71 #define TRANSACTION_PRINTF(t) \ 72 72 (t).target.address, (t).target.endpoint, \ 73 usb_str_transfer_type((t).transfer_type), \ 73 74 usbvirt_str_transaction_type((t).type), \ 74 75 (int)(t).len … … 143 144 */ 144 145 static transaction_t *transaction_create(usbvirt_transaction_type_t type, 145 usb_target_t target, 146 usb_target_t target, usb_transfer_type_t transfer_type, 146 147 void * buffer, size_t len, 147 148 hc_transaction_done_callback_t callback, void * arg) … … 151 152 list_initialize(&transaction->link); 152 153 transaction->type = type; 154 transaction->transfer_type = transfer_type; 153 155 transaction->target = target; 154 156 transaction->buffer = buffer; … … 166 168 */ 167 169 void hc_add_transaction_to_device(bool setup, usb_target_t target, 170 usb_transfer_type_t transfer_type, 168 171 void * buffer, size_t len, 169 172 hc_transaction_done_callback_t callback, void * arg) 170 173 { 171 174 transaction_t *transaction = transaction_create( 172 setup ? USBVIRT_TRANSACTION_SETUP : USBVIRT_TRANSACTION_OUT, target, 175 setup ? USBVIRT_TRANSACTION_SETUP : USBVIRT_TRANSACTION_OUT, 176 target, transfer_type, 173 177 buffer, len, callback, arg); 174 178 list_append(&transaction->link, &transaction_list); … … 178 182 */ 179 183 void hc_add_transaction_from_device(usb_target_t target, 184 usb_transfer_type_t transfer_type, 180 185 void * buffer, size_t len, 181 186 hc_transaction_done_callback_t callback, void * arg) 182 187 { 183 188 transaction_t *transaction = transaction_create(USBVIRT_TRANSACTION_IN, 184 target, buffer, len, callback, arg); 189 target, transfer_type, 190 buffer, len, callback, arg); 185 191 list_append(&transaction->link, &transaction_list); 186 192 }
Note:
See TracChangeset
for help on using the changeset viewer.