Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/hcdhubd.h

    r4317827 rb5ec347  
    6565} usb_hcd_attached_device_info_t;
    6666
    67 /** Information about attached hub. */
    68 typedef struct {
    69         /** Number of ports. */
    70         size_t port_count;
    71         /** General device info. */
    72         usb_hcd_attached_device_info_t *device;
    73         /** Link to other hubs. */
    74         link_t link;
    75 } usb_hcd_hub_info_t;
    7667
    7768/** Host controller device. */
     
    116107} usb_hcd_transfer_ops_t;
    117108
     109/**
     110 * @brief structure holding information about free and used addresses
     111 *
     112 * This structure should not be used outside usb hcd driver.
     113 * You better consider it to be 'private'.
     114 */
     115typedef struct {
     116        /** lower bound included in the interval */
     117        usb_address_t lower_bound;
     118
     119        /** upper bound, excluded from the interval */
     120        usb_address_t upper_bound;
     121
     122        /** */
     123        link_t link;
     124}usb_address_list_t;
     125
    118126struct usb_hc_device {
    119127        /** Transfer operations. */
     
    131139        /** List of hubs operating from this HC. */
    132140        link_t hubs;
     141
     142        /** Structure with free and used addresses */
     143        link_t addresses;
    133144
    134145        /** Link to other driven HCs. */
     
    148159int usb_hcd_add_root_hub(device_t *dev);
    149160
     161/**
     162 * find first not yet used address on this host controller and use it
     163 * @param this_hcd
     164 * @return number in the range of allowed usb addresses or
     165 *     a negative number if not succesful
     166 */
     167usb_address_t usb_use_free_address(usb_hc_device_t * this_hcd);
     168
     169/**
     170 * @brief free the address in the address space of this hcd.
     171 *
     172 * if address is not used, nothing happens
     173 * @param this_hcd
     174 * @param addr
     175 */
     176void usb_free_used_address(usb_hc_device_t * this_hcd, usb_address_t addr );
     177
    150178
    151179/*
Note: See TracChangeset for help on using the changeset viewer.