Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 84439d7 in mainline for uspace/lib/usb/include/usb/hcdhubd.h


Ignore:
Timestamp:
2010-12-05T09:34:46Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
75732da
Parents:
56b962d (diff), 35537a7 (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:

Merge with development/

File:
1 edited

Legend:

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

    r56b962d r84439d7  
    3737
    3838#include <adt/list.h>
     39#include <bool.h>
    3940#include <driver.h>
    4041#include <usb/usb.h>
     
    115116} usb_hcd_transfer_ops_t;
    116117
     118/**
     119 * @brief structure holding information about free and used addresses
     120 *
     121 * This structure should not be used outside usb hcd driver.
     122 * You better consider it to be 'private'.
     123 */
     124typedef struct {
     125        /** lower bound included in the interval */
     126        usb_address_t lower_bound;
     127
     128        /** upper bound, excluded from the interval */
     129        usb_address_t upper_bound;
     130
     131        /** */
     132        link_t link;
     133}usb_address_list_t;
     134
    117135struct usb_hc_device {
    118136        /** Transfer operations. */
     
    130148        /** List of hubs operating from this HC. */
    131149        link_t hubs;
     150
     151        /** Structure with free and used addresses */
     152        link_t addresses;
    132153
    133154        /** Link to other driven HCs. */
     
    145166
    146167int usb_hcd_main(usb_hc_driver_t *);
    147 int usb_hcd_add_root_hub(usb_hc_device_t *dev);
     168int usb_hcd_add_root_hub(device_t *dev);
     169
     170/**
     171 * find first not yet used address on this host controller and use it
     172 * @param this_hcd
     173 * @return number in the range of allowed usb addresses or
     174 *     a negative number if not succesful
     175 */
     176usb_address_t usb_use_free_address(usb_hc_device_t * this_hcd);
     177
     178/**
     179 * @brief free the address in the address space of this hcd.
     180 *
     181 * if address is not used, nothing happens
     182 * @param this_hcd
     183 * @param addr
     184 */
     185void usb_free_used_address(usb_hc_device_t * this_hcd, usb_address_t addr );
    148186
    149187
     
    153191 */
    154192
     193device_t *usb_hc_connect(device_t *);
    155194
    156195int usb_hc_async_interrupt_out(usb_hc_device_t *, usb_target_t,
     
    175214int usb_hc_async_wait_for(usb_handle_t);
    176215
     216int usb_hc_add_child_device(device_t *, const char *, const char *, bool);
    177217
    178218#endif
Note: See TracChangeset for help on using the changeset viewer.