Lines Matching refs:index

104     // map from endpoint index to function
134 // for mapping bEndpointAddress value to/from index in range 0 - 31
137 #define ep_index_to_address(index) (((index) & 0xF) | (((index) & 0x10) << 3))
340 unsigned index = ep_address_to_index(desc->bEndpointAddress);
341 if (index == 0 || index >= countof(dev->endpoint_map) ||
342 endpoint_map[index] != function) {
404 for (unsigned index = start; index <= end; index++) {
405 if (endpoint_map[index] == NULL) {
406 endpoint_map[index] = function;
408 *out_address = ep_index_to_address(index);
475 uint16_t value, uint16_t index, void* buffer,
481 if (desc_type == USB_DT_DEVICE && index == 0) {
491 } else if (desc_type == USB_DT_CONFIG && index == 0) {
519 unsigned index = 2;
523 while (*string && index < sizeof(desc) - 2) {
524 desc[index++] = *string++;
525 desc[index++] = 0;
529 desc[index++] = 0;
530 desc[index++] = 0;
531 header->bLength = index;
541 zxlogf(ERROR, "usb_device_get_descriptor unsupported value: %d index: %d\n", value, index);
583 uint16_t index = le16toh(setup->wIndex);
587 zxlogf(TRACE, "usb_dev_control type: 0x%02X req: %d value: %d index: %d length: %d\n",
588 request_type, request, value, index, length);
595 return usb_dev_get_descriptor(dev, request_type, value, index, buffer, length,
610 return usb_dev_set_interface(dev, index, value);
613 usb_function_t* function = dev->interface_map[index];
623 index = ep_address_to_index(index);
624 if (index == 0 || index >= USB_MAX_EPS) {
627 usb_function_t* function = dev->endpoint_map[index];
697 uint8_t index;
698 zx_status_t status = usb_device_alloc_string_desc(dev, in_buf, &index);
703 *((uint8_t *)out_buf) = index;
704 *out_actual = sizeof(index);
754 int index = 0;
758 snprintf(name, sizeof(name), "function-%03d", index);
788 index++;