Changes in uspace/lib/usb/src/hcdrv.c [4317827:4144630] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/src/hcdrv.c
r4317827 r4144630 47 47 LIST_INITIALIZE(hc_list); 48 48 49 /* Fake driver to have the name item initialized. */ 50 static usb_hc_driver_t hc_driver_fake = { 51 .name = "HCD", 52 }; 49 /** Our HC driver. */ 50 usb_hc_driver_t *hc_driver = NULL; 53 51 54 /** Our HC driver. */ 55 usb_hc_driver_t *hc_driver = &hc_driver_fake; 52 int usb_lowest_address = 1; 53 54 int usb_highest_address = 255; 56 55 57 56 static device_ops_t usb_device_ops = { 58 57 .interfaces[USBHC_DEV_IFACE] = &usbhc_interface 59 58 }; 59 60 61 void 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 } 60 69 61 70 static usb_hc_device_t *usb_hc_device_create(device_t *dev) { … … 64 73 list_initialize(&hc_dev->link); 65 74 list_initialize(&hc_dev->hubs); 75 usb_create_address_list(hc_dev); 66 76 list_initialize(&hc_dev->attached_devices); 67 77 hc_dev->transfer_ops = NULL; … … 76 86 int usb_add_hc_device(device_t *dev) 77 87 { 78 return ENOTSUP;79 88 usb_hc_device_t *hc_dev = usb_hc_device_create(dev); 80 89
Note:
See TracChangeset
for help on using the changeset viewer.