Changeset 3e4f2e0 in mainline for uspace/lib/usbdev/src/usbdevice.c
- Timestamp:
- 2011-05-08T20:00:07Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 55054db0, 9212f8a
- Parents:
- 19065c7
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/usbdevice.c
r19065c7 r3e4f2e0 37 37 #include <usb_iface.h> 38 38 #include <usb/usbdevice.h> 39 #include <usb/driver.h> 39 40 #include <usb/debug.h> 40 41 #include <errno.h> 41 42 #include <assert.h> 42 43 /** Find host controller handle that is ancestor of given device.44 *45 * @param[in] device_handle Device devman handle.46 * @param[out] hc_handle Where to store handle of host controller47 * controlling device with @p device_handle handle.48 * @return Error code.49 */50 int usb_hc_find(devman_handle_t device_handle, devman_handle_t *hc_handle)51 {52 int parent_phone = devman_parent_device_connect(device_handle,53 IPC_FLAG_BLOCKING);54 if (parent_phone < 0) {55 return parent_phone;56 }57 58 devman_handle_t h;59 usb_log_debug("asking for HC handle (my handle is %zu).\n", device_handle);60 int rc = async_req_1_1(parent_phone, DEV_IFACE_ID(USB_DEV_IFACE),61 IPC_M_USB_GET_HOST_CONTROLLER_HANDLE, &h);62 63 async_hangup(parent_phone);64 65 if (rc != EOK) {66 return rc;67 }68 69 if (hc_handle != NULL) {70 *hc_handle = h;71 }72 73 return EOK;74 }75 43 76 44 /** Initialize connection to USB host controller.
Note:
See TracChangeset
for help on using the changeset viewer.