Lines Matching defs:interface

151 	// reset the device by switching the data interface to the disabled first
152 // interface and then enable it by setting the second actual data interface
156 usb_interface_info *interface = config->interface[fDataInterfaceIndex].active;
157 if (interface->endpoint_count < 2) {
158 TRACE_ALWAYS("setting the data alternate interface failed\n");
162 if (!(interface->endpoint[0].descr->endpoint_address & USB_ENDPOINT_ADDR_DIR_IN))
163 fWriteEndpoint = interface->endpoint[0].handle;
165 fReadEndpoint = interface->endpoint[0].handle;
167 if (interface->endpoint[1].descr->endpoint_address & USB_ENDPOINT_ADDR_DIR_IN)
168 fReadEndpoint = interface->endpoint[1].handle;
170 fWriteEndpoint = interface->endpoint[1].handle;
628 const usb_interface_info *interface = config->interface[j].active;
629 usb_interface_descriptor *descriptor = interface->descr;
633 || interface->generic_count == 0) {
638 // descriptors (they allow us to locate the data interface)
640 for (size_t k = 0; k < interface->generic_count; k++) {
641 usb_generic_descriptor *generic = &interface->generic[k]->generic;
675 TRACE_ALWAYS("control interface index invalid\n");
679 // check that the indicated control interface fits our needs
680 usb_interface_info *interface = config->interface[controlIndex].active;
681 usb_interface_descriptor *descriptor = interface->descr;
685 || interface->endpoint_count == 0) {
686 TRACE_ALWAYS("control interface invalid\n");
690 fNotifyEndpoint = interface->endpoint[0].handle;
691 if (interface->endpoint[0].descr->max_packet_size > sizeof(fNotifyBuffer)) {
693 interface->endpoint[0].descr->max_packet_size);
698 TRACE_ALWAYS("data interface index %d out of range %" B_PRIuSIZE "\n", dataIndex,
703 interface = &config->interface[dataIndex].alt[0];
704 descriptor = interface->descr;
706 || interface->endpoint_count < 2) {
707 TRACE_ALWAYS("data interface %d invalid (class %x, %" B_PRIuSIZE " endpoints)\n", dataIndex,
708 descriptor->interface_class, interface->endpoint_count);