Changeset be2ad7cf in mainline
- Timestamp:
- 2010-11-21T21:00:34Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4d31d58
- Parents:
- 0ee648a
- Location:
- uspace/lib/usb
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/Makefile
r0ee648a rbe2ad7cf 34 34 SOURCES = \ 35 35 src/hcdhubd.c \ 36 src/localdrv.c \ 36 37 src/usb.c \ 37 38 src/usbdrv.c -
uspace/lib/usb/src/hcdhubd.c
r0ee648a rbe2ad7cf 98 98 return EOK; 99 99 } else { 100 printf("%s: hub added, hurrah!\n", hc_driver->name);101 100 /* 102 101 * We are some (probably deeply nested) hub. … … 272 271 } 273 272 274 /** Issue interrupt OUT transfer to HC driven by current task.275 *276 * @param hc Host controller to handle the transfer.277 * @param target Target device address.278 * @param buffer Data buffer.279 * @param size Buffer size.280 * @param handle Transfer handle.281 * @return Error code.282 */283 int usb_hc_async_interrupt_out(usb_hc_device_t *hc, usb_target_t target,284 void *buffer, size_t size,285 usb_handle_t *handle)286 {287 if ((hc->transfer_ops == NULL)288 || (hc->transfer_ops->transfer_out == NULL)) {289 return ENOTSUP;290 }291 292 /*293 * For debugging purposes only.294 * We need to find appropriate device in list of managed device295 * and pass it to the transfer callback function.296 */297 usb_hcd_attached_device_info_t dev = {298 .address = target.address,299 .endpoint_count = 0,300 .endpoints = NULL,301 };302 usb_hc_endpoint_info_t endpoint = {303 .endpoint = target.endpoint,304 .transfer_type = USB_TRANSFER_INTERRUPT,305 .direction = USB_DIRECTION_OUT,306 .data_toggle = 0307 };308 309 hc->transfer_ops->transfer_out(hc, &dev, &endpoint, buffer, size, NULL, NULL);310 311 *handle = (usb_handle_t)NULL;312 313 return EOK;314 }315 316 317 /** Issue interrupt IN transfer to HC driven by current task.318 *319 * @warning The @p buffer and @p actual_size parameters shall not be320 * touched until this transfer is waited for by usb_hc_async_wait_for().321 *322 * @param hc Host controller to handle the transfer.323 * @param target Target device address.324 * @param buffer Data buffer.325 * @param size Buffer size.326 * @param actual_size Size of actually transferred data.327 * @param handle Transfer handle.328 * @return Error code.329 */330 int usb_hc_async_interrupt_in(usb_hc_device_t *hc, usb_target_t target,331 void *buffer, size_t size, size_t *actual_size,332 usb_handle_t *handle)333 {334 /*335 * TODO: verify that given endpoint is of interrupt type and336 * call hc->transfer_ops->transfer_in()337 */338 return ENOTSUP;339 }340 341 /** Wait for transfer to complete.342 *343 * @param handle Transfer handle.344 * @return Error code.345 */346 int usb_hc_async_wait_for(usb_handle_t handle)347 {348 return ENOTSUP;349 }350 351 273 /** 352 274 * @}
Note:
See TracChangeset
for help on using the changeset viewer.