Skip to content

Commit

Permalink
Merge pull request #2032 from mathieui/update-libusb-externals
Browse files Browse the repository at this point in the history
Update the libusb in externals to 1.0.19 (latest)
  • Loading branch information
skidau committed Feb 15, 2015
2 parents f609718 + 3b0f3cb commit 32d8f88
Show file tree
Hide file tree
Showing 147 changed files with 17,152 additions and 43,360 deletions.
28 changes: 23 additions & 5 deletions Externals/libusbx/AUTHORS → Externals/libusb/AUTHORS
@@ -1,23 +1,26 @@
Copyright © 2001 Johannes Erdfelt <johannes@erdfelt.com>
Copyright © 2007-2009 Daniel Drake <dsd@gentoo.org>
Copyright © 2010-2012 Peter Stuge <peter@stuge.se>
Copyright © 2008-2011 Nathan Hjelm <hjelmn@users.sourceforge.net>
Copyright © 2009-2012 Pete Batard <pete@akeo.ie>
Copyright © 2009-2012 Ludovic Rousseau <ludovic.rousseau@gmail.com>
Copyright © 2008-2013 Nathan Hjelm <hjelmn@users.sourceforge.net>
Copyright © 2009-2013 Pete Batard <pete@akeo.ie>
Copyright © 2009-2013 Ludovic Rousseau <ludovic.rousseau@gmail.com>
Copyright © 2010-2012 Michael Plante <michael.plante@gmail.com>
Copyright © 2011-2012 Hans de Goede <hdegoede@redhat.com>
Copyright © 2012 Martin Pieuchot <mpi@openbsd.org>
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>

Other contributors:
Alan Ott
Alan Stern
Alex Vatchenko
Andrew Fernandes
Anthony Clay
Artem Egorkine
Aurelien Jarno
Bastien Nocera
Bei Zhang
Benjamin Dobell
Carl Karsten
Chris Dickens
Colin Walters
Dave Camarillo
Expand All @@ -26,22 +29,36 @@ David Moore
Davidlohr Bueso
Federico Manzan
Felipe Balbi
Florian Albrechtskirchinger
Francesco Montorsi
Francisco Facioni
Graeme Gill
Gustavo Zacarias
Hans Ulrich Niedermann
Hector Martin
Hoi-Ho Chan
Ilya Konstantinov
James Hanko
John Sheu
Joshua Blake
Justin Bischoff
Karsten Koenig
Konrad Rzepecki
Kuangye Guo
Lars Kanis
Lars Wirzenius
Luca Longinotti
Markus Heidelberg
Martin Koegler
Matthias Bolte
Mike Frysinger
Mikhail Gusarov
Moritz Fischer
Ларионов Даниил
Nicholas Corgan
Omri Iluz
Orin Eman
Paul Fertser
Pekka Nikander
Rob Walker
Sean McBride
Expand All @@ -58,3 +75,4 @@ Vitali Lovich
Xiaofan Chen
Zoltán Kovács
Роман Донченко
xantares
File renamed without changes.
51 changes: 44 additions & 7 deletions Externals/libusbx/ChangeLog → Externals/libusb/ChangeLog
@@ -1,5 +1,42 @@
For detailed information about the changes below, please see the git log or
visit: http://log.libusbx.org
visit: http://log.libusb.info

