Changeset 56fb3732 in mainline
- Timestamp:
- 2010-12-28T10:28:16Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- de2c901
- Parents:
- 6edd494
- Location:
- uspace/lib
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ipc/dev_iface.h
r6edd494 r56fb3732 39 39 CHAR_DEV_IFACE, 40 40 41 /** Interface provided by any USB device. */ 42 USB_DEV_IFACE, 41 43 /** Interface provided by USB host controller. */ 42 44 USBHC_DEV_IFACE, -
uspace/lib/drv/Makefile
r6edd494 r56fb3732 36 36 generic/dev_iface.c \ 37 37 generic/remote_res.c \ 38 generic/remote_usb.c \ 38 39 generic/remote_usbhc.c \ 39 40 generic/remote_char.c -
uspace/lib/drv/generic/dev_iface.c
r6edd494 r56fb3732 39 39 #include "remote_res.h" 40 40 #include "remote_char.h" 41 #include "remote_usb.h" 41 42 #include "remote_usbhc.h" 42 43 … … 45 46 &remote_res_iface, 46 47 &remote_char_iface, 48 &remote_usb_iface, 47 49 &remote_usbhc_iface 48 50 } -
uspace/lib/usb/include/usb/usbdrv.h
r6edd494 r56fb3732 41 41 #include <usb/descriptor.h> 42 42 43 int usb_drv_find_hc(device_t *, devman_handle_t *); 43 44 int usb_drv_hc_connect(device_t *, unsigned int); 44 45 -
uspace/lib/usb/src/usbdrv.c
r6edd494 r56fb3732 35 35 #include <usb/usbdrv.h> 36 36 #include <usbhc_iface.h> 37 #include <usb_iface.h> 37 38 #include <errno.h> 38 39 #include <str_error.h> … … 54 55 } transfer_info_t; 55 56 57 /** Find handle of host controller the device is physically attached to. 58 * 59 * @param[in] dev Device looking for its host controller. 60 * @param[out] handle Host controller devman handle. 61 * @return Error code. 62 */ 63 int usb_drv_find_hc(device_t *dev, devman_handle_t *handle) 64 { 65 if (dev == NULL) { 66 return EBADMEM; 67 } 68 if (handle == NULL) { 69 return EBADMEM; 70 } 71 72 int parent_phone = devman_parent_device_connect(dev->handle, 0); 73 if (parent_phone < 0) { 74 return parent_phone; 75 } 76 77 devman_handle_t h; 78 int rc = async_req_1_1(parent_phone, DEV_IFACE_ID(USB_DEV_IFACE), 79 IPC_M_USB_GET_HOST_CONTROLLER_HANDLE, &h); 80 if (rc != EOK) { 81 return rc; 82 } 83 84 *handle = h; 85 86 return EOK; 87 } 88 56 89 /** Connect to host controller the device is physically attached to. 57 90 *
Note:
See TracChangeset
for help on using the changeset viewer.