usb 2.1.2 → 2.3.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 +24 -0
- package/README.md +20 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/usb/bindings.d.ts +4 -0
- package/dist/usb/device.js +5 -0
- package/dist/usb/device.js.map +1 -1
- package/dist/usb/index.js +7 -16
- package/dist/usb/index.js.map +1 -1
- package/dist/webusb/webusb-device.d.ts +2 -1
- package/dist/webusb/webusb-device.js +21 -14
- package/dist/webusb/webusb-device.js.map +1 -1
- package/libusb/.gitattributes +2 -6
- package/libusb/.private/appveyor_build.sh +22 -0
- package/libusb/.private/bm.sh +1 -1
- package/libusb/.private/ci-build.sh +67 -0
- package/libusb/.private/ci-container-build.sh +70 -0
- package/libusb/.private/post-rewrite.sh +5 -1
- package/libusb/.private/pre-commit.sh +5 -1
- package/libusb/.private/wbs.txt +4 -19
- package/libusb/.travis.yml +32 -23
- package/libusb/AUTHORS +86 -3
- package/libusb/ChangeLog +54 -3
- package/libusb/INSTALL_WIN.txt +22 -44
- package/libusb/Makefile.am +32 -10
- package/libusb/{README.md → README} +2 -2
- package/libusb/README.git +3 -3
- package/libusb/Xcode/common.xcconfig +23 -19
- package/libusb/Xcode/config.h +25 -13
- package/libusb/Xcode/libusb.xcodeproj/project.pbxproj +511 -109
- package/libusb/android/README +90 -54
- package/libusb/android/config.h +23 -43
- package/libusb/android/examples/unrooted_android.c +300 -0
- package/libusb/android/examples/unrooted_android.h +36 -0
- package/libusb/android/jni/Android.mk +1 -1
- package/libusb/android/jni/Application.mk +16 -0
- package/libusb/android/jni/examples.mk +63 -29
- package/libusb/android/jni/libusb.mk +14 -8
- package/libusb/android/jni/tests.mk +13 -24
- package/libusb/appveyor.yml +73 -30
- package/libusb/autogen.sh +5 -3
- package/libusb/bootstrap.sh +6 -2
- package/libusb/configure.ac +314 -227
- package/libusb/doc/Makefile.in +22 -0
- package/libusb/doc/doxygen.cfg.in +460 -223
- package/libusb/examples/Makefile.am +6 -13
- package/libusb/examples/dpfp.c +276 -73
- package/libusb/examples/ezusb.c +18 -8
- package/libusb/examples/ezusb.h +6 -17
- package/libusb/examples/fxload.c +4 -5
- package/libusb/examples/hotplugtest.c +1 -1
- package/libusb/examples/sam3u_benchmark.c +59 -24
- package/libusb/examples/testlibusb.c +138 -104
- package/libusb/examples/xusb.c +26 -22
- package/libusb/libusb/Makefile.am +57 -70
- package/libusb/libusb/Makefile.am.extra +26 -0
- package/libusb/libusb/core.c +432 -423
- package/libusb/libusb/descriptor.c +365 -419
- package/libusb/libusb/hotplug.c +200 -104
- package/libusb/libusb/io.c +522 -535
- package/libusb/libusb/libusb-1.0.def +7 -3
- package/libusb/libusb/libusb-1.0.rc +1 -9
- package/libusb/libusb/libusb.h +302 -226
- package/libusb/libusb/libusbi.h +607 -316
- package/libusb/libusb/os/darwin_usb.c +703 -329
- package/libusb/libusb/os/darwin_usb.h +39 -15
- package/libusb/libusb/os/events_posix.c +300 -0
- package/libusb/libusb/os/events_posix.h +59 -0
- package/libusb/libusb/os/events_windows.c +214 -0
- package/libusb/{msvc/missing.h → libusb/os/events_windows.h} +25 -11
- package/libusb/libusb/os/haiku_pollfs.cpp +14 -9
- package/libusb/libusb/os/haiku_usb.h +12 -12
- package/libusb/libusb/os/haiku_usb_backend.cpp +36 -37
- package/libusb/libusb/os/haiku_usb_raw.cpp +80 -116
- package/libusb/libusb/os/linux_netlink.c +55 -63
- package/libusb/libusb/os/linux_udev.c +61 -69
- package/libusb/libusb/os/linux_usbfs.c +926 -1015
- package/libusb/libusb/os/linux_usbfs.h +74 -57
- package/libusb/libusb/os/netbsd_usb.c +103 -168
- package/libusb/libusb/os/null_usb.c +111 -0
- package/libusb/libusb/os/openbsd_usb.c +71 -120
- package/libusb/libusb/os/sunos_usb.c +289 -375
- package/libusb/libusb/os/sunos_usb.h +0 -1
- package/libusb/libusb/os/threads_posix.c +81 -32
- package/libusb/libusb/os/threads_posix.h +19 -23
- package/libusb/libusb/os/threads_windows.c +9 -95
- package/libusb/libusb/os/threads_windows.h +33 -31
- package/libusb/libusb/os/windows_common.c +915 -0
- package/libusb/libusb/os/windows_common.h +330 -42
- package/libusb/libusb/os/windows_usbdk.c +161 -267
- package/libusb/libusb/os/windows_usbdk.h +5 -2
- package/libusb/libusb/os/windows_winusb.c +1355 -1192
- package/libusb/libusb/os/windows_winusb.h +167 -167
- package/libusb/libusb/strerror.c +20 -30
- package/libusb/libusb/sync.c +20 -21
- package/libusb/libusb/version.h +1 -1
- package/libusb/libusb/version_nano.h +1 -1
- package/libusb/msvc/.gitattributes +3 -0
- package/libusb/msvc/config.h +27 -20
- package/libusb/msvc/{hotplugtest_2012.vcxproj → dpfp_2013.vcxproj} +14 -10
- package/libusb/msvc/dpfp_2013.vcxproj.filters +26 -0
- package/libusb/msvc/{listdevs_2010.vcxproj → dpfp_2015.vcxproj} +14 -9
- package/libusb/msvc/dpfp_2015.vcxproj.filters +26 -0
- package/libusb/msvc/dpfp_2017.vcxproj +106 -0
- package/libusb/msvc/dpfp_2017.vcxproj.filters +26 -0
- package/libusb/msvc/dpfp_2019.vcxproj +106 -0
- package/libusb/msvc/dpfp_2019.vcxproj.filters +26 -0
- package/libusb/msvc/dpfp_threaded_2013.vcxproj +87 -0
- package/libusb/msvc/dpfp_threaded_2013.vcxproj.filters +26 -0
- package/libusb/msvc/dpfp_threaded_2015.vcxproj +87 -0
- package/libusb/msvc/dpfp_threaded_2015.vcxproj.filters +26 -0
- package/libusb/msvc/dpfp_threaded_2017.vcxproj +106 -0
- package/libusb/msvc/dpfp_threaded_2017.vcxproj.filters +26 -0
- package/libusb/msvc/{fxload_2012.vcxproj → dpfp_threaded_2019.vcxproj} +32 -17
- package/libusb/msvc/dpfp_threaded_2019.vcxproj.filters +26 -0
- package/libusb/msvc/fxload_2013.vcxproj +6 -3
- package/libusb/msvc/fxload_2013.vcxproj.filters +35 -0
- package/libusb/msvc/fxload_2015.vcxproj +6 -3
- package/libusb/msvc/fxload_2015.vcxproj.filters +35 -0
- package/libusb/msvc/fxload_2017.vcxproj +6 -7
- package/libusb/msvc/fxload_2017.vcxproj.filters +35 -0
- package/libusb/msvc/{fxload_2010.vcxproj → fxload_2019.vcxproj} +29 -6
- package/libusb/msvc/fxload_2019.vcxproj.filters +35 -0
- package/libusb/{examples → msvc}/getopt/getopt.c +0 -0
- package/libusb/{examples → msvc}/getopt/getopt.h +0 -0
- package/libusb/{examples → msvc}/getopt/getopt1.c +0 -0
- package/libusb/msvc/getopt_2013.vcxproj +4 -5
- package/libusb/msvc/getopt_2013.vcxproj.filters +26 -0
- package/libusb/msvc/getopt_2015.vcxproj +4 -4
- package/libusb/msvc/getopt_2015.vcxproj.filters +26 -0
- package/libusb/msvc/getopt_2017.vcxproj +4 -10
- package/libusb/msvc/getopt_2017.vcxproj.filters +26 -0
- package/libusb/msvc/{getopt_2012.vcxproj → getopt_2019.vcxproj} +25 -6
- package/libusb/msvc/getopt_2019.vcxproj.filters +26 -0
- package/libusb/msvc/hotplugtest_2013.vcxproj +6 -3
- package/libusb/msvc/hotplugtest_2013.vcxproj.filters +23 -0
- package/libusb/msvc/hotplugtest_2015.vcxproj +6 -3
- package/libusb/msvc/hotplugtest_2015.vcxproj.filters +23 -0
- package/libusb/msvc/hotplugtest_2017.vcxproj +6 -7
- package/libusb/msvc/hotplugtest_2017.vcxproj.filters +23 -0
- package/libusb/msvc/hotplugtest_2019.vcxproj +105 -0
- package/libusb/msvc/hotplugtest_2019.vcxproj.filters +23 -0
- package/libusb/msvc/libusb_2013.sln +50 -20
- package/libusb/msvc/libusb_2015.sln +51 -21
- package/libusb/msvc/libusb_2017.sln +90 -36
- package/libusb/msvc/libusb_2019.sln +240 -0
- package/libusb/msvc/libusb_dll_2013.vcxproj +6 -9
- package/libusb/msvc/libusb_dll_2013.vcxproj.filters +94 -0
- package/libusb/msvc/libusb_dll_2015.vcxproj +6 -8
- package/libusb/msvc/libusb_dll_2015.vcxproj.filters +94 -0
- package/libusb/msvc/libusb_dll_2017.vcxproj +6 -16
- package/libusb/msvc/libusb_dll_2017.vcxproj.filters +94 -0
- package/libusb/msvc/{libusb_dll_2010.vcxproj → libusb_dll_2019.vcxproj} +27 -9
- package/libusb/msvc/libusb_dll_2019.vcxproj.filters +94 -0
- package/libusb/msvc/libusb_static_2013.vcxproj +5 -9
- package/libusb/msvc/libusb_static_2013.vcxproj.filters +80 -0
- package/libusb/msvc/libusb_static_2015.vcxproj +5 -8
- package/libusb/msvc/libusb_static_2015.vcxproj.filters +80 -0
- package/libusb/msvc/libusb_static_2017.vcxproj +5 -8
- package/libusb/msvc/libusb_static_2017.vcxproj.filters +80 -0
- package/libusb/msvc/{libusb_static_2010.vcxproj → libusb_static_2019.vcxproj} +26 -9
- package/libusb/msvc/libusb_static_2019.vcxproj.filters +80 -0
- package/libusb/msvc/listdevs_2013.vcxproj +6 -3
- package/libusb/msvc/listdevs_2013.vcxproj.filters +23 -0
- package/libusb/msvc/listdevs_2015.vcxproj +6 -3
- package/libusb/msvc/listdevs_2015.vcxproj.filters +23 -0
- package/libusb/msvc/listdevs_2017.vcxproj +6 -7
- package/libusb/msvc/listdevs_2017.vcxproj.filters +23 -0
- package/libusb/msvc/listdevs_2019.vcxproj +105 -0
- package/libusb/msvc/listdevs_2019.vcxproj.filters +23 -0
- package/libusb/msvc/{listdevs_2012.vcxproj → sam3u_benchmark_2013.vcxproj} +13 -9
- package/libusb/msvc/sam3u_benchmark_2013.vcxproj.filters +26 -0
- package/libusb/msvc/{hotplugtest_2010.vcxproj → sam3u_benchmark_2015.vcxproj} +13 -8
- package/libusb/msvc/sam3u_benchmark_2015.vcxproj.filters +26 -0
- package/libusb/msvc/sam3u_benchmark_2017.vcxproj +106 -0
- package/libusb/msvc/sam3u_benchmark_2017.vcxproj.filters +26 -0
- package/libusb/msvc/sam3u_benchmark_2019.vcxproj +106 -0
- package/libusb/msvc/sam3u_benchmark_2019.vcxproj.filters +26 -0
- package/libusb/msvc/stress_2013.vcxproj +4 -2
- package/libusb/msvc/stress_2013.vcxproj.filters +32 -0
- package/libusb/msvc/stress_2015.vcxproj +4 -2
- package/libusb/msvc/stress_2015.vcxproj.filters +32 -0
- package/libusb/msvc/stress_2017.vcxproj +4 -6
- package/libusb/msvc/stress_2017.vcxproj.filters +32 -0
- package/libusb/msvc/{stress_2010.vcxproj → stress_2019.vcxproj} +26 -4
- package/libusb/msvc/stress_2019.vcxproj.filters +32 -0
- package/libusb/msvc/testlibusb_2013.vcxproj +6 -3
- package/libusb/msvc/testlibusb_2013.vcxproj.filters +23 -0
- package/libusb/msvc/testlibusb_2015.vcxproj +6 -3
- package/libusb/msvc/testlibusb_2015.vcxproj.filters +23 -0
- package/libusb/msvc/testlibusb_2017.vcxproj +6 -7
- package/libusb/msvc/testlibusb_2017.vcxproj.filters +23 -0
- package/libusb/msvc/{testlibusb_2010.vcxproj → testlibusb_2019.vcxproj} +28 -5
- package/libusb/msvc/testlibusb_2019.vcxproj.filters +23 -0
- package/libusb/msvc/xusb_2013.vcxproj +6 -3
- package/libusb/msvc/xusb_2013.vcxproj.filters +23 -0
- package/libusb/msvc/xusb_2015.vcxproj +6 -3
- package/libusb/msvc/xusb_2015.vcxproj.filters +23 -0
- package/libusb/msvc/xusb_2017.vcxproj +6 -7
- package/libusb/msvc/xusb_2017.vcxproj.filters +23 -0
- package/libusb/msvc/{xusb_2010.vcxproj → xusb_2019.vcxproj} +28 -5
- package/libusb/msvc/xusb_2019.vcxproj.filters +23 -0
- package/libusb/tests/Makefile.am +13 -1
- package/libusb/tests/libusb_testlib.h +12 -43
- package/libusb/tests/stress.c +59 -50
- package/libusb/tests/testlib.c +78 -171
- package/libusb/tests/umockdev.c +1175 -0
- package/libusb.gypi +10 -11
- package/package.json +2 -2
- 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-ia32/node.napi.node +0 -0
- package/prebuilds/win32-x64/node.napi.node +0 -0
- package/src/device.cc +12 -7
- package/src/node_usb.cc +10 -0
- package/test/usb.coffee +6 -0
- package/tsc/index.ts +2 -0
- package/tsc/usb/bindings.ts +5 -0
- package/tsc/usb/device.ts +6 -0
- package/tsc/usb/index.ts +5 -8
- package/tsc/webusb/webusb-device.ts +12 -8
- package/libusb/.private/bd.cmd +0 -89
- package/libusb/.private/bwince.cmd +0 -57
- package/libusb/.private/wbs_wince.txt +0 -42
- package/libusb/Brewfile +0 -4
- package/libusb/appveyor_cygwin.bat +0 -11
- package/libusb/appveyor_minGW.bat +0 -19
- package/libusb/doc/Makefile.am +0 -9
- package/libusb/examples/dpfp_threaded.c +0 -557
- package/libusb/libusb/hotplug.h +0 -99
- package/libusb/libusb/os/poll_posix.c +0 -84
- package/libusb/libusb/os/poll_posix.h +0 -14
- package/libusb/libusb/os/poll_windows.c +0 -447
- package/libusb/libusb/os/poll_windows.h +0 -98
- package/libusb/libusb/os/wince_usb.c +0 -888
- package/libusb/libusb/os/wince_usb.h +0 -126
- package/libusb/libusb/os/windows_nt_common.c +0 -1010
- package/libusb/libusb/os/windows_nt_common.h +0 -110
- package/libusb/libusb/os/windows_nt_shared_types.h +0 -147
- package/libusb/msvc/appveyor.bat +0 -27
- package/libusb/msvc/ddk_build.cmd +0 -219
- package/libusb/msvc/errno.h +0 -102
- package/libusb/msvc/fxload_sources +0 -23
- package/libusb/msvc/getopt_2005.vcproj +0 -288
- package/libusb/msvc/getopt_2010.vcxproj +0 -72
- package/libusb/msvc/getopt_sources +0 -24
- package/libusb/msvc/hotplugtest_sources +0 -20
- package/libusb/msvc/inttypes.h +0 -295
- package/libusb/msvc/libusb.dsw +0 -71
- package/libusb/msvc/libusb_2005.sln +0 -95
- package/libusb/msvc/libusb_2010.sln +0 -105
- package/libusb/msvc/libusb_2012.sln +0 -105
- package/libusb/msvc/libusb_dll.dsp +0 -194
- package/libusb/msvc/libusb_dll_2005.vcproj +0 -464
- package/libusb/msvc/libusb_dll_2012.vcxproj +0 -107
- package/libusb/msvc/libusb_dll_wince.vcproj +0 -1251
- package/libusb/msvc/libusb_sources +0 -43
- package/libusb/msvc/libusb_static.dsp +0 -174
- package/libusb/msvc/libusb_static_2005.vcproj +0 -390
- package/libusb/msvc/libusb_static_2012.vcxproj +0 -98
- package/libusb/msvc/libusb_static_wince.vcproj +0 -1179
- package/libusb/msvc/libusb_wince.sln +0 -246
- package/libusb/msvc/listdevs.dsp +0 -103
- package/libusb/msvc/listdevs_2005.vcproj +0 -360
- package/libusb/msvc/listdevs_sources +0 -20
- package/libusb/msvc/listdevs_wince.vcproj +0 -1120
- package/libusb/msvc/missing.c +0 -80
- package/libusb/msvc/stdint.h +0 -256
- package/libusb/msvc/stress_2005.vcproj +0 -390
- package/libusb/msvc/stress_2012.vcxproj +0 -87
- package/libusb/msvc/stress_sources +0 -21
- package/libusb/msvc/stress_wince.vcproj +0 -1128
- package/libusb/msvc/testlibusb_2012.vcxproj +0 -83
- package/libusb/msvc/testlibusb_sources +0 -20
- package/libusb/msvc/xusb.dsp +0 -102
- package/libusb/msvc/xusb_2005.vcproj +0 -344
- package/libusb/msvc/xusb_2012.vcxproj +0 -83
- package/libusb/msvc/xusb_sources +0 -20
- package/libusb/msvc/xusb_wince.vcproj +0 -1120
- package/libusb/travis-autogen.sh +0 -39
|
@@ -1,110 +0,0 @@
|
|
|
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
|
|
@@ -1,147 +0,0 @@
|
|
|
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
|
-
};
|
package/libusb/msvc/appveyor.bat
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
echo on
|
|
2
|
-
SetLocal EnableDelayedExpansion
|
|
3
|
-
|
|
4
|
-
if [%Configuration%] NEQ [Debug] goto releasex64
|
|
5
|
-
if [%Configuration%] NEQ [Release] goto debugx64
|
|
6
|
-
|
|
7
|
-
:debugx64
|
|
8
|
-
if [%Platform%] NEQ [x64] goto debugWin32
|
|
9
|
-
if [%Configuration%] NEQ [Debug] exit 0
|
|
10
|
-
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /Debug /x64 || exit /B
|
|
11
|
-
msbuild %libusb_2010% /p:Configuration=Debug,Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || exit /B
|
|
12
|
-
|
|
13
|
-
:releasex64
|
|
14
|
-
if [%Platform%] NEQ [x64] goto releaseWin32
|
|
15
|
-
if [%Configuration%] NEQ [Release] exit 0
|
|
16
|
-
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /Release /x64 || exit /B
|
|
17
|
-
msbuild %libusb_2010% /p:Configuration=Release,Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || exit /B
|
|
18
|
-
|
|
19
|
-
:debugWin32
|
|
20
|
-
if [%Platform%] NEQ [Win32] exit 0
|
|
21
|
-
if [%Configuration%] NEQ [Debug] exit 0
|
|
22
|
-
msbuild %libusb_2010% /p:Configuration=Debug,Platform=Win32 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || exit /B
|
|
23
|
-
|
|
24
|
-
:releaseWin32
|
|
25
|
-
if [%Platform%] NEQ [Win32] exit 0
|
|
26
|
-
if [%Configuration%] NEQ [Release] exit 0
|
|
27
|
-
msbuild %libusb_2010% /p:Configuration=Release,Platform=Win32 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || exit /B
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
::# default builds static library.
|
|
3
|
-
::# you can pass the following arguments (case insensitive):
|
|
4
|
-
::# - "DLL" to build a DLL instead of a static library
|
|
5
|
-
::# - "/MT" to build a static library compatible with MSVC's /MT option (LIBCMT vs MSVCRT)
|
|
6
|
-
|
|
7
|
-
if Test%BUILD_ALT_DIR%==Test goto usage
|
|
8
|
-
|
|
9
|
-
::# process commandline parameters
|
|
10
|
-
set TARGET=LIBRARY
|
|
11
|
-
set STATIC_LIBC=
|
|
12
|
-
set version=1.0
|
|
13
|
-
set PWD=%~dp0
|
|
14
|
-
set BUILD_CMD=build /bcwgZ /M2
|
|
15
|
-
|
|
16
|
-
if "%1" == "" goto no_more_args
|
|
17
|
-
::# /I for case insensitive
|
|
18
|
-
if /I Test%1==TestDLL set TARGET=DYNLINK
|
|
19
|
-
if /I Test%1==Test/MT set STATIC_LIBC=1
|
|
20
|
-
|
|
21
|
-
:no_more_args
|
|
22
|
-
|
|
23
|
-
cd ..\libusb\os
|
|
24
|
-
echo TARGETTYPE=%TARGET% > target
|
|
25
|
-
copy target+..\..\msvc\libusb_sources sources >NUL 2>&1
|
|
26
|
-
del target
|
|
27
|
-
@echo on
|
|
28
|
-
%BUILD_CMD%
|
|
29
|
-
@echo off
|
|
30
|
-
if errorlevel 1 goto builderror
|
|
31
|
-
cd ..\..
|
|
32
|
-
|
|
33
|
-
set cpudir=i386
|
|
34
|
-
set destType=Win32
|
|
35
|
-
if %_BUILDARCH%==x86 goto isI386
|
|
36
|
-
set cpudir=amd64
|
|
37
|
-
set destType=x64
|
|
38
|
-
:isI386
|
|
39
|
-
|
|
40
|
-
set srcPath=libusb\os\obj%BUILD_ALT_DIR%\%cpudir%
|
|
41
|
-
|
|
42
|
-
set dstPath=%destType%\Debug
|
|
43
|
-
if %DDKBUILDENV%==chk goto isDebug
|
|
44
|
-
set dstPath=%destType%\Release
|
|
45
|
-
:isDebug
|
|
46
|
-
|
|
47
|
-
if exist %destType% goto md2
|
|
48
|
-
md %destType%
|
|
49
|
-
:md2
|
|
50
|
-
if exist %dstPath% goto md3
|
|
51
|
-
md %dstPath%
|
|
52
|
-
:md3
|
|
53
|
-
if exist %dstPath%\dll goto md4
|
|
54
|
-
md %dstPath%\dll
|
|
55
|
-
:md4
|
|
56
|
-
if exist %dstPath%\lib goto md5
|
|
57
|
-
md %dstPath%\lib
|
|
58
|
-
:md5
|
|
59
|
-
if exist %dstPath%\examples goto md6
|
|
60
|
-
md %dstPath%\examples
|
|
61
|
-
:md6
|
|
62
|
-
if exist %dstPath%\tests goto md7
|
|
63
|
-
md %dstPath%\tests
|
|
64
|
-
:md7
|
|
65
|
-
@echo on
|
|
66
|
-
|
|
67
|
-
if %TARGET%==LIBRARY goto copylib
|
|
68
|
-
copy %srcPath%\libusb-%version%.dll %dstPath%\dll
|
|
69
|
-
copy %srcPath%\libusb-%version%.pdb %dstPath%\dll
|
|
70
|
-
:copylib
|
|
71
|
-
copy %srcPath%\libusb-%version%.lib %dstPath%\lib
|
|
72
|
-
|
|
73
|
-
@echo off
|
|
74
|
-
|
|
75
|
-
if exist examples\getopt\getopt_ddkbuild goto md8
|
|
76
|
-
md examples\getopt\getopt_ddkbuild
|
|
77
|
-
:md8
|
|
78
|
-
|
|
79
|
-
cd examples\getopt\getopt_ddkbuild
|
|
80
|
-
copy ..\..\..\msvc\getopt_sources sources >NUL 2>&1
|
|
81
|
-
@echo on
|
|
82
|
-
%BUILD_CMD%
|
|
83
|
-
@echo off
|
|
84
|
-
if errorlevel 1 goto builderror
|
|
85
|
-
cd ..\..\..
|
|
86
|
-
|
|
87
|
-
if exist examples\fxload_ddkbuild goto md9
|
|
88
|
-
md examples\fxload_ddkbuild
|
|
89
|
-
:md9
|
|
90
|
-
|
|
91
|
-
cd examples\fxload_ddkbuild
|
|
92
|
-
copy ..\..\msvc\fxload_sources sources >NUL 2>&1
|
|
93
|
-
@echo on
|
|
94
|
-
%BUILD_CMD%
|
|
95
|
-
@echo off
|
|
96
|
-
if errorlevel 1 goto builderror
|
|
97
|
-
cd ..\..
|
|
98
|
-
|
|
99
|
-
set srcPath=examples\fxload_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
|
|
100
|
-
@echo on
|
|
101
|
-
|
|
102
|
-
copy %srcPath%\fxload.exe %dstPath%\examples
|
|
103
|
-
copy %srcPath%\fxload.pdb %dstPath%\examples
|
|
104
|
-
|
|
105
|
-
@echo off
|
|
106
|
-
|
|
107
|
-
if exist examples\hotplugtest_ddkbuild goto md10
|
|
108
|
-
md examples\hotplugtest_ddkbuild
|
|
109
|
-
:md10
|
|
110
|
-
|
|
111
|
-
cd examples\hotplugtest_ddkbuild
|
|
112
|
-
copy ..\..\msvc\hotplugtest_sources sources >NUL 2>&1
|
|
113
|
-
@echo on
|
|
114
|
-
%BUILD_CMD%
|
|
115
|
-
@echo off
|
|
116
|
-
if errorlevel 1 goto builderror
|
|
117
|
-
cd ..\..
|
|
118
|
-
|
|
119
|
-
set srcPath=examples\hotplugtest_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
|
|
120
|
-
@echo on
|
|
121
|
-
|
|
122
|
-
copy %srcPath%\hotplugtest.exe %dstPath%\examples
|
|
123
|
-
copy %srcPath%\hotplugtest.pdb %dstPath%\examples
|
|
124
|
-
|
|
125
|
-
@echo off
|
|
126
|
-
|
|
127
|
-
if exist examples\listdevs_ddkbuild goto md11
|
|
128
|
-
md examples\listdevs_ddkbuild
|
|
129
|
-
:md11
|
|
130
|
-
|
|
131
|
-
cd examples\listdevs_ddkbuild
|
|
132
|
-
copy ..\..\msvc\listdevs_sources sources >NUL 2>&1
|
|
133
|
-
@echo on
|
|
134
|
-
%BUILD_CMD%
|
|
135
|
-
@echo off
|
|
136
|
-
if errorlevel 1 goto builderror
|
|
137
|
-
cd ..\..
|
|
138
|
-
|
|
139
|
-
set srcPath=examples\listdevs_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
|
|
140
|
-
@echo on
|
|
141
|
-
|
|
142
|
-
copy %srcPath%\listdevs.exe %dstPath%\examples
|
|
143
|
-
copy %srcPath%\listdevs.pdb %dstPath%\examples
|
|
144
|
-
|
|
145
|
-
@echo off
|
|
146
|
-
|
|
147
|
-
if exist examples\testlibusb_ddkbuild goto md12
|
|
148
|
-
md examples\testlibusb_ddkbuild
|
|
149
|
-
:md12
|
|
150
|
-
|
|
151
|
-
cd examples\testlibusb_ddkbuild
|
|
152
|
-
copy ..\..\msvc\testlibusb_sources sources >NUL 2>&1
|
|
153
|
-
@echo on
|
|
154
|
-
%BUILD_CMD%
|
|
155
|
-
@echo off
|
|
156
|
-
if errorlevel 1 goto builderror
|
|
157
|
-
cd ..\..
|
|
158
|
-
|
|
159
|
-
set srcPath=examples\testlibusb_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
|
|
160
|
-
@echo on
|
|
161
|
-
|
|
162
|
-
copy %srcPath%\testlibusb.exe %dstPath%\examples
|
|
163
|
-
copy %srcPath%\testlibusb.pdb %dstPath%\examples
|
|
164
|
-
|
|
165
|
-
@echo off
|
|
166
|
-
|
|
167
|
-
if exist examples\xusb_ddkbuild goto md13
|
|
168
|
-
md examples\xusb_ddkbuild
|
|
169
|
-
:md13
|
|
170
|
-
|
|
171
|
-
cd examples\xusb_ddkbuild
|
|
172
|
-
copy ..\..\msvc\xusb_sources sources >NUL 2>&1
|
|
173
|
-
@echo on
|
|
174
|
-
%BUILD_CMD%
|
|
175
|
-
@echo off
|
|
176
|
-
if errorlevel 1 goto builderror
|
|
177
|
-
cd ..\..
|
|
178
|
-
|
|
179
|
-
set srcPath=examples\xusb_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
|
|
180
|
-
@echo on
|
|
181
|
-
|
|
182
|
-
copy %srcPath%\xusb.exe %dstPath%\examples
|
|
183
|
-
copy %srcPath%\xusb.pdb %dstPath%\examples
|
|
184
|
-
|
|
185
|
-
@echo off
|
|
186
|
-
|
|
187
|
-
if exist tests\stress_ddkbuild goto md14
|
|
188
|
-
md tests\stress_ddkbuild
|
|
189
|
-
:md14
|
|
190
|
-
|
|
191
|
-
cd tests\stress_ddkbuild
|
|
192
|
-
copy ..\..\msvc\stress_sources sources >NUL 2>&1
|
|
193
|
-
@echo on
|
|
194
|
-
%BUILD_CMD%
|
|
195
|
-
@echo off
|
|
196
|
-
if errorlevel 1 goto builderror
|
|
197
|
-
cd ..\..
|
|
198
|
-
|
|
199
|
-
set srcPath=tests\stress_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
|
|
200
|
-
@echo on
|
|
201
|
-
|
|
202
|
-
copy %srcPath%\stress.exe %dstPath%\tests
|
|
203
|
-
copy %srcPath%\stress.pdb %dstPath%\tests
|
|
204
|
-
|
|
205
|
-
@echo off
|
|
206
|
-
|
|
207
|
-
cd msvc
|
|
208
|
-
goto done
|
|
209
|
-
|
|
210
|
-
:usage
|
|
211
|
-
echo ddk_build must be run in a WDK build environment
|
|
212
|
-
pause
|
|
213
|
-
goto done
|
|
214
|
-
|
|
215
|
-
:builderror
|
|
216
|
-
echo Build failed
|
|
217
|
-
|
|
218
|
-
:done
|
|
219
|
-
cd %PWD%
|
package/libusb/msvc/errno.h
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* errno.h
|
|
3
|
-
* This file has no copyright assigned and is placed in the Public Domain.
|
|
4
|
-
* This file is a part of the mingw-runtime package.
|
|
5
|
-
* No warranty is given; refer to the file DISCLAIMER within the package.
|
|
6
|
-
*
|
|
7
|
-
* Error numbers and access to error reporting.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#ifndef _ERRNO_H_
|
|
12
|
-
#define _ERRNO_H_
|
|
13
|
-
|
|
14
|
-
#include <crtdefs.h>
|
|
15
|
-
|
|
16
|
-
/*
|
|
17
|
-
* Error numbers.
|
|
18
|
-
* TODO: Can't be sure of some of these assignments, I guessed from the
|
|
19
|
-
* names given by strerror and the defines in the Cygnus errno.h. A lot
|
|
20
|
-
* of the names from the Cygnus errno.h are not represented, and a few
|
|
21
|
-
* of the descriptions returned by strerror do not obviously match
|
|
22
|
-
* their error naming.
|
|
23
|
-
*/
|
|
24
|
-
#define EPERM 1 /* Operation not permitted */
|
|
25
|
-
#define ENOFILE 2 /* No such file or directory */
|
|
26
|
-
#define ENOENT 2
|
|
27
|
-
#define ESRCH 3 /* No such process */
|
|
28
|
-
#define EINTR 4 /* Interrupted function call */
|
|
29
|
-
#define EIO 5 /* Input/output error */
|
|
30
|
-
#define ENXIO 6 /* No such device or address */
|
|
31
|
-
#define E2BIG 7 /* Arg list too long */
|
|
32
|
-
#define ENOEXEC 8 /* Exec format error */
|
|
33
|
-
#define EBADF 9 /* Bad file descriptor */
|
|
34
|
-
#define ECHILD 10 /* No child processes */
|
|
35
|
-
#define EAGAIN 11 /* Resource temporarily unavailable */
|
|
36
|
-
#define ENOMEM 12 /* Not enough space */
|
|
37
|
-
#define EACCES 13 /* Permission denied */
|
|
38
|
-
#define EFAULT 14 /* Bad address */
|
|
39
|
-
/* 15 - Unknown Error */
|
|
40
|
-
#define EBUSY 16 /* strerror reports "Resource device" */
|
|
41
|
-
#define EEXIST 17 /* File exists */
|
|
42
|
-
#define EXDEV 18 /* Improper link (cross-device link?) */
|
|
43
|
-
#define ENODEV 19 /* No such device */
|
|
44
|
-
#define ENOTDIR 20 /* Not a directory */
|
|
45
|
-
#define EISDIR 21 /* Is a directory */
|
|
46
|
-
#define EINVAL 22 /* Invalid argument */
|
|
47
|
-
#define ENFILE 23 /* Too many open files in system */
|
|
48
|
-
#define EMFILE 24 /* Too many open files */
|
|
49
|
-
#define ENOTTY 25 /* Inappropriate I/O control operation */
|
|
50
|
-
/* 26 - Unknown Error */
|
|
51
|
-
#define EFBIG 27 /* File too large */
|
|
52
|
-
#define ENOSPC 28 /* No space left on device */
|
|
53
|
-
#define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
|
|
54
|
-
#define EROFS 30 /* Read-only file system */
|
|
55
|
-
#define EMLINK 31 /* Too many links */
|
|
56
|
-
#define EPIPE 32 /* Broken pipe */
|
|
57
|
-
#define EDOM 33 /* Domain error (math functions) */
|
|
58
|
-
#define ERANGE 34 /* Result too large (possibly too small) */
|
|
59
|
-
/* 35 - Unknown Error */
|
|
60
|
-
#define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
|
|
61
|
-
#define EDEADLK 36
|
|
62
|
-
#if 0
|
|
63
|
-
/* 37 - Unknown Error */
|
|
64
|
-
#define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
|
|
65
|
-
#define ENOLCK 39 /* No locks available (46 in Cyg?) */
|
|
66
|
-
#define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
|
|
67
|
-
#define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
|
|
68
|
-
#define EILSEQ 42 /* Illegal byte sequence */
|
|
69
|
-
#endif
|
|
70
|
-
|
|
71
|
-
/*
|
|
72
|
-
* NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
|
|
73
|
-
* sockets.h header provided with windows32api-0.1.2.
|
|
74
|
-
* You should go and put an #if 0 ... #endif around the whole block
|
|
75
|
-
* of errors (look at the comment above them).
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
|
-
#ifndef RC_INVOKED
|
|
79
|
-
|
|
80
|
-
#ifdef __cplusplus
|
|
81
|
-
extern "C" {
|
|
82
|
-
#endif
|
|
83
|
-
|
|
84
|
-
/*
|
|
85
|
-
* Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see
|
|
86
|
-
* stdlib.h.
|
|
87
|
-
*/
|
|
88
|
-
#if defined(_UWIN) || defined(_WIN32_WCE)
|
|
89
|
-
#undef errno
|
|
90
|
-
extern int errno;
|
|
91
|
-
#else
|
|
92
|
-
_CRTIMP int* __cdecl _errno(void);
|
|
93
|
-
#define errno (*_errno())
|
|
94
|
-
#endif
|
|
95
|
-
|
|
96
|
-
#ifdef __cplusplus
|
|
97
|
-
}
|
|
98
|
-
#endif
|
|
99
|
-
|
|
100
|
-
#endif /* Not RC_INVOKED */
|
|
101
|
-
|
|
102
|
-
#endif /* Not _ERRNO_H_ */
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
TARGETNAME=fxload
|
|
2
|
-
TARGETTYPE=PROGRAM
|
|
3
|
-
386_STDCALL=0
|
|
4
|
-
|
|
5
|
-
_NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP)
|
|
6
|
-
|
|
7
|
-
!IFNDEF MSC_WARNING_LEVEL
|
|
8
|
-
MSC_WARNING_LEVEL=/W3
|
|
9
|
-
!ENDIF
|
|
10
|
-
|
|
11
|
-
!IFDEF STATIC_LIBC
|
|
12
|
-
USE_LIBCMT=1
|
|
13
|
-
!ELSE
|
|
14
|
-
USE_MSVCRT=1
|
|
15
|
-
!ENDIF
|
|
16
|
-
|
|
17
|
-
UMTYPE=console
|
|
18
|
-
INCLUDES=..\..\msvc;..\..\libusb;..\getopt;$(DDK_INC_PATH)
|
|
19
|
-
C_DEFINES=$(C_DEFINES) /D__GNU_LIBRARY__
|
|
20
|
-
UMLIBS=..\..\libusb\os\obj$(BUILD_ALT_DIR)\*\libusb-1.0.lib \
|
|
21
|
-
..\getopt\getopt_ddkbuild\obj$(BUILD_ALT_DIR)\*\getopt.lib
|
|
22
|
-
SOURCES=..\ezusb.c \
|
|
23
|
-
..\fxload.c
|