Ignore:
Timestamp:
2011-03-14T21:24:02Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fcf07e6
Parents:
c69209d (diff), 9370884 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Doxygen comments, enable hw interrupts if possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/utils/device_keeper.c

    rc69209d r15d3b54  
    2727 */
    2828
    29 /** @addtogroup drvusbuhci
     29/** @addtogroup drvusbuhcihc
    3030 * @{
    3131 */
     
    4040
    4141/*----------------------------------------------------------------------------*/
    42 /** Initializes device keeper structure.
     42/** Initialize device keeper structure.
    4343 *
    4444 * @param[in] instance Memory place to initialize.
     45 *
     46 * Set all values to false/0.
    4547 */
    4648void device_keeper_init(device_keeper_t *instance)
     
    5860}
    5961/*----------------------------------------------------------------------------*/
    60 /** Attempts to obtain address 0, blocks.
     62/** Attempt to obtain address 0, blocks.
    6163 *
    6264 * @param[in] instance Device keeper structure to use.
     
    7678}
    7779/*----------------------------------------------------------------------------*/
    78 /** Attempts to obtain address 0, blocks.
     80/** Attempt to obtain address 0, blocks.
    7981 *
    8082 * @param[in] instance Device keeper structure to use.
     
    9092}
    9193/*----------------------------------------------------------------------------*/
    92 /** Checks setup data for signs of toggle reset.
     94/** Check setup packet data for signs of toggle reset.
    9395 *
    9496 * @param[in] instance Device keeper structure to use.
    9597 * @param[in] target Device to receive setup packet.
    9698 * @param[in] data Setup packet data.
     99 *
     100 * Really ugly one.
    97101 */
    98102void device_keeper_reset_if_need(
     
    105109            || !instance->devices[target.address].occupied) {
    106110                fibril_mutex_unlock(&instance->guard);
     111                usb_log_error("Invalid data when checking for toggle reset.\n");
    107112                return;
    108113        }
     
    130135}
    131136/*----------------------------------------------------------------------------*/
    132 /** Gets current value of endpoint toggle.
     137/** Get current value of endpoint toggle.
    133138 *
    134139 * @param[in] instance Device keeper structure to use.
     
    144149            || target.address >= USB_ADDRESS_COUNT || target.address < 0
    145150            || !instance->devices[target.address].occupied) {
     151                usb_log_error("Invalid data when asking for toggle value.\n");
    146152                ret = EINVAL;
    147153        } else {
    148                 ret =
    149                     (instance->devices[target.address].toggle_status
     154                ret = (instance->devices[target.address].toggle_status
    150155                        >> target.endpoint) & 1;
    151156        }
     
    154159}
    155160/*----------------------------------------------------------------------------*/
    156 /** Sets current value of endpoint toggle.
     161/** Set current value of endpoint toggle.
    157162 *
    158163 * @param[in] instance Device keeper structure to use.
    159164 * @param[in] target Device and endpoint used.
    160  * @param[in] toggle Current toggle value.
     165 * @param[in] toggle Toggle value.
    161166 * @return Error code.
    162167 */
     
    170175            || target.address >= USB_ADDRESS_COUNT || target.address < 0
    171176            || !instance->devices[target.address].occupied) {
     177                usb_log_error("Invalid data when setting toggle value.\n");
    172178                ret = EINVAL;
    173179        } else {
     
    183189}
    184190/*----------------------------------------------------------------------------*/
    185 /** Gets a free USB address
     191/** Get a free USB address
    186192 *
    187193 * @param[in] instance Device keeper structure to use.
     
    216222}
    217223/*----------------------------------------------------------------------------*/
    218 /** Binds USB address to devman handle.
     224/** Bind USB address to devman handle.
    219225 *
    220226 * @param[in] instance Device keeper structure to use.
     
    234240}
    235241/*----------------------------------------------------------------------------*/
    236 /** Releases used USB address.
     242/** Release used USB address.
    237243 *
    238244 * @param[in] instance Device keeper structure to use.
     
    251257}
    252258/*----------------------------------------------------------------------------*/
    253 /** Finds USB address associated with the device
     259/** Find USB address associated with the device
    254260 *
    255261 * @param[in] instance Device keeper structure to use.
     
    274280}
    275281/*----------------------------------------------------------------------------*/
    276 /** Gets speed associated with the address
     282/** Get speed associated with the address
    277283 *
    278284 * @param[in] instance Device keeper structure to use.
Note: See TracChangeset for help on using the changeset viewer.