master
ray 2024-04-19 02:48:03 +00:00
parent 9e9d47ce80
commit b332097738
1 changed files with 10 additions and 0 deletions

View File

@ -91,6 +91,16 @@ int main()
int transferred;
// 用于实际判断传输的数据长度
int actual;
data[0] = 0x00;
r = libusb_interrupt_transfer(dev_handle, (0x01 | LIBUSB_ENDPOINT_OUT), data, 64, &transferred, 1000);
if (r == 0 && actual == 127){
// 解析GeekIMU的磁力计信息
printf("Set Success.\n");
}else{
printf("Set Error.\n");
}
while (1)
{