Reads data from USB device and prints its size to output window.
usb_read(path); usb_read(path, size); usb_read(path, size, timeout);
Read 8 bytes of data:
path = "\\?\hid#vid_045e&pid_028e&ig_00#8&1fa5fd5b&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"; result = usb_read(path, 8, 50);
result:
8
Read USB packet size:
path = "\\?\hid#vid_045e&pid_028e&ig_00#8&1fa5fd5b&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"; result = usb_read(path, 0, 50);
result:
14
Read data until buffer is full:
path = "\\?\hid#vid_045e&pid_028e&ig_00#8&1fa5fd5b&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"; result = usb_read(path, -1, 50);
result:
266