usb 1.7.2 → 1.8.1-libusb.4

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 (188) hide show
  1. package/.gitmodules +1 -1
  2. package/Readme.md +2 -2
  3. package/binding.gyp +2 -2
  4. package/libusb/.private/pre-commit.sh +7 -1
  5. package/libusb/.travis.yml +49 -0
  6. package/libusb/AUTHORS +44 -3
  7. package/libusb/Brewfile +4 -0
  8. package/libusb/ChangeLog +74 -2
  9. package/libusb/README.md +32 -0
  10. package/libusb/TODO +1 -1
  11. package/libusb/Xcode/common.xcconfig +12 -0
  12. package/libusb/Xcode/config.h +25 -0
  13. package/libusb/Xcode/libusb.xcodeproj/project.pbxproj +959 -1
  14. package/libusb/android/README +4 -2
  15. package/libusb/android/config.h +75 -0
  16. package/libusb/appveyor.yml +41 -0
  17. package/libusb/appveyor_cygwin.bat +11 -0
  18. package/libusb/appveyor_minGW.bat +19 -0
  19. package/libusb/autogen.sh +1 -1
  20. package/libusb/bootstrap.sh +3 -16
  21. package/libusb/configure.ac +108 -80
  22. package/libusb/doc/doxygen.cfg.in +1785 -739
  23. package/libusb/examples/Makefile.am +1 -1
  24. package/libusb/examples/dpfp.c +3 -1
  25. package/libusb/examples/dpfp_threaded.c +23 -10
  26. package/libusb/examples/ezusb.c +3 -3
  27. package/libusb/examples/ezusb.h +2 -2
  28. package/libusb/examples/fxload.c +31 -9
  29. package/libusb/examples/hotplugtest.c +35 -7
  30. package/libusb/examples/listdevs.c +3 -1
  31. package/libusb/examples/sam3u_benchmark.c +3 -3
  32. package/libusb/examples/testlibusb.c +277 -0
  33. package/libusb/examples/xusb.c +40 -34
  34. package/libusb/libusb/Makefile.am +49 -23
  35. package/libusb/libusb/core.c +855 -457
  36. package/libusb/libusb/descriptor.c +72 -78
  37. package/libusb/libusb/hotplug.c +122 -76
  38. package/libusb/libusb/hotplug.h +42 -25
  39. package/libusb/libusb/io.c +625 -390
  40. package/libusb/libusb/libusb-1.0.def +12 -0
  41. package/libusb/libusb/libusb.h +218 -150
  42. package/libusb/libusb/libusbi.h +346 -176
  43. package/libusb/libusb/os/darwin_usb.c +604 -319
  44. package/libusb/libusb/os/darwin_usb.h +61 -20
  45. package/libusb/libusb/os/haiku_pollfs.cpp +367 -0
  46. package/libusb/libusb/os/haiku_usb.h +113 -0
  47. package/libusb/libusb/os/haiku_usb_backend.cpp +533 -0
  48. package/libusb/libusb/os/haiku_usb_raw.cpp +267 -0
  49. package/libusb/libusb/os/haiku_usb_raw.h +188 -0
  50. package/libusb/libusb/os/linux_netlink.c +186 -146
  51. package/libusb/libusb/os/linux_udev.c +36 -14
  52. package/libusb/libusb/os/linux_usbfs.c +426 -225
  53. package/libusb/libusb/os/linux_usbfs.h +5 -3
  54. package/libusb/libusb/os/netbsd_usb.c +21 -77
  55. package/libusb/libusb/os/openbsd_usb.c +32 -115
  56. package/libusb/libusb/os/poll_posix.c +38 -5
  57. package/libusb/libusb/os/poll_posix.h +3 -0
  58. package/libusb/libusb/os/poll_windows.c +277 -626
  59. package/libusb/libusb/os/poll_windows.h +11 -44
  60. package/libusb/libusb/os/sunos_usb.c +1695 -0
  61. package/libusb/libusb/os/sunos_usb.h +80 -0
  62. package/libusb/libusb/os/threads_posix.c +24 -26
  63. package/libusb/libusb/os/threads_posix.h +73 -21
  64. package/libusb/libusb/os/threads_windows.c +71 -157
  65. package/libusb/libusb/os/threads_windows.h +68 -44
  66. package/libusb/libusb/os/wince_usb.c +276 -420
  67. package/libusb/libusb/os/wince_usb.h +23 -28
  68. package/libusb/libusb/os/windows_common.h +78 -58
  69. package/libusb/libusb/os/windows_nt_common.c +1010 -0
  70. package/libusb/libusb/os/windows_nt_common.h +110 -0
  71. package/libusb/libusb/os/windows_nt_shared_types.h +147 -0
  72. package/libusb/libusb/os/windows_usbdk.c +830 -0
  73. package/libusb/libusb/os/windows_usbdk.h +103 -0
  74. package/libusb/libusb/os/windows_winusb.c +4391 -0
  75. package/libusb/libusb/os/windows_winusb.h +783 -0
  76. package/libusb/libusb/strerror.c +41 -7
  77. package/libusb/libusb/sync.c +41 -13
  78. package/libusb/libusb/version.h +1 -1
  79. package/libusb/libusb/version_nano.h +1 -1
  80. package/libusb/libusb-1.0.pc.in +1 -1
  81. package/libusb/msvc/appveyor.bat +27 -0
  82. package/libusb/msvc/config.h +5 -4
  83. package/libusb/msvc/ddk_build.cmd +87 -43
  84. package/libusb/msvc/fxload_2010.vcxproj +24 -104
  85. package/libusb/msvc/fxload_2012.vcxproj +24 -107
  86. package/libusb/msvc/fxload_2013.vcxproj +24 -107
  87. package/libusb/msvc/fxload_2015.vcxproj +91 -0
  88. package/libusb/msvc/fxload_2017.vcxproj +114 -0
  89. package/libusb/msvc/fxload_sources +1 -1
  90. package/libusb/msvc/getopt_2010.vcxproj +16 -75
  91. package/libusb/msvc/getopt_2012.vcxproj +16 -79
  92. package/libusb/msvc/getopt_2013.vcxproj +16 -79
  93. package/libusb/msvc/getopt_2015.vcxproj +73 -0
  94. package/libusb/msvc/getopt_2017.vcxproj +98 -0
  95. package/libusb/msvc/getopt_sources +6 -2
  96. package/libusb/msvc/hotplugtest_2010.vcxproj +18 -99
  97. package/libusb/msvc/hotplugtest_2012.vcxproj +18 -102
  98. package/libusb/msvc/hotplugtest_2013.vcxproj +18 -102
  99. package/libusb/msvc/hotplugtest_2015.vcxproj +83 -0
  100. package/libusb/msvc/hotplugtest_2017.vcxproj +106 -0
  101. package/libusb/msvc/hotplugtest_sources +1 -1
  102. package/libusb/msvc/libusb_2005.sln +20 -20
  103. package/libusb/msvc/libusb_2010.sln +57 -46
  104. package/libusb/msvc/libusb_2012.sln +57 -46
  105. package/libusb/msvc/libusb_2013.sln +57 -50
  106. package/libusb/msvc/libusb_2015.sln +59 -52
  107. package/libusb/msvc/libusb_2017.sln +186 -0
  108. package/libusb/msvc/libusb_dll.dsp +2 -2
  109. package/libusb/msvc/libusb_dll_2005.vcproj +30 -2
  110. package/libusb/msvc/libusb_dll_2010.vcxproj +26 -90
  111. package/libusb/msvc/libusb_dll_2012.vcxproj +28 -96
  112. package/libusb/msvc/libusb_dll_2013.vcxproj +28 -96
  113. package/libusb/msvc/libusb_dll_2015.vcxproj +107 -0
  114. package/libusb/msvc/libusb_dll_2017.vcxproj +134 -0
  115. package/libusb/msvc/libusb_dll_wince.vcproj +9 -1
  116. package/libusb/msvc/libusb_sources +10 -5
  117. package/libusb/msvc/libusb_static.dsp +2 -2
  118. package/libusb/msvc/libusb_static_2005.vcproj +32 -4
  119. package/libusb/msvc/libusb_static_2010.vcxproj +24 -83
  120. package/libusb/msvc/libusb_static_2012.vcxproj +25 -87
  121. package/libusb/msvc/libusb_static_2013.vcxproj +25 -87
  122. package/libusb/msvc/libusb_static_2015.vcxproj +98 -0
  123. package/libusb/msvc/libusb_static_2017.vcxproj +117 -0
  124. package/libusb/msvc/libusb_static_wince.vcproj +20 -26
  125. package/libusb/msvc/libusb_wince.sln +88 -88
  126. package/libusb/msvc/listdevs_2010.vcxproj +16 -99
  127. package/libusb/msvc/listdevs_2012.vcxproj +16 -102
  128. package/libusb/msvc/listdevs_2013.vcxproj +16 -102
  129. package/libusb/msvc/listdevs_2015.vcxproj +83 -0
  130. package/libusb/msvc/listdevs_2017.vcxproj +106 -0
  131. package/libusb/msvc/listdevs_sources +2 -1
  132. package/libusb/msvc/stress_2010.vcxproj +20 -101
  133. package/libusb/msvc/stress_2012.vcxproj +20 -104
  134. package/libusb/msvc/stress_2013.vcxproj +20 -104
  135. package/libusb/msvc/stress_2015.vcxproj +87 -0
  136. package/libusb/msvc/stress_2017.vcxproj +110 -0
  137. package/libusb/msvc/stress_sources +21 -0
  138. package/libusb/msvc/testlibusb_2010.vcxproj +82 -0
  139. package/libusb/msvc/testlibusb_2012.vcxproj +83 -0
  140. package/libusb/msvc/testlibusb_2013.vcxproj +83 -0
  141. package/libusb/msvc/testlibusb_2015.vcxproj +83 -0
  142. package/libusb/msvc/testlibusb_2017.vcxproj +106 -0
  143. package/libusb/msvc/testlibusb_sources +20 -0
  144. package/libusb/msvc/xusb_2010.vcxproj +17 -98
  145. package/libusb/msvc/xusb_2012.vcxproj +17 -101
  146. package/libusb/msvc/xusb_2013.vcxproj +17 -101
  147. package/libusb/msvc/xusb_2015.vcxproj +83 -0
  148. package/libusb/msvc/xusb_2017.vcxproj +106 -0
  149. package/libusb/msvc/xusb_sources +1 -1
  150. package/libusb/tests/stress.c +2 -2
  151. package/libusb/tests/testlib.c +0 -4
  152. package/libusb/travis-autogen.sh +39 -0
  153. package/libusb.gypi +13 -2
  154. package/package.json +20 -11
  155. package/prebuilds/android-arm/node.napi.armv7.node +0 -0
  156. package/prebuilds/android-arm64/node.napi.armv8.node +0 -0
  157. package/prebuilds/darwin-x64+arm64/node.napi.node +0 -0
  158. package/prebuilds/linux-arm/node.napi.armv6.node +0 -0
  159. package/prebuilds/linux-arm/node.napi.armv7.node +0 -0
  160. package/prebuilds/linux-arm64/node.napi.armv8.node +0 -0
  161. package/prebuilds/linux-ia32/node.napi.node +0 -0
  162. package/prebuilds/linux-x64/node.napi.glibc.node +0 -0
  163. package/prebuilds/linux-x64/node.napi.musl.node +0 -0
  164. package/prebuilds/win32-ia32/node.napi.node +0 -0
  165. package/prebuilds/win32-x64/node.napi.node +0 -0
  166. package/src/device.cc +1 -1
  167. package/usb.js +51 -5
  168. package/.github/workflows/prebuild.yml +0 -49
  169. package/libusb/INSTALL +0 -234
  170. package/libusb/README +0 -28
  171. package/libusb/libusb/os/windows_usb.c +0 -5347
  172. package/libusb/libusb/os/windows_usb.h +0 -971
  173. package/libusb/msvc/fxload_2010.vcxproj.filters +0 -25
  174. package/libusb/msvc/fxload_2012.vcxproj.filters +0 -25
  175. package/libusb/msvc/getopt_2010.vcxproj.filters +0 -26
  176. package/libusb/msvc/getopt_2012.vcxproj.filters +0 -26
  177. package/libusb/msvc/hotplugtest_2010.vcxproj.filters +0 -14
  178. package/libusb/msvc/hotplugtest_2012.vcxproj.filters +0 -14
  179. package/libusb/msvc/libusb_dll_2010.vcxproj.filters +0 -81
  180. package/libusb/msvc/libusb_dll_2012.vcxproj.filters +0 -84
  181. package/libusb/msvc/libusb_static_2010.vcxproj.filters +0 -74
  182. package/libusb/msvc/libusb_static_2012.vcxproj.filters +0 -74
  183. package/libusb/msvc/listdevs_2010.vcxproj.filters +0 -14
  184. package/libusb/msvc/listdevs_2012.vcxproj.filters +0 -14
  185. package/libusb/msvc/stress_2010.vcxproj.filters +0 -25
  186. package/libusb/msvc/stress_2012.vcxproj.filters +0 -25
  187. package/libusb/msvc/xusb_2010.vcxproj.filters +0 -14
  188. package/libusb/msvc/xusb_2012.vcxproj.filters +0 -14
