Skip to content
Permalink
Browse files

Externals: Update libusb to 1.0.23-rc1

Now has support for isochronous transfers in the WinUSB backend,
which may or may not work better than the UsbDk backend.
  • Loading branch information...
leoetlino committed May 1, 2019
1 parent 42de5b9 commit 1b9617c85c98c490b951a004fe9994d0b7dc7908
Showing with 19,441 additions and 7,540 deletions.
  1. +49 −0 Externals/libusb/.travis.yml
  2. +32 −2 Externals/libusb/AUTHORS
  3. +4 −0 Externals/libusb/Brewfile
  4. +35 −0 Externals/libusb/ChangeLog
  5. +0 −7 Externals/libusb/DOLPHIN
  6. +73 −0 Externals/libusb/INSTALL_WIN.txt
  7. +28 −0 Externals/libusb/Makefile.am
  8. +0 −33 Externals/libusb/README
  9. +1 −0 Externals/libusb/README
  10. +41 −0 Externals/libusb/README.git
  11. +32 −0 Externals/libusb/README.md
  12. +61 −0 Externals/libusb/Xcode/common.xcconfig
  13. +25 −0 Externals/libusb/Xcode/config.h
  14. +29 −0 Externals/libusb/Xcode/debug.xcconfig
  15. +21 −0 Externals/libusb/Xcode/libusb.xcconfig
  16. +959 −0 Externals/libusb/Xcode/libusb.xcodeproj/project.pbxproj
  17. +21 −0 Externals/libusb/Xcode/libusb_debug.xcconfig
  18. +21 −0 Externals/libusb/Xcode/libusb_release.xcconfig
  19. +30 −0 Externals/libusb/Xcode/release.xcconfig
  20. +116 −0 Externals/libusb/android/README
  21. +75 −0 Externals/libusb/android/config.h
  22. +23 −0 Externals/libusb/android/jni/Android.mk
  23. +24 −0 Externals/libusb/android/jni/Application.mk
  24. +134 −0 Externals/libusb/android/jni/examples.mk
  25. +54 −0 Externals/libusb/android/jni/libusb.mk
  26. +56 −0 Externals/libusb/android/jni/tests.mk
  27. +41 −0 Externals/libusb/appveyor.yml
  28. +11 −0 Externals/libusb/appveyor_cygwin.bat
  29. +19 −0 Externals/libusb/appveyor_minGW.bat
  30. +8 −0 Externals/libusb/autogen.sh
  31. +6 −0 Externals/libusb/bootstrap.sh
  32. +332 −0 Externals/libusb/configure.ac
  33. +9 −0 Externals/libusb/doc/Makefile.am
  34. +2,334 −0 Externals/libusb/doc/doxygen.cfg.in
  35. BIN Externals/libusb/doc/libusb.png
  36. +19 −0 Externals/libusb/examples/Makefile.am
  37. +508 −0 Externals/libusb/examples/dpfp.c
  38. +557 −0 Externals/libusb/examples/dpfp_threaded.c
  39. +831 −0 Externals/libusb/examples/ezusb.c
  40. +120 −0 Externals/libusb/examples/ezusb.h
  41. +309 −0 Externals/libusb/examples/fxload.c
  42. +1,060 −0 Externals/libusb/examples/getopt/getopt.c
  43. +180 −0 Externals/libusb/examples/getopt/getopt.h
  44. +188 −0 Externals/libusb/examples/getopt/getopt1.c
  45. +132 −0 Externals/libusb/examples/hotplugtest.c
  46. +73 −0 Externals/libusb/examples/listdevs.c
  47. +193 −0 Externals/libusb/examples/sam3u_benchmark.c
  48. +277 −0 Externals/libusb/examples/testlibusb.c
  49. +1,135 −0 Externals/libusb/examples/xusb.c
  50. +11 −0 Externals/libusb/libusb-1.0.pc.in
  51. +9 −7 Externals/libusb/libusb/Makefile.am
  52. +427 −246 Externals/libusb/libusb/core.c
  53. +27 −25 Externals/libusb/libusb/descriptor.c
  54. +73 −50 Externals/libusb/libusb/hotplug.c
  55. +34 −25 Externals/libusb/libusb/hotplug.h
  56. +83 −67 Externals/libusb/libusb/io.c
  57. +10 −6 Externals/libusb/libusb/libusb-1.0.def
  58. +106 −48 Externals/libusb/libusb/libusb.h
  59. +141 −94 Externals/libusb/libusb/libusbi.h
  60. +389 −231 Externals/libusb/libusb/os/darwin_usb.c
  61. +55 −16 Externals/libusb/libusb/os/darwin_usb.h
  62. +6 −6 Externals/libusb/libusb/os/haiku_usb_backend.cpp
  63. +49 −46 Externals/libusb/libusb/os/haiku_usb_raw.cpp
  64. +37 −28 Externals/libusb/libusb/os/linux_netlink.c
  65. +32 −10 Externals/libusb/libusb/os/linux_udev.c
  66. +314 −154 Externals/libusb/libusb/os/linux_usbfs.c
  67. +3 −2 Externals/libusb/libusb/os/linux_usbfs.h
  68. +8 −3 Externals/libusb/libusb/os/netbsd_usb.c
  69. +3 −3 Externals/libusb/libusb/os/openbsd_usb.c
  70. +36 −5 Externals/libusb/libusb/os/poll_posix.c
  71. +3 −0 Externals/libusb/libusb/os/poll_posix.h
  72. +241 −562 Externals/libusb/libusb/os/poll_windows.c
  73. +11 −42 Externals/libusb/libusb/os/poll_windows.h
  74. +518 −115 Externals/libusb/libusb/os/sunos_usb.c
  75. +6 −0 Externals/libusb/libusb/os/sunos_usb.h
  76. +6 −5 Externals/libusb/libusb/os/threads_posix.c
  77. +70 −26 Externals/libusb/libusb/os/threads_posix.h
  78. +39 −172 Externals/libusb/libusb/os/threads_windows.c
  79. +64 −29 Externals/libusb/libusb/os/threads_windows.h
  80. +51 −62 Externals/libusb/libusb/os/wince_usb.c
  81. +24 −35 Externals/libusb/libusb/os/windows_common.h
  82. +571 −179 Externals/libusb/libusb/os/windows_nt_common.c
  83. +71 −34 Externals/libusb/libusb/os/windows_nt_common.h
  84. +147 −0 Externals/libusb/libusb/os/windows_nt_shared_types.h
  85. +171 −257 Externals/libusb/libusb/os/windows_usbdk.c
  86. +3 −46 Externals/libusb/libusb/os/windows_usbdk.h
  87. +1,360 −1,287 Externals/libusb/libusb/os/windows_winusb.c
  88. +241 −411 Externals/libusb/libusb/os/windows_winusb.h
  89. +33 −2 Externals/libusb/libusb/strerror.c
  90. +2 −2 Externals/libusb/libusb/version.h
  91. +1 −1 Externals/libusb/libusb/version_nano.h
  92. +2 −1 Externals/libusb/libusb_static_2013.vcxproj
  93. +6 −7 Externals/libusb/msvc/appveyor.bat
  94. +5 −4 Externals/libusb/msvc/config.h
  95. +86 −51 Externals/libusb/msvc/ddk_build.cmd
  96. +23 −104 Externals/libusb/msvc/fxload_2010.vcxproj
  97. +23 −107 Externals/libusb/msvc/fxload_2012.vcxproj
  98. +23 −107 Externals/libusb/msvc/fxload_2013.vcxproj
  99. +23 −107 Externals/libusb/msvc/fxload_2015.vcxproj
  100. +113 −0 Externals/libusb/msvc/fxload_2017.vcxproj
  101. +1 −1 Externals/libusb/msvc/fxload_sources
  102. +15 −75 Externals/libusb/msvc/getopt_2010.vcxproj
  103. +15 −79 Externals/libusb/msvc/getopt_2012.vcxproj
  104. +15 −79 Externals/libusb/msvc/getopt_2013.vcxproj
  105. +15 −79 Externals/libusb/msvc/getopt_2015.vcxproj
  106. +97 −0 Externals/libusb/msvc/getopt_2017.vcxproj
  107. +6 −2 Externals/libusb/msvc/getopt_sources
  108. +17 −99 Externals/libusb/msvc/hotplugtest_2010.vcxproj
  109. +17 −102 Externals/libusb/msvc/hotplugtest_2012.vcxproj
  110. +17 −102 Externals/libusb/msvc/hotplugtest_2013.vcxproj
  111. +17 −102 Externals/libusb/msvc/hotplugtest_2015.vcxproj
  112. +105 −0 Externals/libusb/msvc/hotplugtest_2017.vcxproj
  113. +1 −1 Externals/libusb/msvc/hotplugtest_sources
  114. +95 −0 Externals/libusb/msvc/libusb_2005.sln
  115. +105 −0 Externals/libusb/msvc/libusb_2010.sln
  116. +105 −0 Externals/libusb/msvc/libusb_2012.sln
  117. +107 −0 Externals/libusb/msvc/libusb_2013.sln
  118. +107 −0 Externals/libusb/msvc/libusb_2015.sln
  119. +186 −0 Externals/libusb/msvc/libusb_2017.sln
  120. +29 −1 Externals/libusb/msvc/libusb_dll_2005.vcproj
  121. +19 −88 Externals/libusb/msvc/libusb_dll_2010.vcxproj
  122. +19 −91 Externals/libusb/msvc/libusb_dll_2012.vcxproj
  123. +19 −91 Externals/libusb/msvc/libusb_dll_2013.vcxproj
  124. +19 −91 Externals/libusb/msvc/libusb_dll_2015.vcxproj
  125. +133 −0 Externals/libusb/msvc/libusb_dll_2017.vcxproj
  126. +9 −1 Externals/libusb/msvc/libusb_dll_wince.vcproj
  127. +8 −10 Externals/libusb/msvc/libusb_sources
  128. +31 −3 Externals/libusb/msvc/libusb_static_2005.vcproj
  129. +17 −79 Externals/libusb/msvc/libusb_static_2010.vcxproj
  130. +17 −82 Externals/libusb/msvc/libusb_static_2012.vcxproj
  131. +18 −83 Externals/libusb/msvc/libusb_static_2013.vcxproj
  132. +18 −83 Externals/libusb/msvc/libusb_static_2015.vcxproj
  133. +116 −0 Externals/libusb/msvc/libusb_static_2017.vcxproj
  134. +20 −26 Externals/libusb/msvc/libusb_static_wince.vcproj
  135. +246 −0 Externals/libusb/msvc/libusb_wince.sln
  136. +15 −99 Externals/libusb/msvc/listdevs_2010.vcxproj
  137. +15 −102 Externals/libusb/msvc/listdevs_2012.vcxproj
  138. +15 −102 Externals/libusb/msvc/listdevs_2013.vcxproj
  139. +15 −102 Externals/libusb/msvc/listdevs_2015.vcxproj
  140. +105 −0 Externals/libusb/msvc/listdevs_2017.vcxproj
  141. +2 −1 Externals/libusb/msvc/listdevs_sources
  142. +19 −101 Externals/libusb/msvc/stress_2010.vcxproj
  143. +19 −104 Externals/libusb/msvc/stress_2012.vcxproj
  144. +19 −104 Externals/libusb/msvc/stress_2013.vcxproj
  145. +19 −104 Externals/libusb/msvc/stress_2015.vcxproj
  146. +109 −0 Externals/libusb/msvc/stress_2017.vcxproj
  147. +21 −0 Externals/libusb/msvc/stress_sources
  148. +81 −0 Externals/libusb/msvc/testlibusb_2010.vcxproj
  149. +82 −0 Externals/libusb/msvc/testlibusb_2012.vcxproj
  150. +82 −0 Externals/libusb/msvc/testlibusb_2013.vcxproj
  151. +82 −0 Externals/libusb/msvc/testlibusb_2015.vcxproj
  152. +105 −0 Externals/libusb/msvc/testlibusb_2017.vcxproj
  153. +20 −0 Externals/libusb/msvc/testlibusb_sources
  154. +16 −98 Externals/libusb/msvc/xusb_2010.vcxproj
  155. +16 −101 Externals/libusb/msvc/xusb_2012.vcxproj
  156. +16 −101 Externals/libusb/msvc/xusb_2013.vcxproj
  157. +16 −101 Externals/libusb/msvc/xusb_2015.vcxproj
  158. +105 −0 Externals/libusb/msvc/xusb_2017.vcxproj
  159. +1 −1 Externals/libusb/msvc/xusb_sources
  160. +6 −0 Externals/libusb/tests/Makefile.am
  161. +107 −0 Externals/libusb/tests/libusb_testlib.h
  162. +160 −0 Externals/libusb/tests/stress.c
  163. +277 −0 Externals/libusb/tests/testlib.c
  164. +39 −0 Externals/libusb/travis-autogen.sh
