Changeset 27a0012 in mainline
- Timestamp:
- 2011-02-20T17:01:39Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 18cb870
- Parents:
- 95120c3
- Location:
- uspace/lib/usb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/pipes.h
r95120c3 r27a0012 122 122 devman_handle_t, usb_address_t); 123 123 124 int usb_device_get_assigned_interface(device_t *); 125 124 126 int usb_endpoint_pipe_initialize(usb_endpoint_pipe_t *, 125 127 usb_device_connection_t *, -
uspace/lib/usb/src/pipes.c
r95120c3 r27a0012 60 60 } 61 61 62 /** Tell USB interface assigned to given device. 63 * 64 * @param device Device in question. 65 * @return Interface number (negative code means any). 66 */ 67 int usb_device_get_assigned_interface(device_t *device) 68 { 69 int parent_phone = devman_parent_device_connect(device->handle, 70 IPC_FLAG_BLOCKING); 71 if (parent_phone < 0) { 72 return -1; 73 } 74 75 sysarg_t iface_no; 76 int rc = async_req_2_1(parent_phone, DEV_IFACE_ID(USB_DEV_IFACE), 77 IPC_M_USB_GET_INTERFACE, 78 device->handle, &iface_no); 79 80 async_hangup(parent_phone); 81 82 if (rc != EOK) { 83 return -1; 84 } 85 86 return (int) iface_no; 87 } 88 62 89 /** Initialize connection to USB device. 63 90 *
Note:
See TracChangeset
for help on using the changeset viewer.