Changeset 9e80904 in mainline
- Timestamp:
- 2011-02-07T13:28:25Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c8dd5b1
- Parents:
- e2172cf8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/iface.c
re2172cf8 r9e80904 128 128 usbhc_iface_transfer_out_callback_t callback, void *arg) 129 129 { 130 assert(dev); 131 uhci_t *hc = dev_to_uhci(dev); 132 assert(hc); 133 return uhci_transfer(hc, dev, target, USB_TRANSFER_CONTROL, 0, USB_PID_SETUP, 134 false, data, size, callback, NULL, arg); 130 tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL, 131 8, FULL_SPEED, data, size, NULL, callback, arg); 132 if (!tracker) 133 return ENOMEM; 134 tracker_control_setup_old(tracker); 135 return EOK; 135 136 } 136 137 /*----------------------------------------------------------------------------*/ … … 139 140 usbhc_iface_transfer_out_callback_t callback, void *arg) 140 141 { 141 assert(dev); 142 uhci_t *hc = dev_to_uhci(dev); 143 assert(hc); 144 return uhci_transfer(hc, dev, target, USB_TRANSFER_CONTROL, 1, USB_PID_OUT, 145 false, data, size, callback, NULL, arg); 142 tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL, 143 size, FULL_SPEED, data, size, NULL, callback, arg); 144 if (!tracker) 145 return ENOMEM; 146 tracker_control_write_data_old(tracker); 147 return EOK; 146 148 } 147 149 /*----------------------------------------------------------------------------*/ … … 149 151 usbhc_iface_transfer_in_callback_t callback, void *arg) 150 152 { 151 assert(dev); 152 uhci_t *hc = dev_to_uhci(dev); 153 assert(hc); 154 return uhci_transfer(hc, dev, target, USB_TRANSFER_CONTROL, 0, USB_PID_IN, 155 false, NULL, 0, NULL, callback, arg); 153 tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL, 154 0, FULL_SPEED, NULL, 0, callback, NULL, arg); 155 if (!tracker) 156 return ENOMEM; 157 tracker_control_write_status_old(tracker); 158 return EOK; 156 159 } 157 160 /*----------------------------------------------------------------------------*/ … … 160 163 usbhc_iface_transfer_out_callback_t callback, void *arg) 161 164 { 162 assert(dev); 163 uhci_t *hc = dev_to_uhci(dev); 164 assert(hc); 165 return uhci_transfer(hc, dev, target, USB_TRANSFER_CONTROL, 0, USB_PID_SETUP, 166 false, data, size, callback, NULL, arg); 165 tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL, 166 8, FULL_SPEED, data, size, NULL, callback, arg); 167 if (!tracker) 168 return ENOMEM; 169 tracker_control_setup_old(tracker); 170 return EOK; 167 171 } 168 172 /*----------------------------------------------------------------------------*/ … … 171 175 usbhc_iface_transfer_in_callback_t callback, void *arg) 172 176 { 173 assert(dev); 174 uhci_t *hc = dev_to_uhci(dev); 175 assert(hc); 176 return uhci_transfer(hc, dev, target, USB_TRANSFER_CONTROL, 1, USB_PID_IN, 177 false, data, size, NULL, callback, arg); 177 tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL, 178 size, FULL_SPEED, data, size, callback, NULL, arg); 179 if (!tracker) 180 return ENOMEM; 181 tracker_control_read_data_old(tracker); 182 return EOK; 178 183 } 179 184 /*----------------------------------------------------------------------------*/ … … 181 186 usbhc_iface_transfer_out_callback_t callback, void *arg) 182 187 { 183 assert(dev);184 uhci_t *hc = dev_to_uhci(dev);185 assert(hc);186 return uhci_transfer(hc, dev, target, USB_TRANSFER_CONTROL, 0, USB_PID_OUT,187 false, NULL, 0, callback, NULL, arg);188 } 189 190 188 tracker_t *tracker = tracker_get(dev, target, USB_TRANSFER_CONTROL, 189 0, FULL_SPEED, NULL, 0, NULL, callback, arg); 190 if (!tracker) 191 return ENOMEM; 192 tracker_control_read_status_old(tracker); 193 return EOK; 194 } 195 /*----------------------------------------------------------------------------*/ 191 196 usbhc_iface_t uhci_iface = { 192 197 .tell_address = get_address,
Note:
See TracChangeset
for help on using the changeset viewer.