Changeset 7786cea in mainline for uspace/drv/ohci/batch.c
- Timestamp:
- 2011-04-08T21:54:12Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b854e56
- Parents:
- 96b8f322
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/batch.c
r96b8f322 r7786cea 51 51 } ohci_batch_t; 52 52 53 static void batch_control(usb_transfer_batch_t *instance); 53 54 static void batch_call_in_and_dispose(usb_transfer_batch_t *instance); 54 55 static void batch_call_out_and_dispose(usb_transfer_batch_t *instance); … … 83 84 instance->private_data = data; 84 85 86 /* we needs + 1 transfer descriptor as the last one won't be executed */ 85 87 data->td_count = 86 (buffer_size + OHCI_MAX_TRANSFER - 1) / OHCI_MAX_TRANSFER;88 1 + ((buffer_size + OHCI_MAX_TRANSFER - 1) / OHCI_MAX_TRANSFER); 87 89 if (ep->transfer_type == USB_TRANSFER_CONTROL) { 88 90 data->td_count += 2; … … 135 137 instance->buffer_size); 136 138 instance->next_step = batch_call_out_and_dispose; 137 /* TODO: implement */139 batch_control(instance); 138 140 usb_log_debug("Batch(%p) CONTROL WRITE initialized.\n", instance); 139 141 } … … 143 145 assert(instance); 144 146 instance->next_step = batch_call_in_and_dispose; 145 /* TODO: implement */147 batch_control(instance); 146 148 usb_log_debug("Batch(%p) CONTROL READ initialized.\n", instance); 147 149 } … … 150 152 { 151 153 assert(instance); 152 instance->direction = USB_DIRECTION_IN;154 assert(instance->direction == USB_DIRECTION_IN); 153 155 instance->next_step = batch_call_in_and_dispose; 154 156 /* TODO: implement */ … … 159 161 { 160 162 assert(instance); 161 instance->direction = USB_DIRECTION_OUT;163 assert(instance->direction == USB_DIRECTION_OUT); 162 164 /* We are data out, we are supposed to provide data */ 163 165 memcpy(instance->transport_buffer, instance->buffer, … … 188 190 ed_t * batch_ed(usb_transfer_batch_t *instance) 189 191 { 190 return NULL; 192 assert(instance); 193 ohci_batch_t *data = instance->private_data; 194 assert(data); 195 return data->ed; 196 } 197 /*----------------------------------------------------------------------------*/ 198 static void batch_control(usb_transfer_batch_t *instance) 199 { 200 assert(instance); 201 ohci_batch_t *data = instance->private_data; 202 assert(data); 203 ed_init(data->ed, instance->ep); 191 204 } 192 205 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.