Changeset a81a1d09 in mainline for uspace/lib/usbdev/src
- Timestamp:
- 2011-05-11T16:49:28Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 19387b61
- Parents:
- e1dbcbc (diff), 9212f8a (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. - Location:
- uspace/lib/usbdev/src
- Files:
-
- 13 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/hub.c
re1dbcbc ra81a1d09 117 117 DEV_IFACE_ID(USBHC_DEV_IFACE), 118 118 IPC_M_USBHC_RELEASE_ADDRESS, address); 119 } 120 121 /** Get handle of USB device with given address. 122 * 123 * @param[in] connection Opened connection to host controller. 124 * @param[in] address Address of device in question. 125 * @param[out] handle Where to write the device handle. 126 * @return Error code. 127 */ 128 int usb_hc_get_handle_by_address(usb_hc_connection_t *connection, 129 usb_address_t address, devman_handle_t *handle) 130 { 131 CHECK_CONNECTION(connection); 132 133 sysarg_t tmp; 134 int rc = async_req_2_1(connection->hc_phone, 135 DEV_IFACE_ID(USBHC_DEV_IFACE), 136 IPC_M_USBHC_GET_HANDLE_BY_ADDRESS, 137 address, &tmp); 138 if ((rc == EOK) && (handle != NULL)) { 139 *handle = tmp; 140 } 141 142 return rc; 119 143 } 120 144 -
uspace/lib/usbdev/src/pipes.c
re1dbcbc ra81a1d09 36 36 #include <usb/pipes.h> 37 37 #include <usb/debug.h> 38 #include <usb/driver.h> 38 39 #include <usbhc_iface.h> 39 40 #include <usb_iface.h> -
uspace/lib/usbdev/src/usbdevice.c
re1dbcbc ra81a1d09 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.