Changeset 70e5ad5 in mainline for uspace/drv/vhc/hub/hub.c


Ignore:
Timestamp:
2010-12-16T11:12:31Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
11658b64, 5863a95
Parents:
cea3fca
Message:

More doxygen comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/vhc/hub/hub.c

    rcea3fca r70e5ad5  
    3131 */
    3232/** @file
    33  * @brief Virtual USB hub.
     33 * @brief Representation of an USB hub (implementation).
    3434 */
    3535#include <usb/classes/classes.h>
     
    338338}
    339339
     340/** Create hub status change bitmap.
     341 *
     342 * @warning This function assumes that the whole bitmap fits into 8 bits.
     343 *
     344 * @param hub Hub in question.
     345 * @return Hub status change bitmap.
     346 */
    340347uint8_t hub_get_status_change_bitmap(hub_t *hub)
    341348{
     
    361368 */
    362369
     370/** Find a port in a hub.
     371 *
     372 * @param hub Hub in question.
     373 * @param port Port index (zero based).
     374 * @return Port structure.
     375 * @retval NULL Invalid port index.
     376 */
    363377static hub_port_t *get_hub_port(hub_t *hub, size_t port)
    364378{
     
    370384}
    371385
     386/** Adds a port status change to a port.
     387 *
     388 * @param port The port with status change.
     389 * @param change Change to be added to the status.
     390 */
    372391static void set_port_status_change(hub_port_t *port,
    373392    hub_status_change_t change)
     
    377396}
    378397
     398/** Clears a port status change on a port.
     399 *
     400 * @param port The port with status change.
     401 * @param change Change to be removed from the status.
     402 */
    379403static void clear_port_status_change(hub_port_t *port,
    380404    uint16_t change)
     
    384408}
    385409
     410/** Structure for automatic (delayed) port state change. */
    386411struct delay_port_state_change {
     412        /** Delay in microseconds. */
    387413        suseconds_t delay;
     414        /** Old state of the port. */
    388415        hub_port_state_t old_state;
     416        /** New state of the port. */
    389417        hub_port_state_t new_state;
     418        /** Port index (zero based). */
    390419        size_t port;
     420        /** Hub. */
    391421        hub_t *hub;
    392422};
    393423
     424/** Fibril responsible for delayed port state change.
     425 *
     426 * @param arg Pointer to delay_port_state_change.
     427 * @return Always EOK.
     428 */
    394429static int set_port_state_delayed_fibril(void *arg)
    395430{
     
    416451}
    417452
     453/** Change port state with a delay.
     454 *
     455 * @warning If the port state changes during the waiting phase, the state
     456 * is not changed.
     457 *
     458 * @param hub Hub in question.
     459 * @param port_index Port index (zero based).
     460 * @param delay_time_ms Delay time in miliseconds.
     461 * @param old_state Old (current) state of the port.
     462 * @param new_state New state of the port.
     463 */
    418464static void set_port_state_delayed(hub_t *hub, size_t port_index,
    419465    suseconds_t delay_time_ms,
Note: See TracChangeset for help on using the changeset viewer.