質問編集履歴

1

コード誤り、修正

2021/03/18 00:00

投稿

abc123abc
abc123abc

スコア1

test CHANGED
File without changes
test CHANGED
@@ -48,7 +48,7 @@
48
48
 
49
49
 
50
50
 
51
- ret = libusb_bulk_transfer(s_handle, request, buf, size, actual, TIMEOUT);
51
+ ret = libusb_bulk_transfer(s_handle, request, buf, sizeof(buf), &actual, 1000);
52
52
 
53
53
  ★LIBUSB_ERROR_TIMEOUTが返ってくる★
54
54
 
@@ -64,10 +64,6 @@
64
64
 
65
65
  int ret;
66
66
 
67
- QString str;
68
-
69
- QString str_1;
70
-
71
67
  int actual;
72
68
 
73
69
  int request = LIBUSB_ENDPOINT_OUT | EP1;
@@ -76,7 +72,7 @@
76
72
 
77
73
 
78
74
 
79
- ret = libusb_bulk_transfer(s_handle, request, buf, size, actual, TIMEOUT);
75
+ ret = libusb_bulk_transfer(s_handle, request, buf, size, &actual, 1000);
80
76
 
81
77
  return ret;
82
78
 
@@ -108,7 +104,7 @@
108
104
 
109
105
 
110
106
 
111
- ret = libusb_control_transfer(s_handle,bmRequestType, bRequest, wValue, wIndex, buf, wLength, TIMEOUT);
107
+ ret = libusb_control_transfer(s_handle,bmRequestType, bRequest, wValue, wIndex, buf, wLength, 1000);
112
108
 
113
109
  return ret;
114
110
 
@@ -138,7 +134,7 @@
138
134
 
139
135
 
140
136
 
141
- ret = libusb_control_transfer(s_handle,bmRequestType, bRequest, wValue, wIndex, buf, wLength, TIMEOUT);
137
+ ret = libusb_control_transfer(s_handle,bmRequestType, bRequest, wValue, wIndex, buf, wLength, 1000);
142
138
 
143
139
  return ret;
144
140