Lines Matching refs:xfr
43 static void LIBUSB_CALL cb_xfr(struct libusb_transfer *xfr) in cb_xfr() argument
47 if (xfr->status != LIBUSB_TRANSFER_COMPLETED) { in cb_xfr()
48 fprintf(stderr, "transfer status %d\n", xfr->status); in cb_xfr()
49 libusb_free_transfer(xfr); in cb_xfr()
53 if (xfr->type == LIBUSB_TRANSFER_TYPE_ISOCHRONOUS) { in cb_xfr()
54 for (i = 0; i < xfr->num_iso_packets; i++) { in cb_xfr()
55 struct libusb_iso_packet_descriptor *pack = &xfr->iso_packet_desc[i]; in cb_xfr()
66 printf("length:%u, actual_length:%u\n", xfr->length, xfr->actual_length); in cb_xfr()
67 for (i = 0; i < xfr->actual_length; i++) { in cb_xfr()
68 printf("%02x", xfr->buffer[i]); in cb_xfr()
76 num_bytes += xfr->actual_length; in cb_xfr()
79 if (libusb_submit_transfer(xfr) < 0) { in cb_xfr()
88 static struct libusb_transfer *xfr; in benchmark_in() local
94 xfr = libusb_alloc_transfer(num_iso_pack); in benchmark_in()
95 if (!xfr) in benchmark_in()
99 libusb_fill_iso_transfer(xfr, devh, ep, buf, in benchmark_in()
101 libusb_set_iso_packet_lengths(xfr, sizeof(buf)/num_iso_pack); in benchmark_in()
103 libusb_fill_bulk_transfer(xfr, devh, ep, buf, in benchmark_in()
122 return libusb_submit_transfer(xfr); in benchmark_in()