Changes in uspace/drv/uhci/main.c [4317827:7972b51] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/main.c
r4317827 r7972b51 28 28 #include <usb/hcdhubd.h> 29 29 #include <errno.h> 30 #include "uhci.h"31 30 32 static device_ops_t uhci_ops = { 33 .interfaces[USBHC_DEV_IFACE] = &uhci_iface, 31 static int enqueue_transfer_out(usb_hc_device_t *hc, 32 usb_hcd_attached_device_info_t *dev, usb_hc_endpoint_info_t *endpoint, 33 void *buffer, size_t size, 34 usb_hcd_transfer_callback_out_t callback, void *arg) 35 { 36 printf("UHCI: transfer OUT [%d.%d (%s); %u]\n", 37 dev->address, endpoint->endpoint, 38 usb_str_transfer_type(endpoint->transfer_type), 39 size); 40 return ENOTSUP; 41 } 42 43 static int enqueue_transfer_setup(usb_hc_device_t *hc, 44 usb_hcd_attached_device_info_t *dev, usb_hc_endpoint_info_t *endpoint, 45 void *buffer, size_t size, 46 usb_hcd_transfer_callback_out_t callback, void *arg) 47 { 48 printf("UHCI: transfer SETUP [%d.%d (%s); %u]\n", 49 dev->address, endpoint->endpoint, 50 usb_str_transfer_type(endpoint->transfer_type), 51 size); 52 return ENOTSUP; 53 } 54 55 static int enqueue_transfer_in(usb_hc_device_t *hc, 56 usb_hcd_attached_device_info_t *dev, usb_hc_endpoint_info_t *endpoint, 57 void *buffer, size_t size, 58 usb_hcd_transfer_callback_in_t callback, void *arg) 59 { 60 printf("UHCI: transfer IN [%d.%d (%s); %u]\n", 61 dev->address, endpoint->endpoint, 62 usb_str_transfer_type(endpoint->transfer_type), 63 size); 64 return ENOTSUP; 65 } 66 67 static usb_hcd_transfer_ops_t uhci_transfer_ops = { 68 .transfer_out = enqueue_transfer_out, 69 .transfer_in = enqueue_transfer_in, 70 .transfer_setup = enqueue_transfer_setup 34 71 }; 35 72 36 static int uhci_add_ device(device_t *device)73 static int uhci_add_hc(usb_hc_device_t *device) 37 74 { 38 device-> ops = &uhci_ops;75 device->transfer_ops = &uhci_transfer_ops; 39 76 40 77 /* … … 46 83 } 47 84 48 static driver_ops_t uhci_driver_ops = { 49 .add_device = uhci_add_device, 50 }; 51 52 static driver_t uhci_driver = { 53 .name = NAME, 54 .driver_ops = &uhci_driver_ops 85 usb_hc_driver_t uhci_driver = { 86 .name = "uhci", 87 .add_hc = uhci_add_hc 55 88 }; 56 89 … … 60 93 * Do some global initializations. 61 94 */ 62 sleep(5);63 95 64 return driver_main(&uhci_driver);96 return usb_hcd_main(&uhci_driver); 65 97 }
Note:
See TracChangeset
for help on using the changeset viewer.