Changeset 80fdffe in mainline for uspace/drv/uhci-hcd/iface.c
- Timestamp:
- 2011-03-04T23:32:21Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 474d08e
- Parents:
- 03f7952 (diff), 0e06a14 (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/iface.c
r03f7952 r80fdffe 140 140 } 141 141 /*----------------------------------------------------------------------------*/ 142 static int bulk_out(ddf_fun_t *fun, usb_target_t target, 143 size_t max_packet_size, void *data, size_t size, 144 usbhc_iface_transfer_out_callback_t callback, void *arg) 145 { 146 assert(fun); 147 uhci_t *hc = fun_to_uhci(fun); 148 assert(hc); 149 usb_speed_t speed = device_keeper_speed(&hc->device_manager, target.address); 150 151 usb_log_debug("Bulk OUT %d:%d %zu(%zu).\n", 152 target.address, target.endpoint, size, max_packet_size); 153 154 batch_t *batch = batch_get(fun, target, USB_TRANSFER_BULK, 155 max_packet_size, speed, data, size, NULL, 0, NULL, callback, arg); 156 if (!batch) 157 return ENOMEM; 158 batch_bulk_out(batch); 159 return EOK; 160 } 161 /*----------------------------------------------------------------------------*/ 162 static int bulk_in(ddf_fun_t *fun, usb_target_t target, 163 size_t max_packet_size, void *data, size_t size, 164 usbhc_iface_transfer_in_callback_t callback, void *arg) 165 { 166 assert(fun); 167 uhci_t *hc = fun_to_uhci(fun); 168 assert(hc); 169 usb_speed_t speed = device_keeper_speed(&hc->device_manager, target.address); 170 usb_log_debug("Bulk IN %d:%d %zu(%zu).\n", 171 target.address, target.endpoint, size, max_packet_size); 172 173 batch_t *batch = batch_get(fun, target, USB_TRANSFER_BULK, 174 max_packet_size, speed, data, size, NULL, 0, callback, NULL, arg); 175 if (!batch) 176 return ENOMEM; 177 batch_bulk_in(batch); 178 return EOK; 179 } 180 /*----------------------------------------------------------------------------*/ 142 181 static int control_write(ddf_fun_t *fun, usb_target_t target, 143 182 size_t max_packet_size, … … 181 220 return EOK; 182 221 } 183 184 185 222 /*----------------------------------------------------------------------------*/ 186 223 usbhc_iface_t uhci_iface = { … … 194 231 .interrupt_in = interrupt_in, 195 232 233 .bulk_in = bulk_in, 234 .bulk_out = bulk_out, 235 196 236 .control_read = control_read, 197 237 .control_write = control_write,
Note:
See TracChangeset
for help on using the changeset viewer.