Changeset 3e4f2e0 in mainline for uspace/lib/usbdev/src/usbdevice.c


Ignore:
Timestamp:
2011-05-08T20:00:07Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
55054db0, 9212f8a
Parents:
19065c7
Message:

libusb divided into sublibraries

Also removed address keeper test from tester as it is useless.

Directory reorganization of the include/ will follow.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/usbdevice.c

    r19065c7 r3e4f2e0  
    3737#include <usb_iface.h>
    3838#include <usb/usbdevice.h>
     39#include <usb/driver.h>
    3940#include <usb/debug.h>
    4041#include <errno.h>
    4142#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 controller
    47  *      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 }
    7543
    7644/** Initialize connection to USB host controller.
Note: See TracChangeset for help on using the changeset viewer.