Lines Matching refs:interface
42 IOUSBInterfaceInterface **interface;
78 //* adb interface
88 //* Match based on vendor id, interface subclass and protocol
137 //* Create an intermediate interface plugin
144 DBG("ERR: Unable to create an interface plug-in (%08x)\n", kr);
148 //* This gets us the interface object
152 //* We only needed the plugin to get the interface, so discard it
155 DBG("ERR: Couldn't query the interface (%08x)\n", (int) result);
160 //* device; after getting a plugin, and querying the interface, of
165 DBG("ERR: Couldn't grab device from interface (%08x)\n", kr);
188 DBG("ERR: Couldn't create a device interface (%08x)\n",
194 //* the interface that matched our criteria
261 DBG("ERR: Could not find device interface: %08x\n", kr);
301 //* TODO: simplify this further since we only register to get ADB interface
304 CheckInterface(IOUSBInterfaceInterface **interface, UInt16 vendor, UInt16 product)
312 //* Now open the interface. This will cause the pipes associated with
313 //* the endpoints in the interface descriptor to be instantiated
314 kr = (*interface)->USBInterfaceOpen(interface);
316 DBG("ERR: Could not open interface: (%08x)\n", kr);
320 //* Get the number of endpoints associated with this interface
321 kr = (*interface)->GetNumEndpoints(interface, &interfaceNumEndpoints);
327 //* Get interface class, subclass and protocol
328 if ((*interface)->GetInterfaceClass(interface, &interfaceClass) != kIOReturnSuccess ||
329 (*interface)->GetInterfaceSubClass(interface, &interfaceSubClass) != kIOReturnSuccess ||
330 (*interface)->GetInterfaceProtocol(interface, &interfaceProtocol) != kIOReturnSuccess) {
331 DBG("ERR: Unable to get interface class, subclass and protocol\n");
335 //* check to make sure interface class, subclass and protocol match ADB
343 //* Iterate over the endpoints for this interface and find the first
352 kr = (*interface)->GetPipeProperties(interface, endpoint, &direction,
372 handle->interface = interface;
380 (*interface)->USBInterfaceClose(interface);
462 if (NULL == handle->interface) {
463 DBG("ERR: usb_write interface was null\n");
473 (*handle->interface)->WritePipe(
474 handle->interface, handle->bulkOut, (void *)buf, len);
480 (*handle->interface)->WritePipe(
481 handle->interface, handle->bulkOut, (void *)buf, 0);
505 if (NULL == handle->interface) {
506 DBG("ERR: usb_read interface was null\n");
516 (*handle->interface)->ReadPipe(handle->interface,
535 /* release the interface */
539 if (handle->interface)
541 (*handle->interface)->USBInterfaceClose(handle->interface);
542 (*handle->interface)->Release(handle->interface);
543 handle->interface = 0;