@@ -0,0 +1,49 @@
language: c

matrix:
include:
- os: linux
dist: trusty
sudo: required
compiler: gcc
- os: linux
dist: trusty
sudo: required
compiler: clang
- os: osx
osx_image: xcode8
compiler: gcc
- os: osx
osx_image: xcode8
compiler: clang
- os: osx
osx_image: xcode7.1
compiler: gcc
- os: osx
osx_image: xcode7.1
compiler: clang
- os: osx
osx_image: beta-xcode6.2
compiler: gcc
- os: osx
osx_image: beta-xcode6.2
compiler: clang

addons:
homebrew:
update: true
brewfile: true
apt:
packages:
- autoconf
- automake
- libtool
- m4
- libudev-dev
sources:
- ubuntu-toolchain-r-test

script:
- ./autogen.sh && make clean && make
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./travis-autogen.sh --disable-udev && make clean && make ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd Xcode && xcodebuild -project libusb.xcodeproj ; fi
@@ -8,27 +8,37 @@ Copyright © 2010-2012 Michael Plante <michael.plante@gmail.com>
Copyright © 2011-2013 Hans de Goede <hdegoede@redhat.com>
Copyright © 2012-2013 Martin Pieuchot <mpi@openbsd.org>
Copyright © 2012-2013 Toby Gray <toby.gray@realvnc.com>
Copyright © 2013-2015 Chris Dickens <christopher.a.dickens@gmail.com>
Copyright © 2013-2018 Chris Dickens <christopher.a.dickens@gmail.com>

