usb 2.1.3 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +3 -0
  3. package/dist/index.d.ts +2 -1
  4. package/dist/index.js +3 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/usb/bindings.d.ts +4 -0
  7. package/dist/usb/device.js +5 -0
  8. package/dist/usb/device.js.map +1 -1
  9. package/libusb/.gitattributes +2 -6
  10. package/libusb/.private/appveyor_build.sh +22 -0
  11. package/libusb/.private/bm.sh +1 -1
  12. package/libusb/.private/ci-build.sh +67 -0
  13. package/libusb/.private/post-rewrite.sh +5 -1
  14. package/libusb/.private/pre-commit.sh +5 -1
  15. package/libusb/.private/wbs.txt +4 -19
  16. package/libusb/.travis.yml +32 -23
  17. package/libusb/AUTHORS +76 -3
  18. package/libusb/ChangeLog +41 -3
  19. package/libusb/INSTALL_WIN.txt +22 -44
  20. package/libusb/Makefile.am +32 -10
  21. package/libusb/{README.md → README} +2 -2
  22. package/libusb/README.git +3 -3
  23. package/libusb/Xcode/common.xcconfig +23 -19
  24. package/libusb/Xcode/config.h +25 -13
  25. package/libusb/Xcode/libusb.xcodeproj/project.pbxproj +511 -109
  26. package/libusb/android/README +90 -54
  27. package/libusb/android/config.h +23 -43
  28. package/libusb/android/examples/unrooted_android.c +301 -0
  29. package/libusb/android/examples/unrooted_android.h +36 -0
  30. package/libusb/android/jni/Android.mk +1 -1
  31. package/libusb/android/jni/Application.mk +16 -0
  32. package/libusb/android/jni/examples.mk +63 -29
  33. package/libusb/android/jni/libusb.mk +14 -8
  34. package/libusb/android/jni/tests.mk +13 -24
  35. package/libusb/appveyor.yml +69 -30
  36. package/libusb/autogen.sh +5 -3
  37. package/libusb/bootstrap.sh +6 -2
  38. package/libusb/configure.ac +302 -228
  39. package/libusb/doc/Makefile.in +22 -0
  40. package/libusb/doc/doxygen.cfg.in +460 -223
  41. package/libusb/examples/Makefile.am +6 -13
  42. package/libusb/examples/dpfp.c +276 -73
  43. package/libusb/examples/ezusb.c +18 -8
  44. package/libusb/examples/ezusb.h +6 -17
  45. package/libusb/examples/fxload.c +4 -5
  46. package/libusb/examples/hotplugtest.c +1 -1
  47. package/libusb/examples/sam3u_benchmark.c +59 -24
  48. package/libusb/examples/testlibusb.c +138 -104
  49. package/libusb/examples/xusb.c +26 -22
  50. package/libusb/libusb/Makefile.am +57 -70
  51. package/libusb/libusb/Makefile.am.extra +26 -0
  52. package/libusb/libusb/core.c +420 -423
  53. package/libusb/libusb/descriptor.c +365 -419
  54. package/libusb/libusb/hotplug.c +197 -104
  55. package/libusb/libusb/io.c +491 -528
  56. package/libusb/libusb/libusb-1.0.def +7 -3
  57. package/libusb/libusb/libusb-1.0.rc +1 -9
  58. package/libusb/libusb/libusb.h +295 -226
  59. package/libusb/libusb/libusbi.h +587 -314
  60. package/libusb/libusb/os/darwin_usb.c +634 -317
  61. package/libusb/libusb/os/darwin_usb.h +39 -15
  62. package/libusb/libusb/os/events_posix.c +300 -0
  63. package/libusb/libusb/os/events_posix.h +59 -0
  64. package/libusb/libusb/os/events_windows.c +214 -0
  65. package/libusb/{msvc/missing.h → libusb/os/events_windows.h} +25 -11
  66. package/libusb/libusb/os/haiku_pollfs.cpp +14 -9
  67. package/libusb/libusb/os/haiku_usb.h +12 -12
  68. package/libusb/libusb/os/haiku_usb_backend.cpp +36 -37
  69. package/libusb/libusb/os/haiku_usb_raw.cpp +80 -116
  70. package/libusb/libusb/os/linux_netlink.c +55 -63
  71. package/libusb/libusb/os/linux_udev.c +61 -69
  72. package/libusb/libusb/os/linux_usbfs.c +926 -1015
  73. package/libusb/libusb/os/linux_usbfs.h +74 -57
  74. package/libusb/libusb/os/netbsd_usb.c +103 -168
  75. package/libusb/libusb/os/null_usb.c +111 -0
  76. package/libusb/libusb/os/openbsd_usb.c +71 -120
  77. package/libusb/libusb/os/sunos_usb.c +289 -375
  78. package/libusb/libusb/os/sunos_usb.h +0 -1
  79. package/libusb/libusb/os/threads_posix.c +81 -32
  80. package/libusb/libusb/os/threads_posix.h +19 -23
  81. package/libusb/libusb/os/threads_windows.c +9 -95
  82. package/libusb/libusb/os/threads_windows.h +33 -31
  83. package/libusb/libusb/os/windows_common.c +904 -0
  84. package/libusb/libusb/os/windows_common.h +329 -42
  85. package/libusb/libusb/os/windows_usbdk.c +161 -267
  86. package/libusb/libusb/os/windows_usbdk.h +5 -2
  87. package/libusb/libusb/os/windows_winusb.c +1326 -1190
  88. package/libusb/libusb/os/windows_winusb.h +167 -167
  89. package/libusb/libusb/strerror.c +20 -30
  90. package/libusb/libusb/sync.c +20 -21
  91. package/libusb/libusb/version.h +1 -1
  92. package/libusb/libusb/version_nano.h +1 -1
  93. package/libusb/msvc/.gitattributes +3 -0
  94. package/libusb/msvc/config.h +27 -20
  95. package/libusb/msvc/{hotplugtest_2012.vcxproj → dpfp_2013.vcxproj} +14 -10
  96. package/libusb/msvc/dpfp_2013.vcxproj.filters +26 -0
  97. package/libusb/msvc/{listdevs_2010.vcxproj → dpfp_2015.vcxproj} +14 -9
  98. package/libusb/msvc/dpfp_2015.vcxproj.filters +26 -0
  99. package/libusb/msvc/dpfp_2017.vcxproj +106 -0
  100. package/libusb/msvc/dpfp_2017.vcxproj.filters +26 -0
  101. package/libusb/msvc/dpfp_2019.vcxproj +106 -0
  102. package/libusb/msvc/dpfp_2019.vcxproj.filters +26 -0
  103. package/libusb/msvc/dpfp_threaded_2013.vcxproj +87 -0
  104. package/libusb/msvc/dpfp_threaded_2013.vcxproj.filters +26 -0
  105. package/libusb/msvc/dpfp_threaded_2015.vcxproj +87 -0
  106. package/libusb/msvc/dpfp_threaded_2015.vcxproj.filters +26 -0
  107. package/libusb/msvc/dpfp_threaded_2017.vcxproj +106 -0
  108. package/libusb/msvc/dpfp_threaded_2017.vcxproj.filters +26 -0
  109. package/libusb/msvc/{fxload_2012.vcxproj → dpfp_threaded_2019.vcxproj} +32 -17
  110. package/libusb/msvc/dpfp_threaded_2019.vcxproj.filters +26 -0
  111. package/libusb/msvc/fxload_2013.vcxproj +6 -3
  112. package/libusb/msvc/fxload_2013.vcxproj.filters +35 -0
  113. package/libusb/msvc/fxload_2015.vcxproj +6 -3
  114. package/libusb/msvc/fxload_2015.vcxproj.filters +35 -0
  115. package/libusb/msvc/fxload_2017.vcxproj +6 -7
  116. package/libusb/msvc/fxload_2017.vcxproj.filters +35 -0
  117. package/libusb/msvc/{fxload_2010.vcxproj → fxload_2019.vcxproj} +29 -6
  118. package/libusb/msvc/fxload_2019.vcxproj.filters +35 -0
  119. package/libusb/{examples → msvc}/getopt/getopt.c +0 -0
  120. package/libusb/{examples → msvc}/getopt/getopt.h +0 -0
  121. package/libusb/{examples → msvc}/getopt/getopt1.c +0 -0
  122. package/libusb/msvc/getopt_2013.vcxproj +4 -5
  123. package/libusb/msvc/getopt_2013.vcxproj.filters +26 -0
  124. package/libusb/msvc/getopt_2015.vcxproj +4 -4
  125. package/libusb/msvc/getopt_2015.vcxproj.filters +26 -0
  126. package/libusb/msvc/getopt_2017.vcxproj +4 -10
  127. package/libusb/msvc/getopt_2017.vcxproj.filters +26 -0
  128. package/libusb/msvc/{getopt_2012.vcxproj → getopt_2019.vcxproj} +25 -6
  129. package/libusb/msvc/getopt_2019.vcxproj.filters +26 -0
  130. package/libusb/msvc/hotplugtest_2013.vcxproj +6 -3
  131. package/libusb/msvc/hotplugtest_2013.vcxproj.filters +23 -0
  132. package/libusb/msvc/hotplugtest_2015.vcxproj +6 -3
  133. package/libusb/msvc/hotplugtest_2015.vcxproj.filters +23 -0
  134. package/libusb/msvc/hotplugtest_2017.vcxproj +6 -7
  135. package/libusb/msvc/hotplugtest_2017.vcxproj.filters +23 -0
  136. package/libusb/msvc/hotplugtest_2019.vcxproj +105 -0
  137. package/libusb/msvc/hotplugtest_2019.vcxproj.filters +23 -0
  138. package/libusb/msvc/libusb_2013.sln +50 -20
  139. package/libusb/msvc/libusb_2015.sln +51 -21
  140. package/libusb/msvc/libusb_2017.sln +90 -36
  141. package/libusb/msvc/libusb_2019.sln +240 -0
  142. package/libusb/msvc/libusb_dll_2013.vcxproj +6 -9
  143. package/libusb/msvc/libusb_dll_2013.vcxproj.filters +94 -0
  144. package/libusb/msvc/libusb_dll_2015.vcxproj +6 -8
  145. package/libusb/msvc/libusb_dll_2015.vcxproj.filters +94 -0
  146. package/libusb/msvc/libusb_dll_2017.vcxproj +6 -16
  147. package/libusb/msvc/libusb_dll_2017.vcxproj.filters +94 -0
  148. package/libusb/msvc/{libusb_dll_2010.vcxproj → libusb_dll_2019.vcxproj} +27 -9
  149. package/libusb/msvc/libusb_dll_2019.vcxproj.filters +94 -0
  150. package/libusb/msvc/libusb_static_2013.vcxproj +5 -9
  151. package/libusb/msvc/libusb_static_2013.vcxproj.filters +80 -0
  152. package/libusb/msvc/libusb_static_2015.vcxproj +5 -8
  153. package/libusb/msvc/libusb_static_2015.vcxproj.filters +80 -0
  154. package/libusb/msvc/libusb_static_2017.vcxproj +5 -8
  155. package/libusb/msvc/libusb_static_2017.vcxproj.filters +80 -0
  156. package/libusb/msvc/{libusb_static_2010.vcxproj → libusb_static_2019.vcxproj} +26 -9
  157. package/libusb/msvc/libusb_static_2019.vcxproj.filters +80 -0
  158. package/libusb/msvc/listdevs_2013.vcxproj +6 -3
  159. package/libusb/msvc/listdevs_2013.vcxproj.filters +23 -0
  160. package/libusb/msvc/listdevs_2015.vcxproj +6 -3
  161. package/libusb/msvc/listdevs_2015.vcxproj.filters +23 -0
  162. package/libusb/msvc/listdevs_2017.vcxproj +6 -7
  163. package/libusb/msvc/listdevs_2017.vcxproj.filters +23 -0
  164. package/libusb/msvc/listdevs_2019.vcxproj +105 -0
  165. package/libusb/msvc/listdevs_2019.vcxproj.filters +23 -0
  166. package/libusb/msvc/{listdevs_2012.vcxproj → sam3u_benchmark_2013.vcxproj} +13 -9
  167. package/libusb/msvc/sam3u_benchmark_2013.vcxproj.filters +26 -0
  168. package/libusb/msvc/{hotplugtest_2010.vcxproj → sam3u_benchmark_2015.vcxproj} +13 -8
  169. package/libusb/msvc/sam3u_benchmark_2015.vcxproj.filters +26 -0
  170. package/libusb/msvc/sam3u_benchmark_2017.vcxproj +106 -0
  171. package/libusb/msvc/sam3u_benchmark_2017.vcxproj.filters +26 -0
  172. package/libusb/msvc/sam3u_benchmark_2019.vcxproj +106 -0
  173. package/libusb/msvc/sam3u_benchmark_2019.vcxproj.filters +26 -0
  174. package/libusb/msvc/stress_2013.vcxproj +4 -2
  175. package/libusb/msvc/stress_2013.vcxproj.filters +32 -0
  176. package/libusb/msvc/stress_2015.vcxproj +4 -2
  177. package/libusb/msvc/stress_2015.vcxproj.filters +32 -0
  178. package/libusb/msvc/stress_2017.vcxproj +4 -6
  179. package/libusb/msvc/stress_2017.vcxproj.filters +32 -0
  180. package/libusb/msvc/{stress_2010.vcxproj → stress_2019.vcxproj} +26 -4
  181. package/libusb/msvc/stress_2019.vcxproj.filters +32 -0
  182. package/libusb/msvc/testlibusb_2013.vcxproj +6 -3
  183. package/libusb/msvc/testlibusb_2013.vcxproj.filters +23 -0
  184. package/libusb/msvc/testlibusb_2015.vcxproj +6 -3
  185. package/libusb/msvc/testlibusb_2015.vcxproj.filters +23 -0
  186. package/libusb/msvc/testlibusb_2017.vcxproj +6 -7
  187. package/libusb/msvc/testlibusb_2017.vcxproj.filters +23 -0
  188. package/libusb/msvc/{testlibusb_2010.vcxproj → testlibusb_2019.vcxproj} +28 -5
  189. package/libusb/msvc/testlibusb_2019.vcxproj.filters +23 -0
  190. package/libusb/msvc/xusb_2013.vcxproj +6 -3
  191. package/libusb/msvc/xusb_2013.vcxproj.filters +23 -0
  192. package/libusb/msvc/xusb_2015.vcxproj +6 -3
  193. package/libusb/msvc/xusb_2015.vcxproj.filters +23 -0
  194. package/libusb/msvc/xusb_2017.vcxproj +6 -7
  195. package/libusb/msvc/xusb_2017.vcxproj.filters +23 -0
  196. package/libusb/msvc/{xusb_2010.vcxproj → xusb_2019.vcxproj} +28 -5
  197. package/libusb/msvc/xusb_2019.vcxproj.filters +23 -0
  198. package/libusb/tests/Makefile.am +1 -0
  199. package/libusb/tests/libusb_testlib.h +12 -43
  200. package/libusb/tests/stress.c +59 -50
  201. package/libusb/tests/testlib.c +78 -171
  202. package/libusb.gypi +10 -11
  203. package/package.json +1 -1
  204. package/prebuilds/android-arm/node.napi.armv7.node +0 -0
  205. package/prebuilds/android-arm64/node.napi.armv8.node +0 -0
  206. package/prebuilds/darwin-x64+arm64/node.napi.node +0 -0
  207. package/prebuilds/linux-arm/node.napi.armv6.node +0 -0
  208. package/prebuilds/linux-arm/node.napi.armv7.node +0 -0
  209. package/prebuilds/linux-arm64/node.napi.armv8.node +0 -0
  210. package/prebuilds/linux-ia32/node.napi.node +0 -0
  211. package/prebuilds/linux-x64/node.napi.glibc.node +0 -0
  212. package/prebuilds/linux-x64/node.napi.musl.node +0 -0
  213. package/prebuilds/win32-ia32/node.napi.node +0 -0
  214. package/prebuilds/win32-x64/node.napi.node +0 -0
  215. package/src/device.cc +12 -7
  216. package/src/node_usb.cc +10 -0
  217. package/test/usb.coffee +6 -0
  218. package/tsc/index.ts +2 -0
  219. package/tsc/usb/bindings.ts +5 -0
  220. package/tsc/usb/device.ts +6 -0
  221. package/libusb/.private/bd.cmd +0 -89
  222. package/libusb/.private/bwince.cmd +0 -57
  223. package/libusb/.private/wbs_wince.txt +0 -42
  224. package/libusb/Brewfile +0 -4
  225. package/libusb/appveyor_cygwin.bat +0 -11
  226. package/libusb/appveyor_minGW.bat +0 -19
  227. package/libusb/doc/Makefile.am +0 -9
  228. package/libusb/examples/dpfp_threaded.c +0 -557
  229. package/libusb/libusb/hotplug.h +0 -99
  230. package/libusb/libusb/os/poll_posix.c +0 -84
  231. package/libusb/libusb/os/poll_posix.h +0 -14
  232. package/libusb/libusb/os/poll_windows.c +0 -447
  233. package/libusb/libusb/os/poll_windows.h +0 -98
  234. package/libusb/libusb/os/wince_usb.c +0 -888
  235. package/libusb/libusb/os/wince_usb.h +0 -126
  236. package/libusb/libusb/os/windows_nt_common.c +0 -1010
  237. package/libusb/libusb/os/windows_nt_common.h +0 -110
  238. package/libusb/libusb/os/windows_nt_shared_types.h +0 -147
  239. package/libusb/msvc/appveyor.bat +0 -27
  240. package/libusb/msvc/ddk_build.cmd +0 -219
  241. package/libusb/msvc/errno.h +0 -102
  242. package/libusb/msvc/fxload_sources +0 -23
  243. package/libusb/msvc/getopt_2005.vcproj +0 -288
  244. package/libusb/msvc/getopt_2010.vcxproj +0 -72
  245. package/libusb/msvc/getopt_sources +0 -24
  246. package/libusb/msvc/hotplugtest_sources +0 -20
  247. package/libusb/msvc/inttypes.h +0 -295
  248. package/libusb/msvc/libusb.dsw +0 -71
  249. package/libusb/msvc/libusb_2005.sln +0 -95
  250. package/libusb/msvc/libusb_2010.sln +0 -105
  251. package/libusb/msvc/libusb_2012.sln +0 -105
  252. package/libusb/msvc/libusb_dll.dsp +0 -194
  253. package/libusb/msvc/libusb_dll_2005.vcproj +0 -464
  254. package/libusb/msvc/libusb_dll_2012.vcxproj +0 -107
  255. package/libusb/msvc/libusb_dll_wince.vcproj +0 -1251
  256. package/libusb/msvc/libusb_sources +0 -43
  257. package/libusb/msvc/libusb_static.dsp +0 -174
  258. package/libusb/msvc/libusb_static_2005.vcproj +0 -390
  259. package/libusb/msvc/libusb_static_2012.vcxproj +0 -98
  260. package/libusb/msvc/libusb_static_wince.vcproj +0 -1179
  261. package/libusb/msvc/libusb_wince.sln +0 -246
  262. package/libusb/msvc/listdevs.dsp +0 -103
  263. package/libusb/msvc/listdevs_2005.vcproj +0 -360
  264. package/libusb/msvc/listdevs_sources +0 -20
  265. package/libusb/msvc/listdevs_wince.vcproj +0 -1120
  266. package/libusb/msvc/missing.c +0 -80
  267. package/libusb/msvc/stdint.h +0 -256
  268. package/libusb/msvc/stress_2005.vcproj +0 -390
  269. package/libusb/msvc/stress_2012.vcxproj +0 -87
  270. package/libusb/msvc/stress_sources +0 -21
  271. package/libusb/msvc/stress_wince.vcproj +0 -1128
  272. package/libusb/msvc/testlibusb_2012.vcxproj +0 -83
  273. package/libusb/msvc/testlibusb_sources +0 -20
  274. package/libusb/msvc/xusb.dsp +0 -102
  275. package/libusb/msvc/xusb_2005.vcproj +0 -344
  276. package/libusb/msvc/xusb_2012.vcxproj +0 -83
  277. package/libusb/msvc/xusb_sources +0 -20
  278. package/libusb/msvc/xusb_wince.vcproj +0 -1120
  279. package/libusb/travis-autogen.sh +0 -39
