Ignore:
Timestamp:
2011-10-29T20:17:51Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c44a5f1
Parents:
549ff23
Message:

libusbhost: endpoint_t: extend mutex protection, add doxygen comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/include/usb/host/endpoint.h

    r549ff23 r17412546  
    4141#include <usb/usb.h>
    4242
     43/** Host controller side endpoint structure. */
    4344typedef struct endpoint {
     45        /** Part of linked list. */
    4446        link_t link;
     47        /** USB address. */
    4548        usb_address_t address;
     49        /** USB endpoint number. */
    4650        usb_endpoint_t endpoint;
     51        /** Communication direction. */
    4752        usb_direction_t direction;
     53        /** USB transfer type. */
    4854        usb_transfer_type_t transfer_type;
     55        /** Communication speed. */
    4956        usb_speed_t speed;
     57        /** Maximum size of data packets. */
    5058        size_t max_packet_size;
     59        /** Necessary bandwidth. */
    5160        size_t bandwidth;
     61        /** Value of the toggle bit. */
    5262        unsigned toggle:1;
     63        /** True if there is a batch using this scheduled for this endpoint. */
     64        volatile bool active;
     65        /** Protects resources and active status changes. */
    5366        fibril_mutex_t guard;
     67        /** Signals change of active status. */
    5468        fibril_condvar_t avail;
    55         volatile bool active;
     69        /** Optional device specific data. */
    5670        struct {
     71                /** Device specific data. */
    5772                void *data;
     73                /** Callback to get the value of toggle bit. */
    5874                int (*toggle_get)(void *);
     75                /** Callback to set the value of toggle bit. */
    5976                void (*toggle_set)(void *, int);
    6077        } hc_data;
     
    7693void endpoint_toggle_set(endpoint_t *instance, int toggle);
    7794
     95/** list_get_instance wrapper.
     96 * @param item Pointer to link member.
     97 * @return Pointer to enpoint_t structure.
     98 */
    7899static inline endpoint_t * endpoint_get_instance(link_t *item)
    79100{
Note: See TracChangeset for help on using the changeset viewer.