Changes in uspace/drv/vhc/connhost.c [ce687bbe:a39f4cf] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/vhc/connhost.c
rce687bbe ra39f4cf 36 36 #include <errno.h> 37 37 #include <usb/usb.h> 38 #include <usb/hcd.h> 38 39 39 40 #include "vhcd.h" … … 57 58 case USB_DIRECTION_IN: 58 59 transfer->in_callback(transfer->dev, 59 size, outcome,60 outcome, size, 60 61 transfer->arg); 61 62 break; … … 92 93 usbhc_iface_transfer_out_callback_t callback, void *arg) 93 94 { 94 printf(NAME ": transfer OUT [%d.%d (%s); %u]\n",95 dprintf(3, "transfer OUT [%d.%d (%s); %zu]", 95 96 target.address, target.endpoint, 96 97 usb_str_transfer_type(transfer_type), … … 112 113 usbhc_iface_transfer_out_callback_t callback, void *arg) 113 114 { 114 printf(NAME ": transfer SETUP [%d.%d (%s); %u]\n",115 dprintf(3, "transfer SETUP [%d.%d (%s); %zu]", 115 116 target.address, target.endpoint, 116 117 usb_str_transfer_type(transfer_type), … … 132 133 usbhc_iface_transfer_in_callback_t callback, void *arg) 133 134 { 134 printf(NAME ": transfer IN [%d.%d (%s); %u]\n",135 dprintf(3, "transfer IN [%d.%d (%s); %zu]", 135 136 target.address, target.endpoint, 136 137 usb_str_transfer_type(transfer_type), … … 218 219 } 219 220 221 static usb_address_keeping_t addresses; 222 223 224 static int reserve_default_address(device_t *dev) 225 { 226 usb_address_keeping_reserve_default(&addresses); 227 return EOK; 228 } 229 230 static int release_default_address(device_t *dev) 231 { 232 usb_address_keeping_release_default(&addresses); 233 return EOK; 234 } 235 236 static int request_address(device_t *dev, usb_address_t *address) 237 { 238 usb_address_t addr = usb_address_keeping_request(&addresses); 239 if (addr < 0) { 240 return (int)addr; 241 } 242 243 *address = addr; 244 return EOK; 245 } 246 247 static int release_address(device_t *dev, usb_address_t address) 248 { 249 return usb_address_keeping_release(&addresses, address); 250 } 251 252 static int bind_address(device_t *dev, usb_address_t address, 253 devman_handle_t handle) 254 { 255 usb_address_keeping_devman_bind(&addresses, address, handle); 256 return EOK; 257 } 258 259 static int tell_address(device_t *dev, devman_handle_t handle, 260 usb_address_t *address) 261 { 262 usb_address_t addr = usb_address_keeping_find(&addresses, handle); 263 if (addr < 0) { 264 return addr; 265 } 266 267 *address = addr; 268 return EOK; 269 } 270 271 void address_init(void) 272 { 273 usb_address_keeping_init(&addresses, 50); 274 } 220 275 221 276 usbhc_iface_t vhc_iface = {
Note:
See TracChangeset
for help on using the changeset viewer.