@@ -20,15 +20,10 @@
20
20
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
21
  */
22
22
 
23
- #include <config.h>
23
+ #include "libusbi.h"
24
24
 
25
- #include <errno.h>
26
- #include <stdint.h>
27
- #include <stdlib.h>
28
25
  #include <string.h>
29
26
 
30
- #include "libusbi.h"
31
-
32
27
  /**
33
28
  * @defgroup libusb_syncio Synchronous device I/O
34
29
  *
@@ -41,7 +36,7 @@ static void LIBUSB_CALL sync_transfer_cb(struct libusb_transfer *transfer)
41
36
  {
42
37
  int *completed = transfer->user_data;
43
38
  *completed = 1;
44
- usbi_dbg("actual_length=%d", transfer->actual_length);
39
+ usbi_dbg(TRANSFER_CTX(transfer), "actual_length=%d", transfer->actual_length);
45
40
  /* caller interprets result and frees transfer */
46
41
  }
47
42
 
@@ -62,7 +57,7 @@ static void sync_transfer_wait_for_completion(struct libusb_transfer *transfer)
62
57
  }
63
58
  if (NULL == transfer->dev_handle) {
64
59
  /* transfer completion after libusb_close() */
65
- transfer->status = LIBUSB_ERROR_NO_DEVICE;
60
+ transfer->status = LIBUSB_TRANSFER_NO_DEVICE;
66
61
  *completed = 1;
67
62
  }
