Lines Matching defs:interface

102 	// reset the device by switching the data interface to the disabled first
103 // interface and then enable it by setting the second actual data interface
108 &config->interface[fDataInterfaceIndex].alt[0]);
113 &config->interface[fDataInterfaceIndex].alt[1]);
115 &config->interface[fControlInterfaceIndex].alt[0]);
119 usb_interface_info *interface = config->interface[fDataInterfaceIndex].active;
120 if (interface->endpoint_count < 2) {
121 TRACE_ALWAYS("setting the data alternate interface failed\n");
125 if (!(interface->endpoint[0].descr->endpoint_address & USB_ENDPOINT_ADDR_DIR_IN))
126 fWriteEndpoint = interface->endpoint[0].handle;
128 fReadEndpoint = interface->endpoint[0].handle;
130 if (interface->endpoint[1].descr->endpoint_address & USB_ENDPOINT_ADDR_DIR_IN)
131 fReadEndpoint = interface->endpoint[1].handle;
133 fWriteEndpoint = interface->endpoint[1].handle;
167 // interface to the disabled alternate
172 &config->interface[fDataInterfaceIndex].alt[0]);
398 const usb_interface_info *interface = config->interface[j].active;
399 usb_interface_descriptor *descriptor = interface->descr;
402 || interface->generic_count == 0) {
409 for (size_t k = 0; k < interface->generic_count; k++) {
410 usb_generic_descriptor *generic = &interface->generic[k]->generic;
446 TRACE_ALWAYS("control interface index invalid\n");
450 // check that the indicated control interface fits our needs
451 usb_interface_info *interface = config->interface[controlIndex].active;
452 usb_interface_descriptor *descriptor = interface->descr;
455 || interface->endpoint_count == 0) {
456 TRACE_ALWAYS("control interface invalid\n");
461 fNotifyEndpoint = interface->endpoint[0].handle;
462 fNotifyBufferLength = interface->endpoint[0].descr->max_packet_size;
465 TRACE_ALWAYS("data interface index invalid\n");
469 // check that the indicated data interface fits our needs
470 if (config->interface[dataIndex].alt_count < 2) {
471 TRACE_ALWAYS("data interface does not provide two alternate interfaces\n");
475 // alternate 0 is the disabled, endpoint-less default interface
476 interface = &config->interface[dataIndex].alt[1];
477 descriptor = interface->descr;
479 || interface->endpoint_count < 2) {
480 TRACE_ALWAYS("data interface invalid\n");