Home
last modified time | relevance | path

Searched refs:bos_desc (Results 1 – 2 of 2) sorted by relevance

/third_party/libusb/libusb/
Ddescriptor.c765 const struct usbi_bos_descriptor *bos_desc; in parse_bos() local
775 bos_desc = (const struct usbi_bos_descriptor *)buffer; in parse_bos()
776 if (bos_desc->bDescriptorType != LIBUSB_DT_BOS) { in parse_bos()
778 bos_desc->bDescriptorType, LIBUSB_DT_BOS); in parse_bos()
780 } else if (bos_desc->bLength < LIBUSB_DT_BOS_SIZE) { in parse_bos()
781 usbi_err(ctx, "invalid bos bLength (%u)", bos_desc->bLength); in parse_bos()
783 } else if (bos_desc->bLength > size) { in parse_bos()
785 size, bos_desc->bLength); in parse_bos()
789 _bos = calloc(1, sizeof(*_bos) + bos_desc->bNumDeviceCaps * sizeof(void *)); in parse_bos()
/third_party/libusb/examples/
Dxusb.c802 struct libusb_bos_descriptor *bos_desc; in test_device() local
855 if (libusb_get_bos_descriptor(handle, &bos_desc) == LIBUSB_SUCCESS) { in test_device()
856 printf("%d caps\n", bos_desc->bNumDeviceCaps); in test_device()
857 for (i = 0; i < bos_desc->bNumDeviceCaps; i++) in test_device()
858 print_device_cap(bos_desc->dev_capability[i]); in test_device()
859 libusb_free_bos_descriptor(bos_desc); in test_device()