Changeset c2343cc in mainline
- Timestamp:
- 2011-03-14T22:22:16Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7ffe82f
- Parents:
- 206f71a
- Location:
- uspace/lib/usb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/pipes.h
r206f71a rc2343cc 123 123 124 124 int usb_device_get_assigned_interface(ddf_dev_t *); 125 usb_address_t usb_device_get_assigned_address(devman_handle_t); 125 126 126 127 int usb_endpoint_pipe_initialize(usb_endpoint_pipe_t *, -
uspace/lib/usb/src/pipes.c
r206f71a rc2343cc 52 52 sysarg_t address; 53 53 54 55 54 /* 56 55 * We are sending special value as a handle - zero - to get … … 94 93 95 94 return (int) iface_no; 95 } 96 97 /** Tell USB address assigned to given device. 98 * 99 * @param dev_handle Devman handle of the USB device in question. 100 * @return USB address or negative error code. 101 */ 102 usb_address_t usb_device_get_assigned_address(devman_handle_t dev_handle) 103 { 104 int parent_phone = devman_parent_device_connect(dev_handle, 105 IPC_FLAG_BLOCKING); 106 if (parent_phone < 0) { 107 return parent_phone; 108 } 109 110 sysarg_t address; 111 112 int rc = async_req_2_1(parent_phone, DEV_IFACE_ID(USB_DEV_IFACE), 113 IPC_M_USB_GET_ADDRESS, 114 dev_handle, &address); 115 116 if (rc != EOK) { 117 return rc; 118 } 119 120 async_hangup(parent_phone); 121 122 return (usb_address_t) address; 96 123 } 97 124
Note:
See TracChangeset
for help on using the changeset viewer.