diff --git a/usb_read_data.cpp b/usb_read_data.cpp index f3fe0e1..6c04d7a 100644 --- a/usb_read_data.cpp +++ b/usb_read_data.cpp @@ -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) {