Changeset 97ab321 in mainline for uspace/drv/uhci-hcd/batch.c
- Timestamp:
- 2011-04-07T09:53:12Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d41f301
- Parents:
- c4e0b47 (diff), 41c1f7b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/batch.c
rc4e0b47 r97ab321 49 49 td_t *tds; 50 50 size_t transfers; 51 usb_device_keeper_t *manager;52 51 } uhci_batch_t; 53 52 … … 73 72 * @param[in] func_out function to call on outbound transaction completion 74 73 * @param[in] arg additional parameter to func_in or func_out 75 * @param[in] manager Pointer totoggle management structure.74 * @param[in] ep Pointer to endpoint toggle management structure. 76 75 * @return Valid pointer if all substructures were successfully created, 77 76 * NULL otherwise. … … 86 85 char* setup_buffer, size_t setup_size, 87 86 usbhc_iface_transfer_in_callback_t func_in, 88 usbhc_iface_transfer_out_callback_t func_out, void *arg, 89 usb_device_keeper_t *manager 87 usbhc_iface_transfer_out_callback_t func_out, void *arg, endpoint_t *ep 90 88 ) 91 89 { … … 105 103 CHECK_NULL_DISPOSE_RETURN(instance, 106 104 "Failed to allocate batch instance.\n"); 107 usb_transfer_batch_init(instance, target, transfer_type, speed, max_packet_size, 105 usb_transfer_batch_init(instance, target, 106 transfer_type, speed, max_packet_size, 108 107 buffer, NULL, buffer_size, NULL, setup_size, func_in, 109 func_out, arg, fun, NULL);108 func_out, arg, fun, ep, NULL); 110 109 111 110 … … 114 113 "Failed to allocate batch instance.\n"); 115 114 bzero(data, sizeof(uhci_batch_t)); 116 data->manager = manager;117 115 instance->private_data = data; 118 116 … … 180 178 instance, i, data->tds[i].status); 181 179 td_print_status(&data->tds[i]); 182 183 usb_device_keeper_set_toggle(data->manager, 184 instance->target, instance->direction, 185 td_toggle(&data->tds[i])); 180 if (instance->ep != NULL) 181 endpoint_toggle_set(instance->ep, 182 td_toggle(&data->tds[i])); 186 183 if (i > 0) 187 184 goto substract_ret; … … 310 307 311 308 const bool low_speed = instance->speed == USB_SPEED_LOW; 312 int toggle = usb_device_keeper_get_toggle( 313 data->manager, instance->target, instance->direction); 309 int toggle = endpoint_toggle_get(instance->ep); 314 310 assert(toggle == 0 || toggle == 1); 315 311 … … 342 338 } 343 339 td_set_ioc(&data->tds[transfer - 1]); 344 usb_device_keeper_set_toggle(data->manager, instance->target, 345 instance->direction, toggle); 340 endpoint_toggle_set(instance->ep, toggle); 346 341 } 347 342 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.