Changeset 76daaf9f in mainline
- 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
- Location:
- uspace/drv/vhc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/vhc/connhost.c
r7feeb84 r76daaf9f 102 102 transfer->out_callback = callback; 103 103 104 hc_add_transaction_to_device(false, target, buffer, size,104 hc_add_transaction_to_device(false, target, transfer_type, buffer, size, 105 105 universal_callback, transfer); 106 106 … … 122 122 transfer->out_callback = callback; 123 123 124 hc_add_transaction_to_device(true, target, buffer, size,124 hc_add_transaction_to_device(true, target, transfer_type, buffer, size, 125 125 universal_callback, transfer); 126 126 … … 142 142 transfer->in_callback = callback; 143 143 144 hc_add_transaction_from_device(target, buffer, size,144 hc_add_transaction_from_device(target, transfer_type, buffer, size, 145 145 universal_callback, transfer); 146 146 -
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 } -
uspace/drv/vhc/hc.h
r7feeb84 r76daaf9f 55 55 /** Transaction type. */ 56 56 usbvirt_transaction_type_t type; 57 /** Transfer type. */ 58 usb_transfer_type_t transfer_type; 57 59 /** Device address. */ 58 60 usb_target_t target; … … 71 73 void hc_manager(void); 72 74 73 void hc_add_transaction_to_device(bool setup, usb_target_t target, 75 void hc_add_transaction_to_device(bool setup, 76 usb_target_t target, usb_transfer_type_t transfer_type, 74 77 void * buffer, size_t len, 75 78 hc_transaction_done_callback_t callback, void * arg); 76 79 77 void hc_add_transaction_from_device(usb_target_t target, 80 void hc_add_transaction_from_device( 81 usb_target_t target, usb_transfer_type_t transfer_type, 78 82 void * buffer, size_t len, 79 83 hc_transaction_done_callback_t callback, void * arg);
Note:
See TracChangeset
for help on using the changeset viewer.