Changeset b4c1c95 in mainline for uspace/lib/usbhost/src/iface.c


Ignore:
Timestamp:
2013-01-04T12:55:23Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
daf199f
Parents:
0816c2e
Message:

libusbhost: Add more hcd wrappers.

File:
1 edited

Legend:

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

    r0816c2e rb4c1c95  
    4242#include "ddf_helpers.h"
    4343
    44 /** Calls ep_remove_hook upon endpoint removal. Prints warning.
    45  * @param ep Endpoint to be unregistered.
    46  * @param arg hcd_t in disguise.
    47  */
    48 static void unregister_helper_warn(endpoint_t *ep, void *arg)
    49 {
    50         hcd_t *hcd = arg;
    51         assert(ep);
    52         assert(hcd);
    53         usb_log_warning("Endpoint %d:%d %s was left behind, removing.\n",
    54             ep->address, ep->endpoint, usb_str_direction(ep->direction));
    55         if (hcd->ep_remove_hook)
    56                 hcd->ep_remove_hook(hcd, ep);
    57 }
    58 
    5944/** Request address interface function.
    6045 *
     
    7358        assert(hcd);
    7459        assert(address);
    75 
    7660        usb_log_debug("Address request: speed: %s, address: %d, strict: %s.\n",
    7761            usb_str_speed(speed), *address, strict ? "YES" : "NO");
     
    126110        assert(fun);
    127111        hcd_t *hcd = dev_to_hcd(ddf_fun_get_dev(fun));
    128         assert(hcd);
    129112        usb_log_debug("Address release %d.\n", address);
    130         usb_endpoint_manager_remove_address(&hcd->ep_manager, address,
    131             unregister_helper_warn, hcd);
    132         usb_device_manager_release_address(&hcd->dev_manager, address);
    133         return EOK;
     113        return hcd_release_address(hcd, address);
    134114}
    135115
     
    197177    void *arg)
    198178{
    199         return hcd_send_batch(dev_to_hcd(ddf_fun_get_dev(fun)), target, USB_DIRECTION_IN,
    200             data, size, setup_data, callback, NULL, arg, "READ");
     179        return hcd_send_batch(dev_to_hcd(ddf_fun_get_dev(fun)), target,
     180            USB_DIRECTION_IN, data, size, setup_data, callback, NULL, arg,
     181            "READ");
    201182}
    202183
Note: See TracChangeset for help on using the changeset viewer.