Changeset 0edf7c7 in mainline for uspace/lib/usbdev/src/hub.c


Ignore:
Timestamp:
2011-05-20T20:01:25Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
04028225
Parents:
a60afd0
Message:

HC communication moved into libusb

Although communication with HC looked like a thing common only
to devices, any utility wanting to communicate with the device may
try to get some information about it from the HC.

Thus the usb_hc_connection* and some other generic functions were
moved into libusb.

Also merged dev/hc.h and host.h into hc.h.

File:
1 edited

Legend:

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

    ra60afd0 r0edf7c7  
    120120}
    121121
    122 /** Get handle of USB device with given address.
    123  *
    124  * @param[in] connection Opened connection to host controller.
    125  * @param[in] address Address of device in question.
    126  * @param[out] handle Where to write the device handle.
    127  * @return Error code.
    128  */
    129 int usb_hc_get_handle_by_address(usb_hc_connection_t *connection,
    130     usb_address_t address, devman_handle_t *handle)
    131 {
    132         CHECK_CONNECTION(connection);
    133 
    134         sysarg_t tmp;
    135         int rc = async_req_2_1(connection->hc_phone,
    136             DEV_IFACE_ID(USBHC_DEV_IFACE),
    137             IPC_M_USBHC_GET_HANDLE_BY_ADDRESS,
    138             address, &tmp);
    139         if ((rc == EOK) && (handle != NULL)) {
    140                 *handle = tmp;
    141         }
    142 
    143         return rc;
    144 }
    145122
    146123static void unregister_control_endpoint_on_default_address(
Note: See TracChangeset for help on using the changeset viewer.