Other contributors:
Adrian Bunk
Akshay Jaggi
Alan Ott
Alan Stern
Alex Vatchenko
Andrew Fernandes
Andy Chunyu
Andy McFadden
Angus Gratton
Anil Nair
Anthony Clay
Antonio Ospite
Artem Egorkine
Aurelien Jarno
Bastien Nocera
Bei Zhang
Benjamin Dobell
Brent Rector
Carl Karsten
Christophe Zeitouny
Colin Walters
Dave Camarillo
David Engraf
David Moore
Davidlohr Bueso
Dmitry Fleytman
Doug Johnston
Evan Hunter
Federico Manzan
Felipe Balbi
Florian Albrechtskirchinger
@@ -41,23 +51,34 @@ Hans Ulrich Niedermann
Hector Martin
Hoi-Ho Chan
Ilya Konstantinov
Jakub Klama
James Hanko
Jeffrey Nichols
Johann Richard
John Sheu
Jonathon Jongsma
Joost Muller
Josh Gao
Joshua Blake
Justin Bischoff
KIMURA Masaru
Karsten Koenig
Konrad Rzepecki
Kuangye Guo
Lars Kanis
Lars Wirzenius
Lei Chen
Luca Longinotti
Marcus Meissner
Markus Heidelberg
Martin Ettl
Martin Koegler
Matthew Stapleton
Matthias Bolte
Michel Zou
Mike Frysinger
Mikhail Gusarov
Morgan Leborgne
Moritz Fischer
Ларионов Даниил
Nicholas Corgan
@@ -66,10 +87,17 @@ Orin Eman
Paul Fertser
Pekka Nikander
Rob Walker
Romain Vimont
Roman Kalashnikov
Sameeh Jubran
Sean McBride
Sebastian Pipping
Sergey Serb
Simon Haggett
Simon Newton
Stefan Agner
Stefan Tauner
Steinar H. Gunderson
Thomas Röfer
Tim Hutt
Tim Roberts
@@ -81,9 +109,11 @@ Uri Lublin
Vasily Khoruzhick
Vegard Storheil Eriksen
Venkatesh Shukla
Vianney le Clément de Saint-Marcq
Victor Toso
Vitali Lovich
William Skellenger
Xiaofan Chen
Zoltán Kovács
Роман Донченко
parafin
xantares
@@ -0,0 +1,4 @@
brew 'automake'
brew 'libtool'
brew 'autoconf'
brew 'm4'
@@ -1,6 +1,41 @@
For detailed information about the changes below, please see the git log or
visit: http://log.libusb.info

