update.
parent
9e9d47ce80
commit
b332097738
|
@ -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)
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue