usb 2.12.1 → 2.14.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.
- package/CHANGELOG.md +13 -0
- package/README.md +11 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/usb/bindings.d.ts +0 -1
- package/dist/usb/bindings.js +1 -1
- package/dist/usb/bindings.js.map +1 -1
- package/dist/usb/capability.d.ts +0 -1
- package/dist/usb/capability.js.map +1 -1
- package/dist/usb/descriptors.d.ts +0 -1
- package/dist/usb/device.d.ts +0 -1
- package/dist/usb/device.js.map +1 -1
- package/dist/usb/endpoint.d.ts +0 -1
- package/dist/usb/endpoint.js +2 -2
- package/dist/usb/endpoint.js.map +1 -1
- package/dist/usb/index.js.map +1 -1
- package/dist/usb/interface.js +2 -2
- package/dist/usb/interface.js.map +1 -1
- package/dist/webusb/index.d.ts +1 -3
- package/dist/webusb/index.js.map +1 -1
- package/dist/webusb/webusb-device.d.ts +0 -1
- package/dist/webusb/webusb-device.js +10 -10
- package/dist/webusb/webusb-device.js.map +1 -1
- package/libusb/.codespellrc +3 -0
- package/libusb/.private/appveyor_build.sh +5 -1
- package/libusb/.private/ci-build.sh +26 -1
- package/libusb/.private/ci-container-build.sh +2 -5
- package/libusb/.private/wbs.txt +5 -8
- package/libusb/AUTHORS +22 -0
- package/libusb/ChangeLog +19 -2
- package/libusb/HACKING +25 -0
- package/libusb/INSTALL_WIN.txt +11 -10
- package/libusb/NEWS +2 -2
- package/libusb/README +3 -2
- package/libusb/README.git +1 -1
- package/libusb/Xcode/common.xcconfig +8 -1
- package/libusb/Xcode/config.h +0 -6
- package/libusb/Xcode/debug.xcconfig +4 -1
- package/libusb/Xcode/libusb.xcconfig +1 -1
- package/libusb/Xcode/libusb.xcodeproj/project.pbxproj +60 -30
- package/libusb/Xcode/libusb_debug.xcconfig +1 -1
- package/libusb/Xcode/libusb_release.xcconfig +1 -1
- package/libusb/Xcode/release.xcconfig +1 -1
- package/libusb/appveyor.yml +33 -9
- package/libusb/configure.ac +68 -37
- package/libusb/examples/dpfp.c +2 -2
- package/libusb/examples/fxload.c +2 -2
- package/libusb/examples/hotplugtest.c +28 -13
- package/libusb/examples/listdevs.c +1 -1
- package/libusb/examples/sam3u_benchmark.c +1 -1
- package/libusb/examples/testlibusb.c +1 -1
- package/libusb/examples/xusb.c +74 -19
- package/libusb/libusb/Makefile.am +11 -1
- package/libusb/libusb/core.c +364 -186
- package/libusb/libusb/descriptor.c +276 -16
- package/libusb/libusb/hotplug.c +5 -4
- package/libusb/libusb/io.c +72 -61
- package/libusb/libusb/libusb-1.0.def +14 -1
- package/libusb/libusb/libusb.h +245 -76
- package/libusb/libusb/libusbi.h +35 -13
- package/libusb/libusb/os/darwin_usb.c +542 -279
- package/libusb/libusb/os/darwin_usb.h +44 -115
- package/libusb/libusb/os/emscripten_webusb.cpp +870 -0
- package/libusb/libusb/os/events_posix.c +40 -0
- package/libusb/libusb/os/events_posix.h +3 -0
- package/libusb/libusb/os/linux_usbfs.c +27 -16
- package/libusb/libusb/os/netbsd_usb.c +36 -36
- package/libusb/libusb/os/openbsd_usb.c +34 -34
- package/libusb/libusb/os/sunos_usb.c +25 -15
- package/libusb/libusb/os/threads_posix.c +1 -5
- package/libusb/libusb/os/windows_common.c +13 -5
- package/libusb/libusb/os/windows_common.h +8 -0
- package/libusb/libusb/os/windows_winusb.c +366 -174
- package/libusb/libusb/os/windows_winusb.h +13 -9
- package/libusb/libusb/strerror.c +5 -5
- package/libusb/libusb/sync.c +24 -19
- package/libusb/libusb/version.h +1 -1
- package/libusb/libusb/version_nano.h +1 -1
- package/libusb/msvc/Base.props +60 -0
- package/libusb/msvc/Configuration.Application.props +7 -0
- package/libusb/msvc/Configuration.Base.props +47 -0
- package/libusb/msvc/Configuration.DynamicLibrary.props +21 -0
- package/libusb/msvc/Configuration.StaticLibrary.props +7 -0
- package/libusb/msvc/ProjectConfigurations.Base.props +69 -0
- package/libusb/msvc/build_all.ps1 +17 -0
- package/libusb/msvc/config.h +2 -2
- package/libusb/msvc/dpfp.vcxproj +33 -0
- package/libusb/msvc/dpfp_threaded.vcxproj +38 -0
- package/libusb/msvc/fxload.vcxproj +46 -0
- package/libusb/msvc/getopt.vcxproj +33 -0
- package/libusb/msvc/hotplugtest.vcxproj +32 -0
- package/libusb/msvc/init_context.vcxproj +35 -0
- package/libusb/msvc/libusb.sln +542 -0
- package/libusb/msvc/libusb_dll.vcxproj +61 -0
- package/libusb/msvc/libusb_static.vcxproj +49 -0
- package/libusb/msvc/listdevs.vcxproj +32 -0
- package/libusb/msvc/sam3u_benchmark.vcxproj +33 -0
- package/libusb/msvc/set_option.vcxproj +35 -0
- package/libusb/msvc/stress.vcxproj +35 -0
- package/libusb/msvc/stress_mt.vcxproj +33 -0
- package/libusb/msvc/testlibusb.vcxproj +32 -0
- package/libusb/msvc/xusb.vcxproj +38 -0
- package/libusb/tests/Makefile.am +25 -3
- package/libusb/tests/init_context.c +153 -0
- package/libusb/tests/macos.c +130 -0
- package/libusb/tests/set_option.c +253 -0
- package/libusb/tests/stress.c +17 -14
- package/libusb/tests/stress_mt.c +265 -0
- package/libusb/tests/testlib.c +1 -1
- package/libusb/tests/umockdev.c +9 -9
- package/libusb/tests/webusb-test-shim/index.js +12 -0
- package/libusb/tests/webusb-test-shim/package-lock.json +50 -0
- package/libusb/tests/webusb-test-shim/package.json +10 -0
- package/package.json +8 -8
- package/prebuilds/android-arm/node.napi.armv7.node +0 -0
- package/prebuilds/android-arm64/node.napi.armv8.node +0 -0
- package/prebuilds/darwin-x64+arm64/node.napi.node +0 -0
- package/prebuilds/linux-arm/node.napi.armv6.node +0 -0
- package/prebuilds/linux-arm/node.napi.armv7.node +0 -0
- package/prebuilds/linux-arm64/node.napi.armv8.node +0 -0
- package/prebuilds/linux-ia32/node.napi.node +0 -0
- package/prebuilds/linux-x64/node.napi.glibc.node +0 -0
- package/prebuilds/linux-x64/node.napi.musl.node +0 -0
- package/prebuilds/win32-arm64/node.napi.node +0 -0
- package/prebuilds/win32-ia32/node.napi.node +0 -0
- package/prebuilds/win32-x64/node.napi.node +0 -0
- package/src/device.cc +16 -6
- package/src/transfer.cc +1 -1
- package/libusb/msvc/dpfp_2013.vcxproj +0 -87
- package/libusb/msvc/dpfp_2013.vcxproj.filters +0 -26
- package/libusb/msvc/dpfp_2015.vcxproj +0 -87
- package/libusb/msvc/dpfp_2015.vcxproj.filters +0 -26
- package/libusb/msvc/dpfp_2017.vcxproj +0 -106
- package/libusb/msvc/dpfp_2017.vcxproj.filters +0 -26
- package/libusb/msvc/dpfp_2019.vcxproj +0 -106
- package/libusb/msvc/dpfp_2019.vcxproj.filters +0 -26
- package/libusb/msvc/dpfp_threaded_2013.vcxproj +0 -87
- package/libusb/msvc/dpfp_threaded_2013.vcxproj.filters +0 -26
- package/libusb/msvc/dpfp_threaded_2015.vcxproj +0 -87
- package/libusb/msvc/dpfp_threaded_2015.vcxproj.filters +0 -26
- package/libusb/msvc/dpfp_threaded_2017.vcxproj +0 -106
- package/libusb/msvc/dpfp_threaded_2017.vcxproj.filters +0 -26
- package/libusb/msvc/dpfp_threaded_2019.vcxproj +0 -106
- package/libusb/msvc/dpfp_threaded_2019.vcxproj.filters +0 -26
- package/libusb/msvc/fxload_2013.vcxproj +0 -94
- package/libusb/msvc/fxload_2013.vcxproj.filters +0 -35
- package/libusb/msvc/fxload_2015.vcxproj +0 -94
- package/libusb/msvc/fxload_2015.vcxproj.filters +0 -35
- package/libusb/msvc/fxload_2017.vcxproj +0 -113
- package/libusb/msvc/fxload_2017.vcxproj.filters +0 -35
- package/libusb/msvc/fxload_2019.vcxproj +0 -113
- package/libusb/msvc/fxload_2019.vcxproj.filters +0 -35
- package/libusb/msvc/getopt_2013.vcxproj +0 -72
- package/libusb/msvc/getopt_2013.vcxproj.filters +0 -26
- package/libusb/msvc/getopt_2015.vcxproj +0 -73
- package/libusb/msvc/getopt_2015.vcxproj.filters +0 -26
- package/libusb/msvc/getopt_2017.vcxproj +0 -92
- package/libusb/msvc/getopt_2017.vcxproj.filters +0 -26
- package/libusb/msvc/getopt_2019.vcxproj +0 -92
- package/libusb/msvc/getopt_2019.vcxproj.filters +0 -26
- package/libusb/msvc/hotplugtest_2013.vcxproj +0 -86
- package/libusb/msvc/hotplugtest_2013.vcxproj.filters +0 -23
- package/libusb/msvc/hotplugtest_2015.vcxproj +0 -86
- package/libusb/msvc/hotplugtest_2015.vcxproj.filters +0 -23
- package/libusb/msvc/hotplugtest_2017.vcxproj +0 -105
- package/libusb/msvc/hotplugtest_2017.vcxproj.filters +0 -23
- package/libusb/msvc/hotplugtest_2019.vcxproj +0 -105
- package/libusb/msvc/hotplugtest_2019.vcxproj.filters +0 -23
- package/libusb/msvc/libusb_2013.sln +0 -137
- package/libusb/msvc/libusb_2015.sln +0 -137
- package/libusb/msvc/libusb_2017.sln +0 -240
- package/libusb/msvc/libusb_2019.sln +0 -240
- package/libusb/msvc/libusb_dll_2013.vcxproj +0 -104
- package/libusb/msvc/libusb_dll_2013.vcxproj.filters +0 -94
- package/libusb/msvc/libusb_dll_2015.vcxproj +0 -105
- package/libusb/msvc/libusb_dll_2015.vcxproj.filters +0 -94
- package/libusb/msvc/libusb_dll_2017.vcxproj +0 -124
- package/libusb/msvc/libusb_dll_2017.vcxproj.filters +0 -94
- package/libusb/msvc/libusb_dll_2019.vcxproj +0 -124
- package/libusb/msvc/libusb_dll_2019.vcxproj.filters +0 -94
- package/libusb/msvc/libusb_static_2013.vcxproj +0 -94
- package/libusb/msvc/libusb_static_2013.vcxproj.filters +0 -80
- package/libusb/msvc/libusb_static_2015.vcxproj +0 -95
- package/libusb/msvc/libusb_static_2015.vcxproj.filters +0 -80
- package/libusb/msvc/libusb_static_2017.vcxproj +0 -114
- package/libusb/msvc/libusb_static_2017.vcxproj.filters +0 -80
- package/libusb/msvc/libusb_static_2019.vcxproj +0 -114
- package/libusb/msvc/libusb_static_2019.vcxproj.filters +0 -80
- package/libusb/msvc/listdevs_2013.vcxproj +0 -86
- package/libusb/msvc/listdevs_2013.vcxproj.filters +0 -23
- package/libusb/msvc/listdevs_2015.vcxproj +0 -86
- package/libusb/msvc/listdevs_2015.vcxproj.filters +0 -23
- package/libusb/msvc/listdevs_2017.vcxproj +0 -105
- package/libusb/msvc/listdevs_2017.vcxproj.filters +0 -23
- package/libusb/msvc/listdevs_2019.vcxproj +0 -105
- package/libusb/msvc/listdevs_2019.vcxproj.filters +0 -23
- package/libusb/msvc/sam3u_benchmark_2013.vcxproj +0 -87
- package/libusb/msvc/sam3u_benchmark_2013.vcxproj.filters +0 -26
- package/libusb/msvc/sam3u_benchmark_2015.vcxproj +0 -87
- package/libusb/msvc/sam3u_benchmark_2015.vcxproj.filters +0 -26
- package/libusb/msvc/sam3u_benchmark_2017.vcxproj +0 -106
- package/libusb/msvc/sam3u_benchmark_2017.vcxproj.filters +0 -26
- package/libusb/msvc/sam3u_benchmark_2019.vcxproj +0 -106
- package/libusb/msvc/sam3u_benchmark_2019.vcxproj.filters +0 -26
- package/libusb/msvc/stress_2013.vcxproj +0 -89
- package/libusb/msvc/stress_2013.vcxproj.filters +0 -32
- package/libusb/msvc/stress_2015.vcxproj +0 -89
- package/libusb/msvc/stress_2015.vcxproj.filters +0 -32
- package/libusb/msvc/stress_2017.vcxproj +0 -108
- package/libusb/msvc/stress_2017.vcxproj.filters +0 -32
- package/libusb/msvc/stress_2019.vcxproj +0 -108
- package/libusb/msvc/stress_2019.vcxproj.filters +0 -32
- package/libusb/msvc/testlibusb_2013.vcxproj +0 -86
- package/libusb/msvc/testlibusb_2013.vcxproj.filters +0 -23
- package/libusb/msvc/testlibusb_2015.vcxproj +0 -86
- package/libusb/msvc/testlibusb_2015.vcxproj.filters +0 -23
- package/libusb/msvc/testlibusb_2017.vcxproj +0 -105
- package/libusb/msvc/testlibusb_2017.vcxproj.filters +0 -23
- package/libusb/msvc/testlibusb_2019.vcxproj +0 -105
- package/libusb/msvc/testlibusb_2019.vcxproj.filters +0 -23
- package/libusb/msvc/xusb_2013.vcxproj +0 -86
- package/libusb/msvc/xusb_2013.vcxproj.filters +0 -23
- package/libusb/msvc/xusb_2015.vcxproj +0 -86
- package/libusb/msvc/xusb_2015.vcxproj.filters +0 -23
- package/libusb/msvc/xusb_2017.vcxproj +0 -105
- package/libusb/msvc/xusb_2017.vcxproj.filters +0 -23
- package/libusb/msvc/xusb_2019.vcxproj +0 -105
- package/libusb/msvc/xusb_2019.vcxproj.filters +0 -23
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* darwin backend for libusb 1.0
|
|
3
|
-
* Copyright © 2008-
|
|
4
|
-
* Copyright © 2019
|
|
3
|
+
* Copyright © 2008-2023 Nathan Hjelm <hjelmn@users.sourceforge.net>
|
|
4
|
+
* Copyright © 2019-2023 Google LLC. All rights reserved.
|
|
5
5
|
*
|
|
6
6
|
* This library is free software; you can redistribute it and/or
|
|
7
7
|
* modify it under the terms of the GNU Lesser General Public
|
|
@@ -36,117 +36,48 @@
|
|
|
36
36
|
|
|
37
37
|
/* IOUSBInterfaceInferface */
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
#
|
|
41
|
-
|
|
42
|
-
#define
|
|
43
|
-
#
|
|
44
|
-
#define
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
#elif defined
|
|
48
|
-
|
|
49
|
-
#define usb_interface_t IOUSBInterfaceInterface700
|
|
50
|
-
#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID700
|
|
51
|
-
#define InterfaceVersion 700
|
|
52
|
-
|
|
53
|
-
/* New in OS 10.9.0. */
|
|
54
|
-
#elif defined (kIOUSBInterfaceInterfaceID650)
|
|
55
|
-
|
|
56
|
-
#define usb_interface_t IOUSBInterfaceInterface650
|
|
57
|
-
#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID650
|
|
58
|
-
#define InterfaceVersion 650
|
|
59
|
-
|
|
60
|
-
/* New in OS 10.8.2 but can't test deployment target to that granularity, so round up. */
|
|
61
|
-
#elif defined (kIOUSBInterfaceInterfaceID550)
|
|
62
|
-
|
|
63
|
-
#define usb_interface_t IOUSBInterfaceInterface550
|
|
64
|
-
#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID550
|
|
65
|
-
#define InterfaceVersion 550
|
|
66
|
-
|
|
67
|
-
/* New in OS 10.7.3 but can't test deployment target to that granularity, so round up. */
|
|
68
|
-
#elif defined (kIOUSBInterfaceInterfaceID500)
|
|
69
|
-
|
|
70
|
-
#define usb_interface_t IOUSBInterfaceInterface500
|
|
71
|
-
#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID500
|
|
72
|
-
#define InterfaceVersion 500
|
|
73
|
-
|
|
74
|
-
/* New in OS 10.5.0. */
|
|
75
|
-
#elif defined (kIOUSBInterfaceInterfaceID300)
|
|
76
|
-
|
|
77
|
-
#define usb_interface_t IOUSBInterfaceInterface300
|
|
78
|
-
#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID300
|
|
79
|
-
#define InterfaceVersion 300
|
|
80
|
-
|
|
81
|
-
/* New in OS 10.4.5 (or 10.4.6?) but can't test deployment target to that granularity, so round up. */
|
|
82
|
-
#elif defined (kIOUSBInterfaceInterfaceID245)
|
|
83
|
-
|
|
84
|
-
#define usb_interface_t IOUSBInterfaceInterface245
|
|
85
|
-
#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID245
|
|
86
|
-
#define InterfaceVersion 245
|
|
87
|
-
|
|
88
|
-
/* New in OS 10.4.0. */
|
|
89
|
-
#elif defined (kIOUSBInterfaceInterfaceID220)
|
|
90
|
-
|
|
91
|
-
#define usb_interface_t IOUSBInterfaceInterface220
|
|
92
|
-
#define InterfaceInterfaceID kIOUSBInterfaceInterfaceID220
|
|
93
|
-
#define InterfaceVersion 220
|
|
94
|
-
|
|
39
|
+
#if defined(kIOUSBInterfaceInterfaceID800)
|
|
40
|
+
#define MAX_INTERFACE_VERSION 800
|
|
41
|
+
#elif defined(kIOUSBInterfaceInterfaceID700)
|
|
42
|
+
#define MAX_INTERFACE_VERSION 700
|
|
43
|
+
#elif defined(kIOUSBInterfaceInterfaceID650)
|
|
44
|
+
#define MAX_INTERFACE_VERSION 650
|
|
45
|
+
#elif defined(kIOUSBInterfaceInterfaceID550)
|
|
46
|
+
#define MAX_INTERFACE_VERSION 550
|
|
47
|
+
#elif defined(kIOUSBInterfaceInterfaceID245)
|
|
48
|
+
#define MAX_INTERFACE_VERSION 245
|
|
95
49
|
#else
|
|
96
|
-
|
|
97
|
-
#error "IOUSBFamily is too old. Please upgrade your SDK and/or deployment target"
|
|
98
|
-
|
|
50
|
+
#define MAX_INTERFACE_VERSION 220
|
|
99
51
|
#endif
|
|
100
52
|
|
|
101
|
-
/*
|
|
102
|
-
|
|
103
|
-
/* New in OS 10.9.0. */
|
|
104
|
-
#if defined (kIOUSBDeviceInterfaceID650)
|
|
105
|
-
|
|
106
|
-
#define usb_device_t IOUSBDeviceInterface650
|
|
107
|
-
#define DeviceInterfaceID kIOUSBDeviceInterfaceID650
|
|
108
|
-
#define DeviceVersion 650
|
|
109
|
-
|
|
110
|
-
/* New in OS 10.7.3 but can't test deployment target to that granularity, so round up. */
|
|
111
|
-
#elif defined (kIOUSBDeviceInterfaceID500)
|
|
112
|
-
|
|
113
|
-
#define usb_device_t IOUSBDeviceInterface500
|
|
114
|
-
#define DeviceInterfaceID kIOUSBDeviceInterfaceID500
|
|
115
|
-
#define DeviceVersion 500
|
|
116
|
-
|
|
117
|
-
/* New in OS 10.5.4 but can't test deployment target to that granularity, so round up. */
|
|
118
|
-
#elif defined (kIOUSBDeviceInterfaceID320)
|
|
119
|
-
|
|
120
|
-
#define usb_device_t IOUSBDeviceInterface320
|
|
121
|
-
#define DeviceInterfaceID kIOUSBDeviceInterfaceID320
|
|
122
|
-
#define DeviceVersion 320
|
|
123
|
-
|
|
124
|
-
/* New in OS 10.5.0. */
|
|
125
|
-
#elif defined (kIOUSBDeviceInterfaceID300)
|
|
126
|
-
|
|
127
|
-
#define usb_device_t IOUSBDeviceInterface300
|
|
128
|
-
#define DeviceInterfaceID kIOUSBDeviceInterfaceID300
|
|
129
|
-
#define DeviceVersion 300
|
|
53
|
+
/* set to the minimum version and casted up as needed. */
|
|
54
|
+
typedef IOUSBInterfaceInterface220 **usb_interface_t;
|
|
130
55
|
|
|
131
|
-
|
|
132
|
-
#
|
|
56
|
+
#define IOINTERFACE0(darwin_interface, version) ((IOUSBInterfaceInterface ## version **) (darwin_interface)->interface)
|
|
57
|
+
#define IOINTERFACE_V(darwin_interface, version) IOINTERFACE0(darwin_interface, version)
|
|
58
|
+
#define IOINTERFACE(darwin_interface) ((darwin_interface)->interface)
|
|
133
59
|
|
|
134
|
-
|
|
135
|
-
#define DeviceInterfaceID kIOUSBDeviceInterfaceID245
|
|
136
|
-
#define DeviceVersion 245
|
|
137
|
-
|
|
138
|
-
/* New in OS 10.2.3 but can't test deployment target to that granularity, so round up. */
|
|
139
|
-
#elif defined (kIOUSBDeviceInterfaceID197)
|
|
140
|
-
|
|
141
|
-
#define usb_device_t IOUSBDeviceInterface197
|
|
142
|
-
#define DeviceInterfaceID kIOUSBDeviceInterfaceID197
|
|
143
|
-
#define DeviceVersion 197
|
|
60
|
+
/* IOUSBDeviceInterface */
|
|
144
61
|
|
|
62
|
+
#if defined(kIOUSBDeviceInterfaceID650)
|
|
63
|
+
#define MAX_DEVICE_VERSION 650
|
|
64
|
+
#elif defined(kIOUSBDeviceInterfaceID500)
|
|
65
|
+
#define MAX_DEVICE_VERSION 500
|
|
66
|
+
#elif defined(kIOUSBDeviceInterfaceID320)
|
|
67
|
+
#define MAX_DEVICE_VERSION 320
|
|
68
|
+
#elif defined(kIOUSBDeviceInterfaceID300)
|
|
69
|
+
#define MAX_DEVICE_VERSION 300
|
|
70
|
+
#elif defined(kIOUSBDeviceInterfaceID245)
|
|
71
|
+
#define MAX_DEVICE_VERSION 245
|
|
145
72
|
#else
|
|
73
|
+
#define MAX_DEVICE_VERSION 197
|
|
74
|
+
#endif
|
|
146
75
|
|
|
147
|
-
|
|
76
|
+
/* set to the minimum version and casted up as needed */
|
|
77
|
+
typedef IOUSBDeviceInterface197 **usb_device_t;
|
|
148
78
|
|
|
149
|
-
#
|
|
79
|
+
#define IODEVICE0(darwin_device, version) ((IOUSBDeviceInterface ## version **)(darwin_device))
|
|
80
|
+
#define IODEVICE_V(darwin_device, version) IODEVICE0(darwin_device, version)
|
|
150
81
|
|
|
151
82
|
#if !defined(kIOUSBHostInterfaceClassName)
|
|
152
83
|
#define kIOUSBHostInterfaceClassName "IOUSBHostInterface"
|
|
@@ -160,15 +91,13 @@
|
|
|
160
91
|
#define IO_OBJECT_NULL ((io_object_t) 0)
|
|
161
92
|
#endif
|
|
162
93
|
|
|
163
|
-
/*
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
#define HAS_CAPTURE_DEVICE() 0
|
|
171
|
-
#endif
|
|
94
|
+
/* returns the current macOS version in a format similar to the
|
|
95
|
+
* MAC_OS_X_VERSION_MIN_REQUIRED macro.
|
|
96
|
+
* Examples:
|
|
97
|
+
* 10.1.5 -> 100105
|
|
98
|
+
* 13.3.0 -> 130300
|
|
99
|
+
*/
|
|
100
|
+
uint32_t get_running_version(void);
|
|
172
101
|
|
|
173
102
|
typedef IOCFPlugInInterface *io_cf_plugin_ref_t;
|
|
174
103
|
typedef IONotificationPortRef io_notification_port_t;
|
|
@@ -182,7 +111,7 @@ struct darwin_cached_device {
|
|
|
182
111
|
UInt64 session;
|
|
183
112
|
USBDeviceAddress address;
|
|
184
113
|
char sys_path[21];
|
|
185
|
-
usb_device_t
|
|
114
|
+
usb_device_t device;
|
|
186
115
|
io_service_t service;
|
|
187
116
|
int open_count;
|
|
188
117
|
UInt8 first_config, active_config, port;
|
|
@@ -201,7 +130,7 @@ struct darwin_device_handle_priv {
|
|
|
201
130
|
CFRunLoopSourceRef cfSource;
|
|
202
131
|
|
|
203
132
|
struct darwin_interface {
|
|
204
|
-
usb_interface_t
|
|
133
|
+
usb_interface_t interface;
|
|
205
134
|
uint8_t num_endpoints;
|
|
206
135
|
CFRunLoopSourceRef cfSource;
|
|
207
136
|
uint64_t frames[256];
|