@@ -0,0 +1,110 @@
1
+ /*
2
+ * Windows backend common header for libusb 1.0
3
+ *
4
+ * This file brings together header code common between
5
+ * the desktop Windows backends.
6
+ * Copyright © 2012-2013 RealVNC Ltd.
7
+ * Copyright © 2009-2012 Pete Batard <pete@akeo.ie>
8
+ * With contributions from Michael Plante, Orin Eman et al.
9
+ * Parts of this code adapted from libusb-win32-v1 by Stephan Meyer
10
+ * Major code testing contribution by Xiaofan Chen
11
+ *
12
+ * This library is free software; you can redistribute it and/or
13
+ * modify it under the terms of the GNU Lesser General Public
14
+ * License as published by the Free Software Foundation; either
15
+ * version 2.1 of the License, or (at your option) any later version.
16
+ *
17
+ * This library is distributed in the hope that it will be useful,
18
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
+ * Lesser General Public License for more details.
21
+ *
22
+ * You should have received a copy of the GNU Lesser General Public
23
+ * License along with this library; if not, write to the Free Software
24
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25
+ */
26
+
27
+ #pragma once
28
+
29
+ #include "windows_nt_shared_types.h"
30
+
31
+ /* Windows versions */
32
+ enum windows_version {
33
+ WINDOWS_UNDEFINED,
34
+ WINDOWS_2000,
35
+ WINDOWS_XP,
36
+ WINDOWS_2003, // Also XP x64
37
+ WINDOWS_VISTA,
38
+ WINDOWS_7,
39
+ WINDOWS_8,
40
+ WINDOWS_8_1,
41
+ WINDOWS_10,
42
+ WINDOWS_11_OR_LATER
43
+ };
44
+
45
+ extern enum windows_version windows_version;
46
+
47
+ /* This call is only available from Vista */
48
+ extern BOOL (WINAPI *pCancelIoEx)(HANDLE, LPOVERLAPPED);
49
+
50
+ struct windows_backend {
51
+ int (*init)(struct libusb_context *ctx);
52
+ void (*exit)(struct libusb_context *ctx);
53
+ int (*get_device_list)(struct libusb_context *ctx,
54
+ struct discovered_devs **discdevs);
55
+ int (*open)(struct libusb_device_handle *dev_handle);
56
+ void (*close)(struct libusb_device_handle *dev_handle);
57
+ int (*get_device_descriptor)(struct libusb_device *device, unsigned char *buffer);
58
+ int (*get_active_config_descriptor)(struct libusb_device *device,
59
+ unsigned char *buffer, size_t len);
60
+ int (*get_config_descriptor)(struct libusb_device *device,
61
+ uint8_t config_index, unsigned char *buffer, size_t len);
62
+ int (*get_config_descriptor_by_value)(struct libusb_device *device,
63
+ uint8_t bConfigurationValue, unsigned char **buffer);
64
+ int (*get_configuration)(struct libusb_device_handle *dev_handle, int *config);
65
+ int (*set_configuration)(struct libusb_device_handle *dev_handle, int config);
66
+ int (*claim_interface)(struct libusb_device_handle *dev_handle, int interface_number);
67
+ int (*release_interface)(struct libusb_device_handle *dev_handle, int interface_number);
68
+ int (*set_interface_altsetting)(struct libusb_device_handle *dev_handle,
69
+ int interface_number, int altsetting);
70
+ int (*clear_halt)(struct libusb_device_handle *dev_handle,
71
+ unsigned char endpoint);
72
+ int (*reset_device)(struct libusb_device_handle *dev_handle);
73
+ void (*destroy_device)(struct libusb_device *dev);
74
+ int (*submit_transfer)(struct usbi_transfer *itransfer);
75
+ int (*cancel_transfer)(struct usbi_transfer *itransfer);
76
+ void (*clear_transfer_priv)(struct usbi_transfer *itransfer);
77
+ int (*copy_transfer_data)(struct usbi_transfer *itransfer, uint32_t io_size);
78
+ int (*get_transfer_fd)(struct usbi_transfer *itransfer);
79
+ void (*get_overlapped_result)(struct usbi_transfer *itransfer,
80
+ DWORD *io_result, DWORD *io_size);
81
+ };
82
+
83
+ struct windows_context_priv {
84
+ const struct windows_backend *backend;
85
+ };
86
+
87
+ union windows_device_priv {
88
+ struct usbdk_device_priv usbdk_priv;
89
+ struct winusb_device_priv winusb_priv;
90
+ };
91
+
92
+ union windows_device_handle_priv {
93
+ struct usbdk_device_handle_priv usbdk_priv;
94
+ struct winusb_device_handle_priv winusb_priv;
95
+ };
96
+
97
+ union windows_transfer_priv {
98
+ struct usbdk_transfer_priv usbdk_priv;
99
+ struct winusb_transfer_priv winusb_priv;
100
+ };
101
+
102
+ extern const struct windows_backend usbdk_backend;
103
+ extern const struct windows_backend winusb_backend;
104
+
105
+ unsigned long htab_hash(const char *str);
106
+ void windows_force_sync_completion(OVERLAPPED *overlapped, ULONG size);
107
+
108
+ #if defined(ENABLE_LOGGING)
109
+ const char *windows_error_str(DWORD error_code);
110
+ #endif
@@ -0,0 +1,147 @@
1
+ #pragma once
2
+
3
+ #include "windows_common.h"
4
+
5
+ #include <pshpack1.h>
6
+
7
+ typedef struct USB_DEVICE_DESCRIPTOR {
8
+ UCHAR bLength;
9
+ UCHAR bDescriptorType;
10
+ USHORT bcdUSB;
11
+ UCHAR bDeviceClass;
12
+ UCHAR bDeviceSubClass;
13
+ UCHAR bDeviceProtocol;
14
+ UCHAR bMaxPacketSize0;
15
+ USHORT idVendor;
16
+ USHORT idProduct;
17
+ USHORT bcdDevice;
18
+ UCHAR iManufacturer;
19
+ UCHAR iProduct;
20
+ UCHAR iSerialNumber;
21
+ UCHAR bNumConfigurations;
22
+ } USB_DEVICE_DESCRIPTOR, *PUSB_DEVICE_DESCRIPTOR;
23
+
24
+ typedef struct USB_CONFIGURATION_DESCRIPTOR {
25
+ UCHAR bLength;
26
+ UCHAR bDescriptorType;
27
+ USHORT wTotalLength;
28
+ UCHAR bNumInterfaces;
29
+ UCHAR bConfigurationValue;
30
+ UCHAR iConfiguration;
31
+ UCHAR bmAttributes;
32
+ UCHAR MaxPower;
33
+ } USB_CONFIGURATION_DESCRIPTOR, *PUSB_CONFIGURATION_DESCRIPTOR;
34
+
35
+ #include <poppack.h>
36
+
37
+ #define MAX_DEVICE_ID_LEN 200
38
+
39
+ typedef struct USB_DK_DEVICE_ID {
40
+ WCHAR DeviceID[MAX_DEVICE_ID_LEN];
41
+ WCHAR InstanceID[MAX_DEVICE_ID_LEN];
42
+ } USB_DK_DEVICE_ID, *PUSB_DK_DEVICE_ID;
43
+
44
+ typedef struct USB_DK_DEVICE_INFO {
45
+ USB_DK_DEVICE_ID ID;
46
+ ULONG64 FilterID;
47
+ ULONG64 Port;
48
+ ULONG64 Speed;
49
+ USB_DEVICE_DESCRIPTOR DeviceDescriptor;
50
+ } USB_DK_DEVICE_INFO, *PUSB_DK_DEVICE_INFO;
51
+
52
+ typedef struct USB_DK_ISO_TRANSFER_RESULT {
53
+ ULONG64 ActualLength;
54
+ ULONG64 TransferResult;
55
+ } USB_DK_ISO_TRANSFER_RESULT, *PUSB_DK_ISO_TRANSFER_RESULT;
56
+
57
+ typedef struct USB_DK_GEN_TRANSFER_RESULT {
58
+ ULONG64 BytesTransferred;
59
+ ULONG64 UsbdStatus; // USBD_STATUS code
60
+ } USB_DK_GEN_TRANSFER_RESULT, *PUSB_DK_GEN_TRANSFER_RESULT;
61
+
62
+ typedef struct USB_DK_TRANSFER_RESULT {
63
+ USB_DK_GEN_TRANSFER_RESULT GenResult;
64
+ PVOID64 IsochronousResultsArray; // array of USB_DK_ISO_TRANSFER_RESULT
65
+ } USB_DK_TRANSFER_RESULT, *PUSB_DK_TRANSFER_RESULT;
66
+
67
+ typedef struct USB_DK_TRANSFER_REQUEST {
68
+ ULONG64 EndpointAddress;
69
+ PVOID64 Buffer;
70
+ ULONG64 BufferLength;
71
+ ULONG64 TransferType;
72
+ ULONG64 IsochronousPacketsArraySize;
73
+ PVOID64 IsochronousPacketsArray;
74
+ USB_DK_TRANSFER_RESULT Result;
75
+ } USB_DK_TRANSFER_REQUEST, *PUSB_DK_TRANSFER_REQUEST;
76
+
77
+ struct usbdk_device_priv {
78
+ USB_DK_DEVICE_INFO info;
79
+ PUSB_CONFIGURATION_DESCRIPTOR *config_descriptors;
80
+ HANDLE redirector_handle;
81
+ HANDLE system_handle;
82
+ uint8_t active_configuration;
83
+ };
84
+
85
+ struct winusb_device_priv {
86
+ bool initialized;
87
+ bool root_hub;
88
+ uint8_t active_config;
89
+ uint8_t depth; // distance to HCD
90
+ const struct windows_usb_api_backend *apib;
91
+ char *dev_id;
92
+ char *path; // device interface path
93
+ int sub_api; // for WinUSB-like APIs
94
+ struct {
95
+ char *path; // each interface needs a device interface path,
96
+ const struct windows_usb_api_backend *apib; // an API backend (multiple drivers support),
97
+ int sub_api;
98
+ int8_t nb_endpoints; // and a set of endpoint addresses (USB_MAXENDPOINTS)
99
+ uint8_t *endpoint;
100
+ int current_altsetting;
101
+ bool restricted_functionality; // indicates if the interface functionality is restricted
102
+ // by Windows (eg. HID keyboards or mice cannot do R/W)
103
+ } usb_interface[USB_MAXINTERFACES];
104
+ struct hid_device_priv *hid;
105
+ USB_DEVICE_DESCRIPTOR dev_descriptor;
106
+ PUSB_CONFIGURATION_DESCRIPTOR *config_descriptor; // list of pointers to the cached config descriptors
107
+ };
108
+
109
+ struct usbdk_device_handle_priv {
110
+ // Not currently used
111
+ char dummy;
112
+ };
113
+
114
+ struct winusb_device_handle_priv {
115
+ int active_interface;
116
+ struct {
117
+ HANDLE dev_handle; // WinUSB needs an extra handle for the file
118
+ HANDLE api_handle; // used by the API to communicate with the device
119
+ } interface_handle[USB_MAXINTERFACES];
120
+ int autoclaim_count[USB_MAXINTERFACES]; // For auto-release
121
+ };
122
+
123
+ struct usbdk_transfer_priv {
124
+ USB_DK_TRANSFER_REQUEST request;
125
+ struct winfd pollable_fd;
126
+ HANDLE system_handle;
127
+ PULONG64 IsochronousPacketsArray;
128
+ PUSB_DK_ISO_TRANSFER_RESULT IsochronousResultsArray;
129
+ };
130
+
131
+ struct winusb_transfer_priv {
132
+ struct winfd pollable_fd;
133
+ HANDLE handle;
134
+ uint8_t interface_number;
135
+ uint8_t *hid_buffer; // 1 byte extended data buffer, required for HID
136
+ uint8_t *hid_dest; // transfer buffer destination, required for HID
137
+ size_t hid_expected_size;
138
+
139
+ // For isochronous transfers with LibUSBk driver:
140
+ void *iso_context;
141
+
142
+ // For isochronous transfers with Microsoft WinUSB driver:
143
+ void *isoch_buffer_handle; // The isoch_buffer_handle to free at the end of the transfer
144
+ BOOL iso_break_stream; // Whether the isoch. stream was to be continued in the last call of libusb_submit_transfer.
145
+ // As we this structure is zeroed out upon initialization, we need to use inverse logic here.
146
+ libusb_transfer_cb_fn iso_user_callback; // Original transfer callback of the user. Might be used for isochronous transfers.
147
+ };