Changeset 2cb6571 in mainline for uspace/lib/usb/src/hcdrv.c


Ignore:
Timestamp:
2010-12-03T15:49:30Z (15 years ago)
Author:
smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36c410e, 54b141a
Parents:
1dd264b (diff), 4144630 (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 smekideki

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/hcdrv.c

    r1dd264b r2cb6571  
    5050usb_hc_driver_t *hc_driver = NULL;
    5151
     52int usb_lowest_address = 1;
     53
     54int usb_highest_address = 255;
     55
    5256static device_ops_t usb_device_ops = {
    5357        .interfaces[USBHC_DEV_IFACE] = &usbhc_interface
    5458};
     59
     60
     61void usb_create_address_list(usb_hc_device_t * hcd){
     62        list_initialize(&hcd->addresses);
     63        usb_address_list_t * range =
     64                        (usb_address_list_t*)malloc(sizeof(usb_address_list_t));
     65        range->lower_bound = usb_lowest_address;
     66        range->upper_bound = usb_highest_address + 1;
     67        list_append(&range->link, &hcd->addresses);
     68}
    5569
    5670static usb_hc_device_t *usb_hc_device_create(device_t *dev) {
     
    5973        list_initialize(&hc_dev->link);
    6074        list_initialize(&hc_dev->hubs);
     75        usb_create_address_list(hc_dev);
    6176        list_initialize(&hc_dev->attached_devices);
    6277        hc_dev->transfer_ops = NULL;
Note: See TracChangeset for help on using the changeset viewer.