68
63
  }
@@ -86,7 +81,7 @@ static void sync_transfer_wait_for_completion(struct libusb_transfer *transfer)
86
81
  * (depending on direction bits within bmRequestType)
87
82
  * \param wLength the length field for the setup packet. The data buffer should
88
83
  * be at least this size.
89
- * \param timeout timeout (in millseconds) that this function should wait
84
+ * \param timeout timeout (in milliseconds) that this function should wait
90
85
  * before giving up due to no response being received. For an unlimited
91
86
  * timeout, use value 0.
92
87
  * \returns on success, the number of bytes actually transferred
@@ -96,7 +91,7 @@ static void sync_transfer_wait_for_completion(struct libusb_transfer *transfer)
96
91
  * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
97
92
  * \returns LIBUSB_ERROR_BUSY if called from event handling context
98
93
  * \returns LIBUSB_ERROR_INVALID_PARAM if the transfer size is larger than
99
- * the operating system and/or hardware can support
94
+ * the operating system and/or hardware can support (see \ref asynclimits)
100
95
  * \returns another LIBUSB_ERROR code on other failures
101
96
  */
102
97
  int API_EXPORTED libusb_control_transfer(libusb_device_handle *dev_handle,
@@ -115,7 +110,7 @@ int API_EXPORTED libusb_control_transfer(libusb_device_handle *dev_handle,
115
110
  if (!transfer)
116
111
  return LIBUSB_ERROR_NO_MEM;
117
112
 
118
- buffer = (unsigned char*) malloc(LIBUSB_CONTROL_SETUP_SIZE + wLength);
113
+ buffer = malloc(LIBUSB_CONTROL_SETUP_SIZE + wLength);
119
114
  if (!buffer) {
120
115
  libusb_free_transfer(transfer);
121
116
  return LIBUSB_ERROR_NO_MEM;
@@ -248,7 +243,7 @@ static int do_sync_bulk_transfer(struct libusb_device_handle *dev_handle,
248
243
  * underlying O/S requirements, meaning that the timeout may expire after
249
244
  * the first few chunks have completed. libusb is careful not to lose any data
250
245
  * that may have been transferred; do not assume that timeout conditions
251
- * indicate a complete lack of I/O.
246
+ * indicate a complete lack of I/O. See \ref asynctimeout for more details.
252
247
  *
253
248
  * \param dev_handle a handle for the device to communicate with
254
249
  * \param endpoint the address of a valid endpoint to communicate with
@@ -260,7 +255,7 @@ static int do_sync_bulk_transfer(struct libusb_device_handle *dev_handle,
260
255
  * transferred. Since version 1.0.21 (\ref LIBUSB_API_VERSION >= 0x01000105),
261
256
  * it is legal to pass a NULL pointer if you do not wish to receive this
262
257
  * information.
263
- * \param timeout timeout (in millseconds) that this function should wait
258
+ * \param timeout timeout (in milliseconds) that this function should wait
264
259
  * before giving up due to no response being received. For an unlimited
265
260
  * timeout, use value 0.
266
261
  *
@@ -272,11 +267,13 @@ static int do_sync_bulk_transfer(struct libusb_device_handle *dev_handle,
272
267
  * \ref libusb_packetoverflow
273
268
  * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
274
269
  * \returns LIBUSB_ERROR_BUSY if called from event handling context
270
+ * \returns LIBUSB_ERROR_INVALID_PARAM if the transfer size is larger than
271
+ * the operating system and/or hardware can support (see \ref asynclimits)
275
272
  * \returns another LIBUSB_ERROR code on other failures
276
273
  */
277
- int API_EXPORTED libusb_bulk_transfer(struct libusb_device_handle *dev_handle,
278
- unsigned char endpoint, unsigned char *data, int length, int *transferred,
279
- unsigned int timeout)
274
+ int API_EXPORTED libusb_bulk_transfer(libusb_device_handle *dev_handle,
275
+ unsigned char endpoint, unsigned char *data, int length,
276
+ int *transferred, unsigned int timeout)
280
277
  {
281
278
  return do_sync_bulk_transfer(dev_handle, endpoint, data, length,
282
279
  transferred, timeout, LIBUSB_TRANSFER_TYPE_BULK);
@@ -299,7 +296,7 @@ int API_EXPORTED libusb_bulk_transfer(struct libusb_device_handle *dev_handle,
299
296
  * underlying O/S requirements, meaning that the timeout may expire after
300
297
  * the first few chunks have completed. libusb is careful not to lose any data
301
298
  * that may have been transferred; do not assume that timeout conditions
302
- * indicate a complete lack of I/O.
299
+ * indicate a complete lack of I/O. See \ref asynctimeout for more details.
303
300
  *
304
301
  * The default endpoint bInterval value is used as the polling interval.
305
302
  *
@@ -313,7 +310,7 @@ int API_EXPORTED libusb_bulk_transfer(struct libusb_device_handle *dev_handle,
313
310
  * transferred. Since version 1.0.21 (\ref LIBUSB_API_VERSION >= 0x01000105),
314
311
  * it is legal to pass a NULL pointer if you do not wish to receive this
315
312
  * information.
316
- * \param timeout timeout (in millseconds) that this function should wait
313
+ * \param timeout timeout (in milliseconds) that this function should wait
317
314
  * before giving up due to no response being received. For an unlimited
318
315
  * timeout, use value 0.
319
316
  *
@@ -324,11 +321,13 @@ int API_EXPORTED libusb_bulk_transfer(struct libusb_device_handle *dev_handle,
324
321
  * \ref libusb_packetoverflow
325
322
  * \returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected
326
323
  * \returns LIBUSB_ERROR_BUSY if called from event handling context
324
+ * \returns LIBUSB_ERROR_INVALID_PARAM if the transfer size is larger than
325
+ * the operating system and/or hardware can support (see \ref asynclimits)
327
326
  * \returns another LIBUSB_ERROR code on other error
328
327
  */
329
- int API_EXPORTED libusb_interrupt_transfer(
330
- struct libusb_device_handle *dev_handle, unsigned char endpoint,
331
- unsigned char *data, int length, int *transferred, unsigned int timeout)
328
+ int API_EXPORTED libusb_interrupt_transfer(libusb_device_handle *dev_handle,
329
+ unsigned char endpoint, unsigned char *data, int length,
330
+ int *transferred, unsigned int timeout)
332
331
  {
333
332
  return do_sync_bulk_transfer(dev_handle, endpoint, data, length,
334
333
  transferred, timeout, LIBUSB_TRANSFER_TYPE_INTERRUPT);
@@ -7,7 +7,7 @@
7
7
  #define LIBUSB_MINOR 0
8
8
  #endif
9
9
  #ifndef LIBUSB_MICRO
10
- #define LIBUSB_MICRO 23
10
+ #define LIBUSB_MICRO 25
11
11
  #endif
12
12
  #ifndef LIBUSB_NANO
13
13
  #define LIBUSB_NANO 0
@@ -1 +1 @@
1
- #define LIBUSB_NANO 11397
1
+ #define LIBUSB_NANO 11692
@@ -0,0 +1,3 @@
1
+ *.sln eol=crlf
2
+ *.vcxproj eol=crlf
3
+ *.vcxproj.filters eol=crlf
@@ -5,18 +5,30 @@
5
5
  #error "Please make sure the msvc/ directory is removed from your build path."
6
6
  #endif
7
7
 
8
+ /* Visual Studio 2013 or later is required */
9
+ #if (_MSC_VER < 1800)
10
+ #error "Visual Studio 2013 or later is required."
11
+ #endif
12
+
13
+ /* Visual Studio 2013 does not support __func__ */
14
+ #if (_MSC_VER < 1900)
15
+ #define __func__ __FUNCTION__
16
+ #endif
17
+
8
18
  /* Visual Studio 2015 and later defines timespec */
9
19
  #if (_MSC_VER >= 1900)
10
20
  #define _TIMESPEC_DEFINED 1
11
21
  #endif
12
22
 
23
+ /* Disable: warning C4127: conditional expression is constant */
24
+ #pragma warning(disable:4127)
13
25
  /* Disable: warning C4200: nonstandard extension used : zero-sized array in struct/union */
14
26
  #pragma warning(disable:4200)
27
+ /* Disable: warning C4201: nonstandard extension used : nameless struct/union */
28
+ #pragma warning(disable:4201)
15
29
  /* Disable: warning C4324: structure was padded due to __declspec(align()) */
16
30
  #pragma warning(disable:4324)
17
- /* Disable: warning C6258: Using TerminateThread does not allow proper thread clean up */
18
- #pragma warning(disable:6258)
19
- /* Disable: warning C4996: 'GetVersionA': was declared deprecated */
31
+ /* Disable: warning C4996: 'GetVersionExA': was declared deprecated */
20
32
  #pragma warning(disable:4996)
21
33
 
22
34
  #if defined(_PREFAST_)
@@ -26,26 +38,21 @@
26
38
  #pragma warning(disable:28125)
27
39
  #endif
28
40
 
29
- /* Default visibility */
41
+ /* Define to the attribute for default visibility. */
30
42
  #define DEFAULT_VISIBILITY /**/
31
43
 
32
- /* Enable global message logging */
33
- #define ENABLE_LOGGING 1
44
+ /* Define to 1 to start with debug message logging enabled. */
45
+ /* #undef ENABLE_DEBUG_LOGGING */
34
46
 
35
- /* Uncomment to start with debug message logging enabled */
36
- // #define ENABLE_DEBUG_LOGGING 1
47
+ /* Define to 1 to enable message logging. */
48
+ #define ENABLE_LOGGING 1
37
49
 
38
- /* Uncomment to enabling logging to system log */
39
- // #define USE_SYSTEM_LOGGING_FACILITY
50
+ /* Define to 1 if compiling for a Windows platform. */
51
+ #define PLATFORM_WINDOWS 1
40
52
 
41
- /* type of second poll() argument */
42
- #define POLL_NFDS_TYPE unsigned int
53
+ /* Define to the attribute for enabling parameter checks on printf-like
54
+ functions. */
55
+ #define PRINTF_FORMAT(a, b) /**/
43
56
 
44
- /* Windows/WinCE backend */
45
- #if defined(_WIN32_WCE)
46
- #define OS_WINCE 1
47
- #define HAVE_MISSING_H
48
- #else
49
- #define OS_WINDOWS 1
50
- #define HAVE_SYS_TYPES_H 1
51
- #endif
57
+ /* Define to 1 to output logging messages to the systemwide log. */
58
+ /* #undef USE_SYSTEM_LOGGING_FACILITY */
@@ -1,5 +1,5 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
3
  <ItemGroup Label="ProjectConfigurations">
4
4
  <ProjectConfiguration Include="Debug|Win32">
5
5
  <Configuration>Debug</Configuration>
@@ -19,8 +19,8 @@
19
19
  </ProjectConfiguration>
20
20
  </ItemGroup>
21
21
  <PropertyGroup Label="Globals">
22
- <ProjectName>hotplugtest</ProjectName>
23
- <ProjectGuid>{99D2AC64-DC66-4422-91CE-6715C403C9E5}</ProjectGuid>
22
+ <ProjectName>dpfp</ProjectName>
23
+ <ProjectGuid>{8c7814a1-fd6e-4185-9ea0-8208119756d4}</ProjectGuid>
24
24
  <RootNamespace>examples</RootNamespace>
25
25
  <Keyword>Win32Proj</Keyword>
26
26
  </PropertyGroup>
@@ -28,7 +28,7 @@
28
28
  <PropertyGroup Label="Configuration">
29
29
  <ConfigurationType>Application</ConfigurationType>
30
30
  <CharacterSet>Unicode</CharacterSet>
31
- <PlatformToolset>v110</PlatformToolset>
31
+ <PlatformToolset>v120</PlatformToolset>
32
32
  <WholeProgramOptimization Condition="'$(Configuration)'=='Release'">true</WholeProgramOptimization>
33
33
  </PropertyGroup>
34
34
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -45,8 +45,7 @@
45
45
  </PropertyGroup>
46
46
  <ItemDefinitionGroup>
47
47
  <ClCompile>
48
- <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
49
- <AdditionalIncludeDirectories>..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
48
+ <AdditionalIncludeDirectories>.;..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
50
49
  <PreprocessorDefinitions>_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
51
50
  <WarningLevel>Level3</WarningLevel>
52
51
  </ClCompile>
@@ -63,16 +62,21 @@
63
62
  <Link>
64
63
  <ProgramDatabaseFile>$(TargetDir)$(ProjectName).pdb</ProgramDatabaseFile>
65
64
  <SubSystem>Console</SubSystem>
65
+ <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
66
66
  </Link>
67
67
  <Link Condition="'$(Configuration)'=='Debug'">
68
68
  <GenerateDebugInformation>true</GenerateDebugInformation>
69
69
  </Link>
70
70
  </ItemDefinitionGroup>
71
71
  <ItemGroup>
72
- <ClCompile Include="..\examples\hotplugtest.c" />
72
+ <ClCompile Include="..\examples\dpfp.c" />
73
73
  </ItemGroup>
74
74
  <ItemGroup>
75
- <ProjectReference Include=".\libusb_static_2012.vcxproj">
75
+ <ClInclude Include=".\config.h" />
76
+ <ClInclude Include="..\libusb\libusb.h" />
77
+ </ItemGroup>
78
+ <ItemGroup>
79
+ <ProjectReference Include=".\libusb_static_2013.vcxproj">
76
80
  <Project>{349ee8f9-7d25-4909-aaf5-ff3fade72187}</Project>
77
81
  <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
78
82
  </ProjectReference>
@@ -80,4 +84,4 @@
80
84
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
81
85
  <ImportGroup Label="ExtensionTargets">
82
86
  </ImportGroup>
83
- </Project>
87
+ </Project>
@@ -0,0 +1,26 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemGroup>
4
+ <Filter Include="Source Files">
5
+ <UniqueIdentifier>{4fc737f1-c7a5-4376-a066-2a32d752a2ff}</UniqueIdentifier>
6
+ <Extensions>c</Extensions>
7
+ </Filter>
8
+ <Filter Include="Header Files">
9
+ <UniqueIdentifier>{93995380-89bd-4b04-88eb-625fbe52ebfb}</UniqueIdentifier>
10
+ <Extensions>h</Extensions>
11
+ </Filter>
12
+ </ItemGroup>
13
+ <ItemGroup>
14
+ <ClInclude Include=".\config.h">
15
+ <Filter>Header Files</Filter>
16
+ </ClInclude>
17
+ <ClInclude Include="..\libusb\libusb.h">
18
+ <Filter>Header Files</Filter>
19
+ </ClInclude>
20
+ </ItemGroup>
21
+ <ItemGroup>
22
+ <ClCompile Include="..\examples\dpfp.c">
23
+ <Filter>Source Files</Filter>
24
+ </ClCompile>
25
+ </ItemGroup>
26
+ </Project>
@@ -1,5 +1,5 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
3
  <ItemGroup Label="ProjectConfigurations">
4
4
  <ProjectConfiguration Include="Debug|Win32">
5
5
  <Configuration>Debug</Configuration>
@@ -19,8 +19,8 @@
19
19
  </ProjectConfiguration>
20
20
  </ItemGroup>
21
21
  <PropertyGroup Label="Globals">
22
- <ProjectName>listdevs</ProjectName>
23
- <ProjectGuid>{F4938DB0-3DE7-4737-9C5A-EAD1BE819F87}</ProjectGuid>
22
+ <ProjectName>dpfp</ProjectName>
23
+ <ProjectGuid>{8c7814a1-fd6e-4185-9ea0-8208119756d4}</ProjectGuid>
24
24
  <RootNamespace>examples</RootNamespace>
25
25
  <Keyword>Win32Proj</Keyword>
26
26
  </PropertyGroup>
@@ -28,6 +28,7 @@
28
28
  <PropertyGroup Label="Configuration">
29
29
  <ConfigurationType>Application</ConfigurationType>
30
30
  <CharacterSet>Unicode</CharacterSet>
31
+ <PlatformToolset>v140</PlatformToolset>
31
32
  <WholeProgramOptimization Condition="'$(Configuration)'=='Release'">true</WholeProgramOptimization>
32
33
  </PropertyGroup>
33
34
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@@ -45,13 +46,12 @@
45
46
  <ItemDefinitionGroup>
46
47
  <ClCompile>
47
48
  <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
48
- <AdditionalIncludeDirectories>..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
49
+ <AdditionalIncludeDirectories>.;..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
49
50
  <PreprocessorDefinitions>_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
50
51
  <WarningLevel>Level3</WarningLevel>
51
52
  </ClCompile>
52
53
  <ClCompile Condition="'$(Configuration)'=='Debug'">
53
54
  <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
54
- <MinimalRebuild>true</MinimalRebuild>
55
55
  <Optimization>Disabled</Optimization>
56
56
  <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
57
57
  </ClCompile>
@@ -62,16 +62,21 @@
62
62
  <Link>
63
63
  <ProgramDatabaseFile>$(TargetDir)$(ProjectName).pdb</ProgramDatabaseFile>
64
64
  <SubSystem>Console</SubSystem>
65
+ <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
65
66
  </Link>
66
67
  <Link Condition="'$(Configuration)'=='Debug'">
67
68
  <GenerateDebugInformation>true</GenerateDebugInformation>
68
69
  </Link>
69
70
  </ItemDefinitionGroup>
70
71
  <ItemGroup>
71
- <ClCompile Include="..\examples\listdevs.c" />
72
+ <ClCompile Include="..\examples\dpfp.c" />
72
73
  </ItemGroup>
73
74
  <ItemGroup>
74
- <ProjectReference Include=".\libusb_static_2010.vcxproj">
75
+ <ClInclude Include=".\config.h" />
76
+ <ClInclude Include="..\libusb\libusb.h" />
77
+ </ItemGroup>
78
+ <ItemGroup>
79
+ <ProjectReference Include=".\libusb_static_2015.vcxproj">
75
80
  <Project>{349ee8f9-7d25-4909-aaf5-ff3fade72187}</Project>
76
81
  <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
77
82
  </ProjectReference>
@@ -79,4 +84,4 @@
79
84
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
80
85
  <ImportGroup Label="ExtensionTargets">
81
86
  </ImportGroup>
82
- </Project>
87
+ </Project>
@@ -0,0 +1,26 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemGroup>
4
+ <Filter Include="Source Files">
5
+ <UniqueIdentifier>{4fc737f1-c7a5-4376-a066-2a32d752a2ff}</UniqueIdentifier>
6
+ <Extensions>c</Extensions>
7
+ </Filter>
8
+ <Filter Include="Header Files">
9
+ <UniqueIdentifier>{93995380-89bd-4b04-88eb-625fbe52ebfb}</UniqueIdentifier>
10
+ <Extensions>h</Extensions>
11
+ </Filter>
12
+ </ItemGroup>
13
+ <ItemGroup>
14
+ <ClInclude Include=".\config.h">
15
+ <Filter>Header Files</Filter>
16
+ </ClInclude>
17
+ <ClInclude Include="..\libusb\libusb.h">
18
+ <Filter>Header Files</Filter>
19
+ </ClInclude>
20
+ </ItemGroup>
21
+ <ItemGroup>
22
+ <ClCompile Include="..\examples\dpfp.c">
23
+ <Filter>Source Files</Filter>
24
+ </ClCompile>
25
+ </ItemGroup>
26
+ </Project>
@@ -0,0 +1,106 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemGroup Label="ProjectConfigurations">
4
+ <ProjectConfiguration Include="Debug|ARM">
5
+ <Configuration>Debug</Configuration>
6
+ <Platform>ARM</Platform>
7
+ </ProjectConfiguration>
8
+ <ProjectConfiguration Include="Debug|ARM64">
9
+ <Configuration>Debug</Configuration>
10
+ <Platform>ARM64</Platform>
11
+ </ProjectConfiguration>
12
+ <ProjectConfiguration Include="Debug|Win32">
13
+ <Configuration>Debug</Configuration>
14
+ <Platform>Win32</Platform>
15
+ </ProjectConfiguration>
16
+ <ProjectConfiguration Include="Debug|x64">
17
+ <Configuration>Debug</Configuration>
18
+ <Platform>x64</Platform>
19
+ </ProjectConfiguration>
20
+ <ProjectConfiguration Include="Release|ARM">
21
+ <Configuration>Release</Configuration>
22
+ <Platform>ARM</Platform>
23
+ </ProjectConfiguration>
24
+ <ProjectConfiguration Include="Release|ARM64">
25
+ <Configuration>Release</Configuration>
26
+ <Platform>ARM64</Platform>
27
+ </ProjectConfiguration>
28
+ <ProjectConfiguration Include="Release|Win32">
29
+ <Configuration>Release</Configuration>
30
+ <Platform>Win32</Platform>
31
+ </ProjectConfiguration>
32
+ <ProjectConfiguration Include="Release|x64">
33
+ <Configuration>Release</Configuration>
34
+ <Platform>x64</Platform>
35
+ </ProjectConfiguration>
36
+ </ItemGroup>
37
+ <PropertyGroup Label="Globals">
38
+ <ProjectName>dpfp</ProjectName>
39
+ <ProjectGuid>{8c7814a1-fd6e-4185-9ea0-8208119756d4}</ProjectGuid>
40
+ <RootNamespace>examples</RootNamespace>
41
+ <Keyword>Win32Proj</Keyword>
42
+ <WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
43
+ <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
44
+ <WindowsTargetPlatformVersion Condition="'$(Platform)'=='ARM' Or '$(Platform)'=='ARM64'">10.0.17763.0</WindowsTargetPlatformVersion>
45
+ </PropertyGroup>
46
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
47
+ <PropertyGroup Label="Configuration">
48
+ <ConfigurationType>Application</ConfigurationType>
49
+ <CharacterSet>Unicode</CharacterSet>
50
+ <PlatformToolset>v141</PlatformToolset>
51
+ <WholeProgramOptimization Condition="'$(Configuration)'=='Release'">true</WholeProgramOptimization>
52
+ </PropertyGroup>
53
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
54
+ <ImportGroup Label="ExtensionSettings">
55
+ </ImportGroup>
56
+ <ImportGroup Label="PropertySheets">
57
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
58
+ </ImportGroup>
59
+ <PropertyGroup Label="UserMacros" />
60
+ <PropertyGroup>
61
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
62
+ <IntDir>$(ProjectDir)..\$(Platform)\$(Configuration)\examples\$(ProjectName)\</IntDir>
63
+ <OutDir>$(ProjectDir)..\$(Platform)\$(Configuration)\examples\</OutDir>
64
+ </PropertyGroup>
65
+ <ItemDefinitionGroup>
66
+ <ClCompile>
67
+ <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
68
+ <AdditionalIncludeDirectories>.;..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
69
+ <PreprocessorDefinitions>_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
70
+ <WarningLevel>Level3</WarningLevel>
71
+ </ClCompile>
72
+ <ClCompile Condition="'$(Configuration)'=='Debug'">
73
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
74
+ <Optimization>Disabled</Optimization>
75
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
76
+ </ClCompile>
77
+ <ClCompile Condition="'$(Configuration)'=='Release'">
78
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
79
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
80
+ </ClCompile>
81
+ <Link>
82
+ <ProgramDatabaseFile>$(TargetDir)$(ProjectName).pdb</ProgramDatabaseFile>
83
+ <SubSystem>Console</SubSystem>
84
+ <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
85
+ </Link>
86
+ <Link Condition="'$(Configuration)'=='Debug'">
87
+ <GenerateDebugInformation>true</GenerateDebugInformation>
88
+ </Link>
89
+ </ItemDefinitionGroup>
90
+ <ItemGroup>
91
+ <ClCompile Include="..\examples\dpfp.c" />
92
+ </ItemGroup>
93
+ <ItemGroup>
94
+ <ClInclude Include=".\config.h" />
95
+ <ClInclude Include="..\libusb\libusb.h" />
96
+ </ItemGroup>
97
+ <ItemGroup>
98
+ <ProjectReference Include=".\libusb_static_2017.vcxproj">
99
+ <Project>{349ee8f9-7d25-4909-aaf5-ff3fade72187}</Project>
100
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
101
+ </ProjectReference>
102
+ </ItemGroup>
103
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
104
+ <ImportGroup Label="ExtensionTargets">
105
+ </ImportGroup>
106
+ </Project>
@@ -0,0 +1,26 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemGroup>
4
+ <Filter Include="Source Files">
5
+ <UniqueIdentifier>{4fc737f1-c7a5-4376-a066-2a32d752a2ff}</UniqueIdentifier>
6
+ <Extensions>c</Extensions>
7
+ </Filter>
8
+ <Filter Include="Header Files">
9
+ <UniqueIdentifier>{93995380-89bd-4b04-88eb-625fbe52ebfb}</UniqueIdentifier>
10
+ <Extensions>h</Extensions>
11
+ </Filter>
12
+ </ItemGroup>
13
+ <ItemGroup>
14
+ <ClInclude Include=".\config.h">
15
+ <Filter>Header Files</Filter>
16
+ </ClInclude>
17
+ <ClInclude Include="..\libusb\libusb.h">
18
+ <Filter>Header Files</Filter>
19
+ </ClInclude>
20
+ </ItemGroup>
21
+ <ItemGroup>
22
+ <ClCompile Include="..\examples\dpfp.c">
23
+ <Filter>Source Files</Filter>
24
+ </ClCompile>
25
+ </ItemGroup>
26
+ </Project>
@@ -0,0 +1,106 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemGroup Label="ProjectConfigurations">
4
+ <ProjectConfiguration Include="Debug|ARM">
5
+ <Configuration>Debug</Configuration>
6
+ <Platform>ARM</Platform>
7
+ </ProjectConfiguration>
8
+ <ProjectConfiguration Include="Debug|ARM64">
9
+ <Configuration>Debug</Configuration>
10
+ <Platform>ARM64</Platform>
11
+ </ProjectConfiguration>
12
+ <ProjectConfiguration Include="Debug|Win32">
13
+ <Configuration>Debug</Configuration>
14
+ <Platform>Win32</Platform>
15
+ </ProjectConfiguration>
16
+ <ProjectConfiguration Include="Debug|x64">
17
+ <Configuration>Debug</Configuration>
18
+ <Platform>x64</Platform>
19
+ </ProjectConfiguration>
20
+ <ProjectConfiguration Include="Release|ARM">
21
+ <Configuration>Release</Configuration>
22
+ <Platform>ARM</Platform>
23
+ </ProjectConfiguration>
24
+ <ProjectConfiguration Include="Release|ARM64">
25
+ <Configuration>Release</Configuration>
26
+ <Platform>ARM64</Platform>
27
+ </ProjectConfiguration>
28
+ <ProjectConfiguration Include="Release|Win32">
29
+ <Configuration>Release</Configuration>
30
+ <Platform>Win32</Platform>
31
+ </ProjectConfiguration>
32
+ <ProjectConfiguration Include="Release|x64">
33
+ <Configuration>Release</Configuration>
34
+ <Platform>x64</Platform>
35
+ </ProjectConfiguration>
36
+ </ItemGroup>
37
+ <PropertyGroup Label="Globals">
38
+ <ProjectName>dpfp</ProjectName>
39
+ <ProjectGuid>{8c7814a1-fd6e-4185-9ea0-8208119756d4}</ProjectGuid>
40
+ <RootNamespace>examples</RootNamespace>
41
+ <Keyword>Win32Proj</Keyword>
42
+ <WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
43
+ <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
44
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
45
+ </PropertyGroup>
46
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
47
+ <PropertyGroup Label="Configuration">
48
+ <ConfigurationType>Application</ConfigurationType>
49
+ <CharacterSet>Unicode</CharacterSet>
50
+ <PlatformToolset>v142</PlatformToolset>
51
+ <WholeProgramOptimization Condition="'$(Configuration)'=='Release'">true</WholeProgramOptimization>
52
+ </PropertyGroup>
53
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
54
+ <ImportGroup Label="ExtensionSettings">
55
+ </ImportGroup>
56
+ <ImportGroup Label="PropertySheets">
57
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
58
+ </ImportGroup>
59
+ <PropertyGroup Label="UserMacros" />
60
+ <PropertyGroup>
61
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
62
+ <IntDir>$(ProjectDir)..\$(Platform)\$(Configuration)\examples\$(ProjectName)\</IntDir>
63
+ <OutDir>$(ProjectDir)..\$(Platform)\$(Configuration)\examples\</OutDir>
64
+ </PropertyGroup>
65
+ <ItemDefinitionGroup>
66
+ <ClCompile>
67
+ <AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
68
+ <AdditionalIncludeDirectories>.;..\libusb;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
69
+ <PreprocessorDefinitions>_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
70
+ <WarningLevel>Level3</WarningLevel>
71
+ </ClCompile>
72
+ <ClCompile Condition="'$(Configuration)'=='Debug'">
73
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
74
+ <Optimization>Disabled</Optimization>
75
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
76
+ </ClCompile>
77
+ <ClCompile Condition="'$(Configuration)'=='Release'">
78
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
79
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
80
+ </ClCompile>
81
+ <Link>
82
+ <ProgramDatabaseFile>$(TargetDir)$(ProjectName).pdb</ProgramDatabaseFile>
83
+ <SubSystem>Console</SubSystem>
84
+ <AdditionalDependencies>kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
85
+ </Link>
86
+ <Link Condition="'$(Configuration)'=='Debug'">
87
+ <GenerateDebugInformation>true</GenerateDebugInformation>
88
+ </Link>
89
+ </ItemDefinitionGroup>
90
+ <ItemGroup>
91
+ <ClCompile Include="..\examples\dpfp.c" />
92
+ </ItemGroup>
93
+ <ItemGroup>
94
+ <ClInclude Include=".\config.h" />
95
+ <ClInclude Include="..\libusb\libusb.h" />
96
+ </ItemGroup>
97
+ <ItemGroup>
98
+ <ProjectReference Include=".\libusb_static_2019.vcxproj">
99
+ <Project>{349ee8f9-7d25-4909-aaf5-ff3fade72187}</Project>
100
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
101
+ </ProjectReference>
102
+ </ItemGroup>
103
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
104
+ <ImportGroup Label="ExtensionTargets">
105
+ </ImportGroup>
106
+ </Project>