Changeset 8e4219ab in mainline for uspace/lib/usbhost/src


Ignore:
Timestamp:
2013-08-02T14:04:51Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6fe7683
Parents:
9d15d1b
Message:

Implement and use usb_get_device_handle.

Enables object instantiation on usb interface functions.
avoids forwarding in usbmid driver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/ddf_helpers.c

    r9d15d1b r8e4219ab  
    216216}
    217217
     218/** Gets handle of the respective hc (this device, hc function).
     219 *
     220 * @param[in] root_hub_fun Root hub function seeking hc handle.
     221 * @param[out] handle Place to write the handle.
     222 * @return Error code.
     223 */
     224static int get_device_handle(ddf_fun_t *fun, devman_handle_t *handle)
     225{
     226        assert(fun);
     227        if (handle)
     228                *handle = ddf_fun_get_handle(fun);
     229        return EOK;
     230}
     231
    218232/** Root hub USB interface */
    219233static usb_iface_t usb_iface = {
    220234        .get_hc_handle = get_hc_handle,
    221235        .get_my_address = get_my_address,
     236
     237        .get_device_handle = get_device_handle,
    222238
    223239        .reserve_default_address = reserve_default_address,
     
    228244        .unregister_endpoint = unregister_endpoint,
    229245};
    230 /** Standard USB RH options (RH interface) */
     246
     247/** Standard USB RH options (device interface) */
    231248static ddf_dev_ops_t usb_ops = {
    232249        .interfaces[USB_DEV_IFACE] = &usb_iface,
Note: See TracChangeset for help on using the changeset viewer.