Changeset 4317827 in mainline for uspace/drv/uhci/main.c
- Timestamp:
- 2010-12-04T14:00:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 36c410e
- Parents:
- 62c9661
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/main.c
r62c9661 r4317827 28 28 #include <usb/hcdhubd.h> 29 29 #include <errno.h> 30 #include "uhci.h" 30 31 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 32 static device_ops_t uhci_ops = { 33 .interfaces[USBHC_DEV_IFACE] = &uhci_iface, 71 34 }; 72 35 73 static int uhci_add_ hc(usb_hc_device_t *device)36 static int uhci_add_device(device_t *device) 74 37 { 75 device-> transfer_ops = &uhci_transfer_ops;38 device->ops = &uhci_ops; 76 39 77 40 /* … … 83 46 } 84 47 85 usb_hc_driver_t uhci_driver = { 86 .name = "uhci", 87 .add_hc = uhci_add_hc 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 88 55 }; 89 56 … … 93 60 * Do some global initializations. 94 61 */ 62 sleep(5); 95 63 96 return usb_hcd_main(&uhci_driver);64 return driver_main(&uhci_driver); 97 65 }
Note:
See TracChangeset
for help on using the changeset viewer.