Changeset c9256c5 in mainline for uspace/lib/usbdev/src/pipes.c


Ignore:
Timestamp:
2011-05-20T20:37:06Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1889786, fcbcaae9
Parents:
74b1e40 (diff), e8f826b (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.
Message:

Minor fixes and improvements

  • Ensure linking against libusb is static only.
  • Generic HC communication moved into libusb.
  • Headers clean-up.
  • Add function for resolving USB device path.
File:
1 edited

Legend:

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

    r74b1e40 rc9256c5  
    3636#include <usb/dev/pipes.h>
    3737#include <usb/debug.h>
    38 #include <usb/driver.h>
     38#include <usb/hc.h>
    3939#include <usbhc_iface.h>
    4040#include <usb_iface.h>
     
    9797
    9898        return (int) iface_no;
    99 }
    100 
    101 /** Tell USB address assigned to given device.
    102  *
    103  * @param dev_handle Devman handle of the USB device in question.
    104  * @return USB address or negative error code.
    105  */
    106 usb_address_t usb_device_get_assigned_address(devman_handle_t dev_handle)
    107 {
    108         int parent_phone = devman_parent_device_connect(dev_handle,
    109             IPC_FLAG_BLOCKING);
    110         if (parent_phone < 0) {
    111                 return parent_phone;
    112         }
    113 
    114         sysarg_t address;
    115 
    116         int rc = async_req_2_1(parent_phone, DEV_IFACE_ID(USB_DEV_IFACE),
    117             IPC_M_USB_GET_ADDRESS,
    118             dev_handle, &address);
    119 
    120         if (rc != EOK) {
    121                 return rc;
    122         }
    123 
    124         async_hangup(parent_phone);
    125 
    126         return (usb_address_t) address;
    12799}
    128100
Note: See TracChangeset for help on using the changeset viewer.