D:\03Code\hidTest\Debug\hidTest.exe
hidapi:hid的USB设备通讯
需积分: 0 29 浏览量
更新于2024-05-08
收藏 15.4MB ZIP 举报
遍历设备中所有hid设备找的自己的并进行通讯;
devs = hid_enumerate(0x0, 0x0);
cur_dev = devs;
while (cur_dev) {
printf("Device Found\n type: %04hx %04hx\n path: %s\n serial_number: %ls", cur_dev->vendor_id, cur_dev->product_id, cur_dev->path, cur_dev->serial_number);
printf("\n");
printf(" Manufacturer: %ls\n", cur_dev->manufacturer_string);
printf(" Product: %ls\n", cur_dev->product_string);
printf(" Release: %hx\n", cur_dev->release_number);
printf(" Interface: %d\n", cur_dev->interface_nu