Changeset a763eb4 in mainline


Ignore:
Timestamp:
2011-03-19T18:14:01Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update
Children:
103cf26, 93855d4
Parents:
81608b5
Message:

Doxygen comments to HC iface of EHCI

No change in functionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ehci-hcd/hc_iface.c

    r81608b5 ra763eb4  
    4848            methodname, __FILE__, __LINE__)
    4949
    50 
     50/** Reserve default address.
     51 *
     52 * This function may block the caller.
     53 *
     54 * @param[in] fun Device function the action was invoked on.
     55 * @param[in] speed Speed of the device for which the default address is
     56 *      reserved.
     57 * @return Error code.
     58 */
    5159static int reserve_default_address(ddf_fun_t *fun, usb_speed_t speed)
    5260{
     
    5664}
    5765
     66/** Release default address.
     67 *
     68 * @param[in] fun Device function the action was invoked on.
     69 * @return Error code.
     70 */
    5871static int release_default_address(ddf_fun_t *fun)
    5972{
     
    6376}
    6477
    65 static int request_address(ddf_fun_t *fun, usb_speed_t speed, usb_address_t *address)
     78/** Found free USB address.
     79 *
     80 * @param[in] fun Device function the action was invoked on.
     81 * @param[in] speed Speed of the device that will get this address.
     82 * @param[out] address Non-null pointer where to store the free address.
     83 * @return Error code.
     84 */
     85static int request_address(ddf_fun_t *fun, usb_speed_t speed,
     86    usb_address_t *address)
    6687{
    6788        UNSUPPORTED("request_address");
     
    7091}
    7192
    72 static int bind_address(ddf_fun_t *fun, usb_address_t address, devman_handle_t handle)
     93/** Bind USB address with device devman handle.
     94 *
     95 * @param[in] fun Device function the action was invoked on.
     96 * @param[in] address USB address of the device.
     97 * @param[in] handle Devman handle of the device.
     98 * @return Error code.
     99 */
     100static int bind_address(ddf_fun_t *fun,
     101    usb_address_t address, devman_handle_t handle)
    73102{
    74103        UNSUPPORTED("bind_address");
     
    77106}
    78107
     108/** Release previously requested address.
     109 *
     110 * @param[in] fun Device function the action was invoked on.
     111 * @param[in] address USB address to be released.
     112 * @return Error code.
     113 */
    79114static int release_address(ddf_fun_t *fun, usb_address_t address)
    80115{
     
    84119}
    85120
    86 static int register_endpoint(ddf_fun_t *fun, usb_address_t address, usb_endpoint_t endpoint,
     121/** Register endpoint for bandwidth reservation.
     122 *
     123 * @param[in] fun Device function the action was invoked on.
     124 * @param[in] address USB address of the device.
     125 * @param[in] endpoint Endpoint number.
     126 * @param[in] transfer_type USB transfer type.
     127 * @param[in] direction Endpoint data direction.
     128 * @param[in] max_packet_size Max packet size of the endpoint.
     129 * @param[in] interval Polling interval.
     130 * @return Error code.
     131 */
     132static int register_endpoint(ddf_fun_t *fun,
     133    usb_address_t address, usb_endpoint_t endpoint,
    87134    usb_transfer_type_t transfer_type, usb_direction_t direction,
    88135    size_t max_packet_size, unsigned int interval)
     
    93140}
    94141
    95 static int unregister_endpoint(ddf_fun_t *fun, usb_address_t address, usb_endpoint_t endpoint,
    96     usb_direction_t direction)
     142/** Unregister endpoint (free some bandwidth reservation).
     143 *
     144 * @param[in] fun Device function the action was invoked on.
     145 * @param[in] address USB address of the device.
     146 * @param[in] endpoint Endpoint number.
     147 * @param[in] direction Endpoint data direction.
     148 * @return Error code.
     149 */
     150static int unregister_endpoint(ddf_fun_t *fun, usb_address_t address,
     151    usb_endpoint_t endpoint, usb_direction_t direction)
    97152{
    98153        UNSUPPORTED("unregister_endpoint");
     
    101156}
    102157
     158/** Schedule interrupt out transfer.
     159 *
     160 * The callback is supposed to be called once the transfer (on the wire) is
     161 * complete regardless of the outcome.
     162 * However, the callback could be called only when this function returns
     163 * with success status (i.e. returns EOK).
     164 *
     165 * @param[in] fun Device function the action was invoked on.
     166 * @param[in] target Target pipe (address and endpoint number) specification.
     167 * @param[in] max_packet_size Max packet size for the transfer.
     168 * @param[in] data Data to be sent (in USB endianess, allocated and deallocated
     169 *      by the caller).
     170 * @param[in] size Size of the @p data buffer in bytes.
     171 * @param[in] callback Callback to be issued once the transfer is complete.
     172 * @param[in] arg Pass-through argument to the callback.
     173 * @return Error code.
     174 */
    103175static int interrupt_out(ddf_fun_t *fun, usb_target_t target,
    104176    size_t max_packet_size, void *data, size_t size,
     
    110182}
    111183
     184/** Schedule interrupt in transfer.
     185 *
     186 * The callback is supposed to be called once the transfer (on the wire) is
     187 * complete regardless of the outcome.
     188 * However, the callback could be called only when this function returns
     189 * with success status (i.e. returns EOK).
     190 *
     191 * @param[in] fun Device function the action was invoked on.
     192 * @param[in] target Target pipe (address and endpoint number) specification.
     193 * @param[in] max_packet_size Max packet size for the transfer.
     194 * @param[in] data Buffer where to store the data (in USB endianess,
     195 *      allocated and deallocated by the caller).
     196 * @param[in] size Size of the @p data buffer in bytes.
     197 * @param[in] callback Callback to be issued once the transfer is complete.
     198 * @param[in] arg Pass-through argument to the callback.
     199 * @return Error code.
     200 */
    112201static int interrupt_in(ddf_fun_t *fun, usb_target_t target,
    113202    size_t max_packet_size, void *data, size_t size,
     
    119208}
    120209
     210/** Schedule bulk out transfer.
     211 *
     212 * The callback is supposed to be called once the transfer (on the wire) is
     213 * complete regardless of the outcome.
     214 * However, the callback could be called only when this function returns
     215 * with success status (i.e. returns EOK).
     216 *
     217 * @param[in] fun Device function the action was invoked on.
     218 * @param[in] target Target pipe (address and endpoint number) specification.
     219 * @param[in] max_packet_size Max packet size for the transfer.
     220 * @param[in] data Data to be sent (in USB endianess, allocated and deallocated
     221 *      by the caller).
     222 * @param[in] size Size of the @p data buffer in bytes.
     223 * @param[in] callback Callback to be issued once the transfer is complete.
     224 * @param[in] arg Pass-through argument to the callback.
     225 * @return Error code.
     226 */
    121227static int bulk_out(ddf_fun_t *fun, usb_target_t target,
    122228    size_t max_packet_size, void *data, size_t size,
     
    128234}
    129235
     236/** Schedule bulk in transfer.
     237 *
     238 * The callback is supposed to be called once the transfer (on the wire) is
     239 * complete regardless of the outcome.
     240 * However, the callback could be called only when this function returns
     241 * with success status (i.e. returns EOK).
     242 *
     243 * @param[in] fun Device function the action was invoked on.
     244 * @param[in] target Target pipe (address and endpoint number) specification.
     245 * @param[in] max_packet_size Max packet size for the transfer.
     246 * @param[in] data Buffer where to store the data (in USB endianess,
     247 *      allocated and deallocated by the caller).
     248 * @param[in] size Size of the @p data buffer in bytes.
     249 * @param[in] callback Callback to be issued once the transfer is complete.
     250 * @param[in] arg Pass-through argument to the callback.
     251 * @return Error code.
     252 */
    130253static int bulk_in(ddf_fun_t *fun, usb_target_t target,
    131254    size_t max_packet_size, void *data, size_t size,
     
    137260}
    138261
     262/** Schedule control write transfer.
     263 *
     264 * The callback is supposed to be called once the transfer (on the wire) is
     265 * complete regardless of the outcome.
     266 * However, the callback could be called only when this function returns
     267 * with success status (i.e. returns EOK).
     268 *
     269 * @param[in] fun Device function the action was invoked on.
     270 * @param[in] target Target pipe (address and endpoint number) specification.
     271 * @param[in] max_packet_size Max packet size for the transfer.
     272 * @param[in] setup_packet Setup packet buffer (in USB endianess, allocated
     273 *      and deallocated by the caller).
     274 * @param[in] setup_packet_size Size of @p setup_packet buffer in bytes.
     275 * @param[in] data_buffer Data buffer (in USB endianess, allocated and
     276 *      deallocated by the caller).
     277 * @param[in] data_buffer_size Size of @p data_buffer buffer in bytes.
     278 * @param[in] callback Callback to be issued once the transfer is complete.
     279 * @param[in] arg Pass-through argument to the callback.
     280 * @return Error code.
     281 */
    139282static int control_write(ddf_fun_t *fun, usb_target_t target,
    140283    size_t max_packet_size,
    141     void *setup_packet, size_t setup_packet_size, void *data_buffer, size_t data_buffer_size,
     284    void *setup_packet, size_t setup_packet_size,
     285    void *data_buffer, size_t data_buffer_size,
    142286    usbhc_iface_transfer_out_callback_t callback, void *arg)
    143287{
     
    147291}
    148292
     293/** Schedule control read transfer.
     294 *
     295 * The callback is supposed to be called once the transfer (on the wire) is
     296 * complete regardless of the outcome.
     297 * However, the callback could be called only when this function returns
     298 * with success status (i.e. returns EOK).
     299 *
     300 * @param[in] fun Device function the action was invoked on.
     301 * @param[in] target Target pipe (address and endpoint number) specification.
     302 * @param[in] max_packet_size Max packet size for the transfer.
     303 * @param[in] setup_packet Setup packet buffer (in USB endianess, allocated
     304 *      and deallocated by the caller).
     305 * @param[in] setup_packet_size Size of @p setup_packet buffer in bytes.
     306 * @param[in] data_buffer Buffer where to store the data (in USB endianess,
     307 *      allocated and deallocated by the caller).
     308 * @param[in] data_buffer_size Size of @p data_buffer buffer in bytes.
     309 * @param[in] callback Callback to be issued once the transfer is complete.
     310 * @param[in] arg Pass-through argument to the callback.
     311 * @return Error code.
     312 */
    149313static int control_read(ddf_fun_t *fun, usb_target_t target,
    150314    size_t max_packet_size,
    151     void *setup_packet, size_t setup_packet_size, void *data_buffer, size_t data_buffer_size,
     315    void *setup_packet, size_t setup_packet_size,
     316    void *data_buffer, size_t data_buffer_size,
    152317    usbhc_iface_transfer_in_callback_t callback, void *arg)
    153318{
     
    157322}
    158323
    159 
     324/** Host controller interface implementation for EHCI. */
    160325usbhc_iface_t ehci_hc_iface = {
    161326        .reserve_default_address = reserve_default_address,
Note: See TracChangeset for help on using the changeset viewer.