2014-05-30: v1.0.19
* Add support for USB bulk streams on Linux and Mac OS X (#11)
* Windows: Add AMD and Intel USB-3.0 root hub support
* Windows: Fix USB 3.0 speed detection on Windows 8 or later (#10)
* Added Russian translation for libusb_strerror strings
* All: Various small fixes and cleanups
The (#xx) numbers are libusb issue numbers, see ie:
https://github.com/libusb/libusb/issues/11

2014-01-25: v1.0.18
* Fix multiple memory leaks
* Fix a crash when HID transfers return no data on Windows
* Ensure all pending events are consumed
* Improve Android and ucLinux support
* Multiple Windows improvements (error logging, VS2013, VIA xHCI support)
* Multiple OS X improvements (broken compilation, SIGFPE, 64bit support)

2013-09-06: v1.0.17
* Hotplug callbacks now always get passed a libusb_context, even if it is
the default context. Previously NULL would be passed for the default context,
but since the first context created is the default context, and most apps
use only 1 context, this meant that apps explicitly creating a context would
still get passed NULL
* Android: Add .mk files to build with the Android NDK
* Darwin: Add Xcode project
* Darwin: Fix crash on unplug (#121)
* Linux: Fix hang (deadlock) on libusb_exit
* Linux: Fix libusb build failure with --disable-udev (#124)
* Linux: Fix libusb_get_device_list() hang with --disable-udev (#130)
* OpenBSD: Update OpenBSD backend with support for control transfers to
non-ugen(4) devices and make get_configuration() no longer generate I/O.
Note that using this libusb version on OpenBSD requires using
OpenBSD 5.3-current or later. Users of older OpenBSD versions are advised
to stay with the libusb shipped with OpenBSD (mpi)
* Windows: fix libusb_dll_2010.vcxproj link errors (#129)
* Various other bug fixes and improvements

2013-07-11: v1.0.16
* Add hotplug support for Darwin and Linux (#9)
Expand Down Expand Up @@ -40,7 +77,7 @@ https://github.com/libusbx/libusbx/issues/9
* Reverts the previous API change with regards to bMaxPower.
If this doesn't matter to you, you are encouraged to keep using v1.0.13,
as it will use the same attribute as v2.0, to be released soon.
* Note that LIBUSBX_API_VERSION is *decreased* to 0x010000FF and the previous
* Note that LIBUSB_API_VERSION is *decreased* to 0x010000FF and the previous
guidelines with regards to concurrent use of MaxPower/bMaxPower still apply.

2012-09-20: v1.0.13
Expand All @@ -51,11 +88,11 @@ https://github.com/libusbx/libusbx/issues/9
* Fix broken support for the 0.1 -> 1.0 libusb-compat layer
* Fix unwanted cancellation of pending timeouts as well as major timeout related bugs
* Fix handling of HID and composite devices on Windows
* Introduce LIBUSBX_API_VERSION macro
* Introduce LIBUSB_API_VERSION macro
* Add Cypress FX/FX2 firmware upload sample, based on fxload from
http://linux-hotplug.sourceforge.net
* Add libusb0 (libusb-win32) and libusbK driver support on Windows. Note that while
the drivers allow it, isochronous transfers are not supported yet in libusbx. Also
the drivers allow it, isochronous transfers are not supported yet in libusb. Also
not supported yet is the use of libusb-win32 filter drivers on composite interfaces
* Add support for the new get_capabilities ioctl on Linux and avoid unnecessary
splitting of bulk transfers
Expand Down Expand Up @@ -156,18 +193,18 @@ https://github.com/libusbx/libusbx/issues/9
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

APPENDIX A - How to maintain code compatibility with versions of libusb and
libusbx that use MaxPower:
libusb that use MaxPower:

If you must to maintain compatibility with versions of the library that aren't
using the bMaxPower attribute in struct libusb_config_descriptor, the
recommended way is to use the new LIBUSBX_API_VERSION macro with an #ifdef.
recommended way is to use the new LIBUSB_API_VERSION macro with an #ifdef.
For instance, if your code was written as follows:

if (dev->config[0].MaxPower < 250)

Then you should modify it to have:

#if defined(LIBUSBX_API_VERSION) && (LIBUSBX_API_VERSION >= 0x01000100)
#if defined(LIBUSB_API_VERSION) && (LIBUSB_API_VERSION >= 0x01000100)
if (dev->config[0].bMaxPower < 250)
#else
if (dev->config[0].MaxPower < 250)
Expand Down
7 changes: 7 additions & 0 deletions Externals/libusb/DOLPHIN
@@ -0,0 +1,7 @@
Dolphin-specific changes (as of 2015-02-12)
-------------------------------------------

- removed all toplevel directories save msvc/ & libusb/
- removed all files save AUTHORS, Changelog, COPYING, INSTALL, NEWS,
PORTING, README and TODO
- patched the VS project file to insert dolphin-specific props
File renamed without changes.
2 changes: 2 additions & 0 deletions Externals/libusb/NEWS
@@ -0,0 +1,2 @@
For the latest libusb news, please refer to the ChangeLog file, or visit:
http://libusb.info
26 changes: 13 additions & 13 deletions Externals/libusbx/PORTING → Externals/libusb/PORTING
@@ -1,15 +1,15 @@
PORTING LIBUSBX TO OTHER PLATFORMS
PORTING LIBUSB TO OTHER PLATFORMS

Introduction
============

This document is aimed at developers wishing to port libusbx to unsupported
platforms. I believe the libusbx API is OS-independent, so by supporting
This document is aimed at developers wishing to port libusb to unsupported
platforms. I believe the libusb API is OS-independent, so by supporting
multiple operating systems we pave the way for cross-platform USB device
drivers.

Implementation-wise, the basic idea is that you provide an interface to
libusbx's internal "backend" API, which performs the appropriate operations on
libusb's internal "backend" API, which performs the appropriate operations on
your target platform.

In terms of USB I/O, your backend provides functionality to submit
Expand All @@ -27,16 +27,16 @@ e.g. setting configuration, obtaining descriptors, etc.
File descriptors for I/O polling
================================

For libusbx to work, your event handling function obviously needs to be called
For libusb to work, your event handling function obviously needs to be called
at various points in time. Your backend must provide a set of file descriptors
which libusbx and its users can pass to poll() or select() to determine when
which libusb and its users can pass to poll() or select() to determine when
it is time to call the event handling function.

On Linux, this is easy: the usbfs kernel interface exposes a file descriptor
which can be passed to poll(). If something similar is not true for your
platform, you can emulate this using an internal library thread to reap I/O as
necessary, and a pipe() with the main library to raise events. The file
descriptor of the pipe can then be provided to libusbx as an event source.
descriptor of the pipe can then be provided to libusb as an event source.


Interface semantics and documentation
Expand All @@ -46,7 +46,7 @@ Documentation of the backend interface can be found in libusbi.h inside the
usbi_os_backend structure definition.

Your implementations of these functions will need to call various internal
libusbx functions, prefixed with "usbi_". Documentation for these functions
libusb functions, prefixed with "usbi_". Documentation for these functions
can be found in the .c files where they are implemented.

You probably want to skim over *all* the documentation before starting your
Expand All @@ -72,18 +72,18 @@ right usbi_backend for your platform.

4. Produce and test your implementation.

5. Send your implementation to libusbx-devel mailing list.
5. Send your implementation to libusb-devel mailing list.


Implementation difficulties? Questions?
=======================================

If you encounter difficulties porting libusbx to your platform, please raise
these issues on the libusbx-devel mailing list. Where possible and sensible, I
am interested in solving problems preventing libusbx from operating on other
If you encounter difficulties porting libusb to your platform, please raise
these issues on the libusb-devel mailing list. Where possible and sensible, I
am interested in solving problems preventing libusb from operating on other
platforms.

The libusbx-devel mailing list is also a good place to ask questions and
The libusb-devel mailing list is also a good place to ask questions and
make suggestions about the internal API. Hopefully we can produce some
better documentation based on your questions and other input.

Expand Down
27 changes: 27 additions & 0 deletions Externals/libusb/README
@@ -0,0 +1,27 @@
libusb
======

libusb is a library for USB device access from Linux, Mac OS X,
Windows and OpenBSD/NetBSD userspace.
It is written in C and licensed under the GNU Lesser General Public
License version 2.1 or, at your option, any later version (see COPYING).

libusb is abstracted internally in such a way that it can hopefully
be ported to other operating systems. Please see the PORTING file
for more information.

libusb homepage:
http://libusb.info/

Developers will wish to consult the API documentation:
http://api.libusb.info

Use the mailing list for questions, comments, etc:
http://mailing-list.libusb.info

- Pete Batard <pete@akeo.ie>
- Hans de Goede <hdegoede@redhat.com>
- Xiaofan Chen <xiaofanc@gmail.com>
- Ludovic Rousseau <ludovic.rousseau@gmail.com>
- Nathan Hjelm <hjelmn@users.sourceforge.net>
(Please use the mailing list rather than mailing developers directly)
2 changes: 2 additions & 0 deletions Externals/libusb/TODO
@@ -0,0 +1,2 @@
Please see the libusb roadmap by visiting:
https://github.com/libusb/libusb/issues/milestones?direction=asc&sort=due_date
@@ -1,16 +1,19 @@
all: libusb-1.0.la libusb-1.0.dll

AUTOMAKE_OPTIONS = subdir-objects

lib_LTLIBRARIES = libusb-1.0.la

POSIX_POLL_SRC = os/poll_posix.c
LINUX_USBFS_SRC = os/linux_usbfs.c
DARWIN_USB_SRC = os/darwin_usb.c
OPENBSD_USB_SRC = os/openbsd_usb.c
NETBSD_USB_SRC = os/netbsd_usb.c
WINDOWS_USB_SRC = os/poll_windows.c os/windows_usb.c libusb-1.0.rc libusb-1.0.def
WINCE_USB_SRC = os/wince_usb.c os/wince_usb.h

EXTRA_DIST = $(LINUX_USBFS_SRC) $(DARWIN_USB_SRC) $(OPENBSD_USB_SRC) \
$(WINDOWS_USB_SRC) $(WINCE_USB_SRC) \
$(NETBSD_USB_SRC) $(WINDOWS_USB_SRC) $(WINCE_USB_SRC) \
$(POSIX_POLL_SRC) \
os/threads_posix.c os/threads_windows.c \
os/linux_udev.c os/linux_netlink.c
Expand All @@ -36,6 +39,10 @@ if OS_OPENBSD
OS_SRC = $(OPENBSD_USB_SRC) $(POSIX_POLL_SRC)
endif

if OS_NETBSD
OS_SRC = $(NETBSD_USB_SRC) $(POSIX_POLL_SRC)
endif

if OS_WINDOWS
OS_SRC = $(WINDOWS_USB_SRC)

Expand All @@ -45,7 +52,7 @@ OS_SRC = $(WINDOWS_USB_SRC)
libusb-1.0.rc: version.h version_nano.h
endif

libusb-1.0.dll: libusb-1.0.def
libusb-1.0.dll: libusb-1.0.def libusb-1.0.la
if CREATE_IMPORT_LIB
# Rebuild the import lib from the .def so that MS and MinGW DLLs can be interchanged
$(AM_V_GEN)$(DLLTOOL) $(DLLTOOLFLAGS) --kill-at --input-def $(srcdir)/libusb-1.0.def --dllname $@ --output-lib .libs/$@.a
Expand Down

0 comments on commit 32d8f88

Please sign in to comment.