Changeset 47a9633 in mainline
- Timestamp:
- 2017-12-20T13:57:14Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 02a7575
- Parents:
- 9fd8f14
- Location:
- uspace/drv/bus/usb/usbdiag
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbdiag/device.c
r9fd8f14 r47a9633 43 43 44 44 #define NAME "usbdiag" 45 46 #define EP_DIR_OUT 047 #define EP_DIR_IN 0x8048 #define EP_INT_IN (EP_DIR_IN | 0x01)49 #define EP_INT_OUT (EP_DIR_OUT | 0x02)50 #define EP_BULK_IN (EP_DIR_IN | 0x03)51 #define EP_BULK_OUT (EP_DIR_OUT | 0x04)52 #define EP_ISOC_IN (EP_DIR_IN | 0x05)53 #define EP_ISOC_OUT (EP_DIR_OUT | 0x06)54 45 55 46 … … 114 105 dev->fun = fun; 115 106 116 usb_endpoint_mapping_t *epm_out = usb_device_get_mapped_ep(dev->usb_dev, EP_BULK_OUT);117 usb_endpoint_mapping_t *epm_in = usb_device_get_mapped_ep(dev->usb_dev, EP_BULK_IN);107 usb_endpoint_mapping_t *epm_out = usb_device_get_mapped_ep(dev->usb_dev, USB_DIAG_EP_BULK_OUT); 108 usb_endpoint_mapping_t *epm_in = usb_device_get_mapped_ep(dev->usb_dev, USB_DIAG_EP_BULK_IN); 118 109 119 110 if (!epm_in || !epm_out || !epm_in->present || !epm_out->present) { -
uspace/drv/bus/usb/usbdiag/device.h
r9fd8f14 r47a9633 39 39 #include <usb/dev/device.h> 40 40 41 #define USB_DIAG_EP_INTR_IN 1 42 #define USB_DIAG_EP_INTR_OUT 2 43 #define USB_DIAG_EP_BULK_IN 3 44 #define USB_DIAG_EP_BULK_OUT 4 45 #define USB_DIAG_EP_ISOCH_IN 5 46 #define USB_DIAG_EP_ISOCH_OUT 6 47 41 48 /** 42 49 * USB diagnostic device. -
uspace/drv/bus/usb/usbdiag/main.c
r9fd8f14 r47a9633 36 36 #include <errno.h> 37 37 #include <usb/debug.h> 38 #include <usb/classes/classes.h> 38 39 #include <usb/dev/driver.h> 39 40 #include <usbdiag_iface.h> … … 123 124 return ddf_fun_offline(fun); 124 125 } 126 127 static const usb_endpoint_description_t intr_in_ep = { 128 .transfer_type = USB_TRANSFER_INTERRUPT, 129 .direction = USB_DIRECTION_IN, 130 .interface_class = USB_CLASS_DIAGNOSTIC, 131 .flags = 0 132 }; 133 static const usb_endpoint_description_t intr_out_ep = { 134 .transfer_type = USB_TRANSFER_INTERRUPT, 135 .direction = USB_DIRECTION_OUT, 136 .interface_class = USB_CLASS_DIAGNOSTIC, 137 .flags = 0 138 }; 139 static const usb_endpoint_description_t bulk_in_ep = { 140 .transfer_type = USB_TRANSFER_BULK, 141 .direction = USB_DIRECTION_IN, 142 .interface_class = USB_CLASS_DIAGNOSTIC, 143 .flags = 0 144 }; 145 static const usb_endpoint_description_t bulk_out_ep = { 146 .transfer_type = USB_TRANSFER_BULK, 147 .direction = USB_DIRECTION_OUT, 148 .interface_class = USB_CLASS_DIAGNOSTIC, 149 .flags = 0 150 }; 151 static const usb_endpoint_description_t isoch_in_ep = { 152 .transfer_type = USB_TRANSFER_ISOCHRONOUS, 153 .direction = USB_DIRECTION_IN, 154 .interface_class = USB_CLASS_DIAGNOSTIC, 155 .flags = 0 156 }; 157 static const usb_endpoint_description_t isoch_out_ep = { 158 .transfer_type = USB_TRANSFER_ISOCHRONOUS, 159 .direction = USB_DIRECTION_OUT, 160 .interface_class = USB_CLASS_DIAGNOSTIC, 161 .flags = 0 162 }; 163 164 static const usb_endpoint_description_t *diag_endpoints[] = { 165 &intr_in_ep, 166 &intr_out_ep, 167 &bulk_in_ep, 168 &bulk_out_ep, 169 &isoch_in_ep, 170 &isoch_out_ep, 171 NULL 172 }; 125 173 126 174 /** USB diagnostic driver ops. */ … … 137 185 .name = NAME, 138 186 .ops = &diag_driver_ops, 139 .endpoints = NULL187 .endpoints = diag_endpoints 140 188 }; 141 189
Note:
See TracChangeset
for help on using the changeset viewer.