Lines Matching refs:interface
85 usb_dev_handle_info_t *info, int index, int interface, int alternate);
385 /* set when the app claims an interface */
458 * we do not need to claim an interface first
824 * switches to the alternate interface for the device
857 * the default interface.
894 hdl->device->config[index].interface[iface].num_altsetting);
897 config[index].interface[iface].num_altsetting)) {
1021 * ugen does not have a claim interface concept but all endpoints
1028 usb_claim_interface(usb_dev_handle *dev, int interface)
1045 "interface = %d\n", hdl, interface);
1067 /* is this a valid interface? */
1068 if ((interface < 0) || (interface > 255) ||
1069 (interface >= hdl->device->config[index].bNumInterfaces)) {
1075 if (dev_specific->claimed_interfaces[interface] == hdl) {
1085 if (dev_specific->claimed_interfaces[interface] != 0) {
1091 "interface = %d, claimed by this udev=%d, by hdl=0x%x\n",
1092 hdl, interface, info->claimed_interface,
1093 dev_specific->claimed_interfaces[interface]);
1096 info->claimed_interface = interface;
1098 dev_specific->claimed_interfaces[interface] = hdl;
1100 usb_set_ep_iface_alts(hdl, info, index, interface, 0);
1107 * releases the acquired interface
1113 usb_release_interface(usb_dev_handle *dev, int interface)
1130 "interface = %d\n", hdl, interface);
1133 (info->claimed_interface != interface)) {
1139 "interface = %d, claimed by this udev=%d, by hdl=0x%x\n",
1140 hdl, interface, info->claimed_interface,
1141 dev_specific->claimed_interfaces[interface]);
1143 dev_specific->claimed_interfaces[interface] = 0;
1295 * basically checks if the interface has been claimed
1332 int index, int interface, int alternate)
1344 * for the current config, this interface and alt,
1347 if_descr = &hdl->device->config[index].interface[interface].
1351 info->configuration_value, interface, alternate,
1355 ep_descr = &hdl->device->config[index].interface[interface].
1358 ep_descr->bEndpointAddress)] = interface;
1854 /* allocate interface array */
1857 if ((hdl->device->config[index].interface = calloc(len, 1)) ==
1890 if (device->config[index].interface) {
1898 free(device->config[index].interface);
1904 * parse an interface descriptor
1921 /* count the number of alternates for this interface */
1942 /* allocate alt interface setting array */
1944 if ((hdl->device->config[index].interface[iface].altsetting =
1949 hdl->device->config[index].interface[iface].num_altsetting =
1964 * frees interface resources
1976 if (device->config[index].interface[iface].altsetting) {
1977 max_alt = device->config[index].interface[iface].
1982 free(device->config[index].interface[iface].altsetting);
2030 &hdl->device->config[index].interface[iface].altsetting[alt],
2039 if ((hdl->device->config[index].interface[iface].
2045 hdl->device->config[index].interface[iface].
2047 hdl->device->config[index].interface[iface].
2059 if ((hdl->device->config[index].interface[iface].altsetting[alt].
2088 if (device->config[index].interface[iface].altsetting[alt].
2093 interface[iface].altsetting[alt];
2101 if (device->config[index].interface[iface].altsetting[alt].
2103 free(device->config[index].interface[iface].
2106 free(device->config[index].interface[iface].altsetting[alt].
2149 config[index].interface[iface].altsetting[alt].endpoint[ep],
2158 if ((hdl->device->config[index].interface[iface].
2164 (void) memcpy(hdl->device->config[index].interface[iface].
2166 hdl->device->config[index].interface[iface].
2780 * parse interface descriptor
2827 * the endpoint index is relative to the interface. index 0 is