2019-04-05: v1.0.23 (in progress)
* Add German translation (#446)
* Add Hungarian translation (#493)
* Android: Improved support for Android
* configure.ac: Fix detection of clock_gettime library (#439)
* Darwin(macOS): Switch from using ResetDevice to USBDeviceReEnumerate (#455)
* Darwin(macOS): Remove code that changed the device class used (#428)
* Darwin(macOS): Reduce hotplug timeout to 1ms (from 5s)
* New API libusb_set_log_cb() to redirect global and per context log
messages to the provided log handling function
* New API libusb_wrap_sys_device to allow the user to specify the
usb device to use.
* Solaris: Break infinite recursion in backend clock_gettime
* Solaris: Enable timerfd on sunos when available
* Windows: Add support for isochronous transfers with WinUSB
* Various other bug fixes and improvements

2018-03-24: v1.0.22:
* New libusb_set_option() API
* Fix transfer timeout not being cleared upon resubmission
* Report super speed plus devices on modern Linux and macOS
* Darwin: Improve support for macOS Sierra and High Sierra
* Darwin: SDK fixes and improvements
* Linux: Let initialization succeed when no devices are present
* Linux: Mark internal file descriptors with CLOEXEC flag
* Solaris: Add support for attach/detach kernel driver
* Windows: Add dynamic UsbDk backend selection
* Windows: Add isochronous transfer support via libusbK
* Windows: Add Visual Studio 2017 support
* Windows: Fix enumeration problems on Windows 8 and later
* Windows: Major rework of poll() emulation
* Windows: Numerous HID API fixes
* Windows: Support cancelation of individual transfers (Vista and later)
* Various other bug fixes and improvements

2016-10-01: v1.0.21:
* Core: Refactor code related to transfer flags and timeout handling
* Darwin: Ignore root hub simulation devices

This file was deleted.

@@ -0,0 +1,73 @@
Installation Instructions for Windows
*************************************

If you are compiling for MinGW or cygwin, please refer to the INSTALL file.

If you are using Microsoft Visual Studio:
- Open the relevant solution file in /msvc:
libusb.dsw for MSVC6, libusb_2005.sln for Visual Studio 2005 or 2008,
libusb_2010.sln for Visual Studio 2010,
libusb_2012.sln for Visual Studio 2012 or later,
libusb_wince.sln for Windows CE support in Visual Studio 2005.
- If you want to debug the library, uncomment the ENABLE_DEBUG_LOGGING define
in msvc\config.h
- Select your configuration and compile the project

Note that if you are using Visual Studio Express, you may have to install the
Windows SDK to be able to compile the 64 bit version of the library.

If you are using the freely available Windows DDK/WDK (Driver Development Kit)
- If you want to debug the library, uncomment the ENABLE_DEBUG_LOGGING define
in msvc\config.h
- Open one of the relevant Free Build or Checked Build prompt for your target
platform
- Navigate to the msvc\ directory where the ddk_build.cmd file is located, and
run 'ddk_build'
- To produce a DLL rather than a static library, use: 'ddk_build DLL'
- To produce a static library that uses LIBCMT[d] instead of MSVCRT[d] (/MT[d]
vs /MD[d] in Visual Studio) use: 'ddk_build /MT'

Note that using the Windows DDK, it is possible to compile both the 32 and 64
bit versions of the library.

If you are building for Windows CE then you will need the Windows CE Standard 5.00 SDK.

Destination directories
***********************

The 32 bit binaries compiled either from Visual Studio or the DDK are placed in
a Win32\ directory at the root of the library
The 64 bit binaries are placed in an x64\ directory
Windows CE binaries are placed in one of the following directories, depending
on the target processor: ARMV4I, MIPSII, MIPSII_FP, MIPSIV, MIPSIV_FP, SH4 or x86.


Troubleshooting
***************

If the compilation process complains about missing libraries, ensure that the
default library paths for your project points to the relevant directories.
If needed, these libraries can be obtained by installing either the latest
Windows SDK or the DDK (Links provided at the end of this file).

For Windows CE it is necessary to install the CE USB Kernel Wrapper driver for
libusb to function on a device.

Links
*****

Additional information related to the Windows backend:
http://windows.libusb.info

Latest Windows Driver (Development) Kit (WDK):
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=36a2630f-5d56-43b5-b996-7633f2ec14ff

Latest Microsoft Windows SDK:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505

Windows CE Standard 5.00 SDK:
http://www.microsoft.com/en-gb/download/details.aspx?id=17310

Windows CE USB Kernel Wrapper Driver:
https://github.com/RealVNC/CEUSBKWrapper

@@ -0,0 +1,28 @@
AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
ACLOCAL_AMFLAGS = -I m4
DISTCLEANFILES = libusb-1.0.pc
EXTRA_DIST = TODO PORTING msvc libusb/libusb-1.0.def libusb/version_nano.h \
examples/getopt/getopt.c examples/getopt/getopt1.c examples/getopt/getopt.h \
android Xcode
SUBDIRS = libusb doc

if BUILD_EXAMPLES
SUBDIRS += examples
endif

if BUILD_TESTS
SUBDIRS += tests
endif

pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_DATA=libusb-1.0.pc

.PHONY: dist-up

reldir = .release/$(distdir)
dist-up: dist
rm -rf $(reldir)
mkdir -p $(reldir)
cp $(distdir).tar.bz2 $(reldir)
rsync -rv $(reldir) frs.sourceforge.net:/home/frs/project/l/li/libusb/libusb-1.0/
rm -rf $(reldir)

This file was deleted.

@@ -0,0 +1,41 @@
Notes related to git compilation:
--------------------------------

If you retrieved the libusb repository from git and are using a gcc based
toolchain, be mindful that you should have the autotools installed (autoconf,
automake) and will need to run either ./autogen.sh or ./bootstrap.sh to produce
the configure file.

The difference between autogen.sh and bootstrap.sh is that the former invokes
configure with a default set of options, and will therefore generate a Makefile,
whereas the latter does not invoke configure at all. If using autogen.sh, note
that you can also append options, that will be passed as is to configure.

OS X-specific notes:
-------------------

Starting with Xcode 4.3, neither Xcode.app nor the Xcode 'command line tools'
includes autotools and so running either autogen.sh or bootstrap.sh will result
in the message:

libtoolize or glibtoolize was not found! Please install libtool.

To proceed, you must find and install it from somewhere.

Alternatively, you can use the Xcode project at Xcode/libusb.xcodeproj.

Notes related to submitting new developments:
--------------------------------------------

If you submit a new development to libusb (eg: new backend), that is unlikely
to fit in a couple of small patches, we would kindly suggest that you create a
public account on github, if you don't have one already, and then fork a new
libusb repository under this account from https://github.com/libusb/libusb.

Then you can create a git branch for your work, that we will be able to better
reference and test.

We also suggest that, if you are planning to bring in a large development, you
try to involve the libusb community early by letting the mailing list know, as
you may find that other people might be eager to help you out.
See http://mailing-list.libusb.info for details on how to join the mailing list.

0 comments on commit 1b9617c

Please sign in to comment.
You can’t perform that action at this time.