Changeset 1102eca in mainline for uspace/lib/usbhost/src/ddf_helpers.c


Ignore:
Timestamp:
2018-01-08T17:17:38Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bdd8842c
Parents:
eb928c4
Message:

usbhost: documentation & cleanup

File:
1 edited

Legend:

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

    reb928c4 r1102eca  
    3131 */
    3232/** @file
    33  *
     33 * Helpers to work with the DDF interface.
    3434 */
    3535
     
    5959
    6060
    61 /* DDF INTERFACE */
    62 
    63 /** Register endpoint interface function.
    64  * @param fun DDF function.
    65  * @param endpoint_desc Endpoint description.
     61/**
     62 * DDF usbhc_iface callback. Passes the endpoint descriptors, fills the pipe
     63 * descriptor according to the contents of the endpoint.
     64 *
     65 * @param[in] fun DDF function of the device in question.
     66 * @param[out] pipe_desc The pipe descriptor to be filled.
     67 * @param[in] endpoint_desc Endpoint descriptors from the device.
    6668 * @return Error code.
    6769 */
     
    9294}
    9395
    94  /** Unregister endpoint interface function.
    95   * @param fun DDF function.
    96   * @param endpoint_desc Endpoint description.
     96 /**
     97  * DDF usbhc_iface callback. Unregister endpoint that makes the other end of
     98  * the pipe described.
     99  *
     100  * @param fun DDF function of the device in question.
     101  * @param pipe_desc Pipe description.
    97102  * @return Error code.
    98103  */
    99 static int unregister_endpoint(ddf_fun_t *fun, const usb_pipe_desc_t *endpoint_desc)
     104static int unregister_endpoint(ddf_fun_t *fun, const usb_pipe_desc_t *pipe_desc)
    100105{
    101106        assert(fun);
     
    106111        assert(dev);
    107112
    108         endpoint_t *ep = bus_find_endpoint(dev, endpoint_desc->endpoint_no);
     113        endpoint_t *ep = bus_find_endpoint(dev, pipe_desc->endpoint_no);
    109114        if (!ep)
    110115                return ENOENT;
     
    113118}
    114119
     120/**
     121 * DDF usbhc_iface callback. Calls the bus operation directly.
     122 *
     123 * @param fun DDF function of the device (hub) requesting the address.
     124 * @param speed An USB speed of the device for which the address is reserved.
     125 */
    115126static int reserve_default_address(ddf_fun_t *fun, usb_speed_t speed)
    116127{
     
    127138}
    128139
     140/**
     141 * DDF usbhc_iface callback. Calls the bus operation directly.
     142 *
     143 * @param fun DDF function of the device (hub) releasing the address.
     144 */
    129145static int release_default_address(ddf_fun_t *fun)
    130146{
     
    142158}
    143159
     160/**
     161 * DDF usbhc_iface callback. Calls the bus operation directly.
     162 *
     163 * @param fun DDF function of the device (hub) requesting the address.
     164 */
    144165static int device_enumerate(ddf_fun_t *fun, unsigned port)
    145166{
Note: See TracChangeset for help on using the changeset viewer.