Nathan Hjelm [Fri, 8 Feb 2013 07:12:13 +0000 (00:12 -0700)]
darwin: add support for the LIBUSB_TRANSFER_ADD_ZERO_PACKET transfer flag.
The zero-length packet is sent by the async event thread if all the following
conditions are met:
1) The packet size is not a multiple of maxPacketSize, and
2) the transfer completed successfully.
References #6.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Nathan Hjelm [Fri, 8 Feb 2013 04:56:30 +0000 (21:56 -0700)]
darwin/libusb_reset: reenumerate device if the device descriptor or any configuration descriptor has changed
Some background: the Linux kernel causes a device to be reenumeration when
reset if the device's descriptors have changed. Darwin does not provide
this feature but instead provides a call to force the reenumeration of
a device. This behavior is required to support the firmware update
protocol used by some devices.
This patch updates darwin_reset to check if either the device or
configuration descriptors have changed. If they have darwin_reset will
ask the OS to reenumerate the device and return LIBUSB_ERROR_NOT_FOUND
or LIBUSB_SUCCESS accordingly.
Fixes #169
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Nathan Hjelm [Sat, 1 Dec 2012 02:17:43 +0000 (19:17 -0700)]
darwin: dpriv->device will never be NULL for a valid device. remove unnecessary code that handled this case
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Nathan Hjelm [Thu, 29 Nov 2012 23:19:11 +0000 (16:19 -0700)]
darwin: allow control messages on devices we can not exclusively open
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Wed, 15 May 2013 10:17:42 +0000 (12:17 +0200)]
Bump LIBUSBX_API_VERSION for new hotplug API
And document the minimum version under which hotplug is supported
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Nathan Hjelm [Thu, 29 Nov 2012 23:14:03 +0000 (16:14 -0700)]
Add hotplug support to the Linux backend.
There are two ways to configure hotplug support for Linux: udev, and netlink. It
is strongly recommened that udev support is used on systems that utilize udev.
We reenforce this recommendation by defaulting to --with-udev=yes at configure
time. To enable netlink support run configure with --with-udev=no. If udev
support is enabled all device enumeration is done with udev.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Nathan Hjelm [Thu, 29 Nov 2012 23:13:00 +0000 (16:13 -0700)]
Add hotplug support to the Darwin backend.
Hotplug events are handled by the async event thread. This thread listens for
two events: kIOTerminatedNotification, and kIOFirstMatchNotification. If
either of these events fires the thread will iterate through the appropriate
iterator and will either enumerate or call usbi_disconnect_device depending
on the event.
While adding hotplug support it was discovered that when reading from the IO
registry we need to use kCFNumberSInt32Type for the device location. Using
kCFNumberLongType would cause locations to be sign-extended and not match
what is stored for the session id. This is now fixed.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Nathan Hjelm [Thu, 29 Nov 2012 21:23:26 +0000 (14:23 -0700)]
Add hotplug support.
The internal API is changing as follows:
- Adding two new functions. usbi_connect_device, and usbi_disconnect_device.
Backends must call these functions to add them to the context's device list
at one of two places: initial enumeration (done at init), and on device
attach and removal. These functions need to be called once per context.
- Backends that support hotplug should not provide a get_device_list funtion.
This function is now deprecated and will likely be removed once all backends
support hotplug.
The external API is changing as follows:
- Two new functions have been added to register and deregister callbacks for
hotplug notification: libusb_hotplug_register_callback(),
libusb_hotplug_deregister_callback(). Hotplug callbacks are called by
libusb_handle_events(). Details of the new API can be found in libusb.h.
- A new capability check has been added to check for hotplug support. See
LIBUSB_CAP_HAS_HOTPLUG.
Aa suggested by Xiaofan add new example has been added to show how to use
the new external hotplug API. See examples/hotplugtest.c.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Pete Batard [Wed, 15 May 2013 08:21:16 +0000 (10:21 +0200)]
Fixup .gitignore for examples and tests now living in subdirs
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Nathan Hjelm [Thu, 29 Nov 2012 20:53:41 +0000 (13:53 -0700)]
Core: Cache device descriptors in the core
Discussion: It is necessary to cache the device descriptor in the core to
support reading the descriptors after a device is disconnected. We could
either 1) allow each backend to handle this caching (which would most
certainly duplicate code), or 2) cache the descritors when a device
is added. This patch does the later.
Further discussion: It might be beneficial to cache more than just the
device descriptors in the core. It might also be worthwhile caching the
configuration and BOS descriptors as well.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Nathan Hjelm [Sun, 30 Sep 2012 17:49:01 +0000 (11:49 -0600)]
Core: Keep a list of contexts created by libusb_init()
* This list can be used by backends to determine which contexts
need notification of device removal (and in the future device arrival).
The active_contexts_list is protected from multiple access by the active_contexts_lock.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Tue, 23 Apr 2013 08:46:32 +0000 (10:46 +0200)]
libusb.h: Correct errors in doxygen comment for struct libusb_device
The comment refers to the non-existing libusb_device_ref and
libusb_device_unref functions, this should be libusb_ref_device resp.
libusb_unref_device.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Toby Gray [Tue, 16 Apr 2013 14:22:14 +0000 (15:22 +0100)]
WinCE: Include COPYING and license information in binary snapshots.
Pete Batard [Mon, 15 Apr 2013 22:15:10 +0000 (23:15 +0100)]
libusbx-1.0.15
Pete Batard [Sun, 14 Apr 2013 21:38:52 +0000 (22:38 +0100)]
Samples: Fix timeout error on FX3 and logging improvements for fxload
* Add a specific ezusb_fx3_jump() that handles timeout as a non-error
This is required as a successful jump call makes the device disconnect from the bus
* Set default verbosity to 1 and adjust some messages' verbosity level
* Add a new -q option to decrease verbosity
* Add readout of the bootloader version for FX3 devices
* Filter the image types actually supported for FX3
* Fix the "errcode shadows a global variable" warning on some systems
Toby Gray [Thu, 11 Apr 2013 12:40:31 +0000 (13:40 +0100)]
Windows: Correctly clear backend transfer private information
* Without this fix if a transfer is reused then there is a period of
time between it being adding to the flying transfer list and
submitted where the fd value will be the old fd value.
* If this occurs at the same time as all of the following conditions
then the incorrect transfer will be handled as having completed:
* The old fd value in the reused transfer has been recycled for a
currently pending transfer.
* This other pending transfer has a later timeout than the reused
transfer (so therefore comes later in the flying transfer list).
* The other pending transfer completes, therefore signalling the fd.
As the flying transfer list is examined in order when handling events,
the resubmitted transfer with the old fd value will be considered as
completed. This will generally cause a NULL pointer dereference as the
OVERLAPPED structure was already freed.
Also see:
http://libusbx.1081486.n5.nabble.com/Libusbx-devel-PATCH-Fix-NULL-pointer-dereference-in-Windows-and-WinCE-backends-when-reusing-transfers-tt1041.html
Toby Gray [Thu, 4 Apr 2013 12:32:31 +0000 (13:32 +0100)]
WinCE: Add internal build script for WinCE binaries
* Also copy over .pdb for WinCE and WDK generated DLLs
Toby Gray [Thu, 4 Apr 2013 12:33:20 +0000 (13:33 +0100)]
WinCE: Fix x86 build on Visual Studio 2005
Pete Batard [Thu, 4 Apr 2013 18:03:15 +0000 (19:03 +0100)]
libusbx 1.0.15-rc3
Nathan Hjelm [Thu, 4 Apr 2013 20:51:03 +0000 (14:51 -0600)]
OS X: Don't try to work around buggy devices with bInterval = 0 on isochronous...
Ludovic Rousseau [Thu, 4 Apr 2013 16:08:39 +0000 (18:08 +0200)]
Core: fix bug in libusb_has_capability()
The problem was detected by clang on Mac OS X:
warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
note: use '&' for a bitwise operation
We want to use a bitwise operation and not a logical operation.
Pete Batard [Wed, 3 Apr 2013 18:49:10 +0000 (19:49 +0100)]
libusbx 1.0.15-rc2
Nathan Hjelm [Wed, 3 Apr 2013 10:12:47 +0000 (04:12 -0600)]
OS X: Don't assume an interval of 1
Toby Gray [Wed, 3 Apr 2013 11:02:50 +0000 (12:02 +0100)]
WinCE: Fix missing sources from dist tarball
Pete Batard [Tue, 2 Apr 2013 18:52:16 +0000 (19:52 +0100)]
libusbx 1.0.15-rc1
* Also fix missing header in release tarball
Pete Batard [Sun, 17 Mar 2013 22:13:53 +0000 (22:13 +0000)]
Core: Add HID and kernel detach capability detection for all backends
* Also remove Linux special case from xusb sample.
* Note that LIBUSBX_API_VERSION is incremented as a result of
libusb_has_capability() returning nonzero rather than 1 when
a capability is supported.
* A LIBUSB_CAP_HAS_HOTPLUG is also added, though it is currently
not implemented on any platform
* Closes #102
Toby Gray [Fri, 22 Mar 2013 13:50:01 +0000 (13:50 +0000)]
Windows: Fix USB descriptor creation code for HID devices
* Prior to this fix the location for the next endpoint structure was
obtained by using ed++. This doesn't work as
sizeof(libusb_endpoint_descriptor) is greater than
LIBUSB_DT_ENDPOINT_SIZE due to extra members.
* Closes #110
Pete Batard [Sat, 16 Mar 2013 23:36:47 +0000 (23:36 +0000)]
Samples: More fxload improvements and cleanup
* Type detection when bus,addr is specified
* Improved check for FX3 image header
* Switch back to using -p for bus,addr and use a comma to
match the output of listdevs
Pete Batard [Sat, 16 Mar 2013 16:39:14 +0000 (16:39 +0000)]
Tests: Suppress Visual Studio 2012 Code Analysis warnings
Ludovic Rousseau [Fri, 15 Mar 2013 08:35:16 +0000 (09:35 +0100)]
Samples: fix compiler warning
Make fx3_load_ram a static function.
ezusb.c:534: warning: no previous prototype for ‘fx3_load_ram’
Federico Manzan [Sun, 10 Mar 2013 07:56:56 +0000 (07:56 +0000)]
Samples: fxload improvements and cleanup
* fix C++ compilation
* use stdint types
* allow to specify bus:address as a parameter
* allocate a buffer when transferring FX3 image and check for R/W errors
Vegard Storheil Eriksen [Tue, 12 Mar 2013 15:30:05 +0000 (23:30 +0800)]
OS X: Do not assume HS when submitting isochronous transfer
* Closes #99
Nathan Hjelm [Tue, 12 Mar 2013 15:09:07 +0000 (23:09 +0800)]
OS X: Use kCFNumberSInt32Type when reading device location from the IO registry
* Closes #97
Pete Batard [Tue, 12 Mar 2013 01:26:08 +0000 (01:26 +0000)]
Windows: Fix multiple warnings
* Most of these warnings are false positive from VS2012's "Run Code Analysis"
* Also closes #98: "windows_usb.c:376:30: 'dev_info' may be used uninitialized"
Federico Manzan [Sun, 10 Mar 2013 21:00:00 +0000 (21:00 +0000)]
Samples: Add FX3 firmware upload support for fxload
Hans de Goede [Thu, 7 Mar 2013 11:44:00 +0000 (11:44 +0000)]
Linux: Consume all events on a fd in one go
* This fixes libusb_handle_events_timeout() only handling one event
* Closes #6
Pete Batard [Mon, 4 Mar 2013 21:52:27 +0000 (21:52 +0000)]
Samples: Reinstate interface requests when querying WCID devices
* Reverts commit
939a4782b28c36dfddb68585c4b027a4d5494a5b.
* Closes #96
Pete Batard [Sun, 3 Mar 2013 00:56:06 +0000 (00:56 +0000)]
WinCE: Post integration cleanup
* Update copyrights and switch to UTF-8 everywhere
* Add SleepEx() to missing.h, and move include to libusbi.h
* Remove ifdef for GetSystemTimeAsFileTime()
Pete Batard [Wed, 27 Feb 2013 22:58:49 +0000 (22:58 +0000)]
Misc: Simplify includes and misc. cleanup
* fxload sample provenance
* No need for <sys/types.h> in samples as already in libusb.h
* Don't bother about sscanf_s in xusb
* Use HAVE_### and rely on config.h where possible
* Formal inclusion of <winsock.h> in libusb.h for WinCE and WDK
* Cleanup of Windows' config.h
* Avoid ENAMETOOLONG and ENOTEMPTY conflict between errno.h and winsock.h for WinCE
* Additional newlines & braces cleanup
Xiaofan Chen [Sun, 24 Feb 2013 05:50:00 +0000 (05:50 +0000)]
Tests: Fix broken OS-X and Linux builds
* _dup2 is Windows only. Use dup2 instead
* Breakage was introduced in
76eecc6ce11d1bedee369859899901037dcd4cc2
Simon Haggett [Thu, 21 Feb 2013 16:59:00 +0000 (16:59 +0000)]
WinCE: Don't confirm protocol stalls with device in wince_transfer_callback()
When wince_transfer_callback() observes a stall (io_result set to
ERROR_NOT_SUPPORTED), it checks with the device (by sending a GET_STATUS
control transfer) that the endpoint is really stalled. This check is not
suitable for protocol stalls as these are always cleared at the start of the
next control transfer. When a protocol stall occurs, wince_transfer_callback()
observes that the corresponding control endpoint does not remain stalled and so
forces io_result to ERROR_SUCCESS. This then prevents applications from
detecting that a control request was not supported by the device.
This patch prevents wince_transfer_callback() from attempting to confirm
protocol stalls with the device, allowing io_result to remain set to
ERROR_NOT_SUPPORTED. A couple of comments and a debug log message within
wince_transfer_callback() are also corrected.
Pete Batard [Thu, 21 Feb 2013 00:24:18 +0000 (00:24 +0000)]
Tests: Simplify stdout redirection and fix Windows assertion error on cleanup
* cleanup_test_output() produced an assertion error when compiled with MSVC
due to closing ctx->output_file
* set ctx->output_file to stdout by default
Pete Batard [Thu, 21 Feb 2013 00:11:37 +0000 (00:11 +0000)]
Windows: Don't duplicate paths for HID interfaces
* This caused the many_device_lists to fail after 32 iterations
* Closes #69
Pete Batard [Mon, 18 Feb 2013 22:22:01 +0000 (22:22 +0000)]
Windows: Fix broken WDK compilation
*
790ffc78b008a03c95d10899f53997b504f55c72 moved the inclusion of poll_windows.h
after the use of struct timeval, which removed the hidden winsock.h include
where timeval is defined on the WDK.
* Make the winsock.h include explicit
Ludovic Rousseau [Mon, 18 Feb 2013 19:29:41 +0000 (20:29 +0100)]
Windows: fix compiler warning
libusb/os/threads_windows.c:139:1: warning: '__inline' is not at beginning of declaration [-Wold-style-declaration]
Ludovic Rousseau [Mon, 18 Feb 2013 19:26:46 +0000 (20:26 +0100)]
Windows: fix compiler warning
libusb/os/threads_windows.c: In function 'usbi_cond_timedwait':
libusb/os/threads_windows.c:190:2: warning: nested extern declaration of 'epoch_time' [-Wnested-externs]
Ludovic Rousseau [Sat, 16 Feb 2013 16:23:36 +0000 (17:23 +0100)]
Windows: fix compiler warning
sizeof() returns a size_t not an int
libusb/os/windows_usb.c:1411:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
libusb/os/windows_usb.c:1416:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Ludovic Rousseau [Sat, 16 Feb 2013 16:07:53 +0000 (17:07 +0100)]
Windows: fix compiler warnings
libusb/os/windows_usb.c:1317:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
libusb/os/windows_usb.c:1317:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
libusb/os/windows_usb.c:1317:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
libusb/os/windows_usb.c:3634:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
libusb/os/windows_usb.c:3634:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
libusb/os/windows_usb.c:3634:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
Ludovic Rousseau [Sat, 16 Feb 2013 16:04:59 +0000 (17:04 +0100)]
Windows: remove useless extern declaration
libusb/os/windows_usb.c:45:13: warning: redundant redeclaration of 'usbi_fd_notification' [-Wredundant-decls]
libusb/libusbi.h:420:6: note: previous declaration of 'usbi_fd_notification' was here
Ludovic Rousseau [Sat, 16 Feb 2013 16:02:40 +0000 (17:02 +0100)]
Windows: fix compiler warnings
libusb/os/windows_usb.c:368:36: warning: no previous prototype for 'get_interface_details_filter' [-Wmissing-prototypes]
libusb/os/windows_usb.c:691:5: warning: no previous prototype for 'get_sub_api' [-Wmissing-prototypes]
libusb/os/windows_usb.c:1179:6: warning: no previous prototype for 'get_api_type' [-Wmissing-prototypes]
Ludovic Rousseau [Sat, 16 Feb 2013 16:00:32 +0000 (17:00 +0100)]
Windows: remove unused function
libusb/os/poll_windows.c:223:13: warning: 'reset_overlapped' defined but not used [-Wunused-function]
Ludovic Rousseau [Sat, 16 Feb 2013 15:58:17 +0000 (16:58 +0100)]
Windows: fix compiler warnings
libusb/os/poll_windows.c:176:5: warning: no previous prototype for '_fd_to_index_and_lock' [-Wmissing-prototypes]
libusb/os/poll_windows.c:197:13: warning: no previous prototype for 'create_overlapped' [-Wmissing-prototypes]
libusb/os/poll_windows.c:211:6: warning: no previous prototype for 'free_overlapped' [-Wmissing-prototypes]
libusb/os/poll_windows.c:223:6: warning: no previous prototype for 'reset_overlapped' [-Wmissing-prototypes]
libusb/os/poll_windows.c:401:6: warning: no previous prototype for '_free_index' [-Wmissing-prototypes]
Ludovic Rousseau [Wed, 17 Oct 2012 16:01:59 +0000 (18:01 +0200)]
Examples: Fix compiler warning
examples/ezusb.c:251:9: warning: implicit conversion loses integer precision: 'unsigned long' to 'unsigned int' [-Wshorten-64-to-32]
off = strtoul(buf+3, NULL, 16);
~ ^~~~~~~~~~~~~~~~~~~~~~~~
Ludovic Rousseau [Sat, 13 Oct 2012 18:22:49 +0000 (20:22 +0200)]
Core: Fix compiler warning
libusb/io.c:1877:35: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
timeout_ms = (tv->tv_sec * 1000) + (tv->tv_usec / 1000);
~ ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
On Mac OS X tv_sec is a __darwin_time_t which is a long, not an int.
Sean McBride [Wed, 31 Oct 2012 15:09:31 +0000 (11:09 -0400)]
Use "" instead of <> for internal includes
some libusbx include files were included with angle brackets, changed to
quotes. Needed to work better in Xcode project
Toby Gray [Wed, 13 Feb 2013 15:21:52 +0000 (15:21 +0000)]
Windows: Update transferred data on timeout or cancel.
* When handling aborted transfer it's possible that some data (but not
the full buffer) was transferred.
* This change ensures that this partially transferred data is recorded
and passed up to the caller.
Hans de Goede [Mon, 11 Feb 2013 15:21:00 +0000 (15:21 +0000)]
Linux: Don't set the USBFS_URB_SHORT_NOT_OK flag on the last urb
* Closes #142
Pete Batard [Sat, 2 Feb 2013 01:02:18 +0000 (01:02 +0000)]
Windows: Improve error reporting in winusbx_claim_interface()
* After the filter detection code is run, the error reported may
have nothing to do with the original error (or report SUCCESS)
and is unhelpful
* Also change TODO comments to default VS2012 task style
Benjamin Dobell [Fri, 1 Feb 2013 14:42:06 +0000 (01:42 +1100)]
Windows: Fixed bug in interface autoclaim
* Bug was introduced in
f2b19e4a32c1445f4fea06beca61e8c7e7757950
* Closes #78
* Closes #80
Ludovic Rousseau [Fri, 26 Oct 2012 08:02:16 +0000 (10:02 +0200)]
Core: Fix warning implicit conversion changes signedness
* Closes #70
Zoltán Kovács [Tue, 29 Jan 2013 00:14:29 +0000 (00:14 +0000)]
Core: Don't wait for completion if cancel_transfer failed
* See http://libusbx.1081486.n5.nabble.com/Libusbx-devel-libusb-interrupt-transfer-does-not-return-in-case-of-error-td626.html
* Closes #76
Pete Batard [Mon, 28 Jan 2013 23:51:53 +0000 (23:51 +0000)]
Windows: Display error code in default case of windows_transfer_callback
Toby Gray [Wed, 16 Jan 2013 02:10:31 +0000 (02:10 +0000)]
WinCE: Add support for WinCE (Solution files)
Toby Gray [Wed, 16 Jan 2013 02:07:29 +0000 (02:07 +0000)]
WinCE: Add support for WinCE (sources)
Toby Gray [Tue, 15 Jan 2013 22:46:49 +0000 (22:46 +0000)]
Windows: Simplify poll_windows and add provisions for WinCE
* Because poll_windows now requires struct usbi_transfer to be
defined, it's inclusion in libusbi.h had to be moved down.
Toby Gray [Tue, 15 Jan 2013 22:36:47 +0000 (22:36 +0000)]
Windows: Add windows_common.h header
* This file contains definition that will be shared between the
Windows and Windows CE backends
Pete Batard [Tue, 15 Jan 2013 22:24:32 +0000 (22:24 +0000)]
Core: Use HAVE_SYS_TYPES_H and HAVE_SIGNAL_H
* These files may not be available on all platforms (eg. WinCE)
Роман Донченко [Fri, 21 Dec 2012 23:08:09 +0000 (03:08 +0400)]
Core: Filter out 8-bit characters in libusb_get_string_descriptor_ascii
* Closes #68
Pete Batard [Mon, 7 Jan 2013 22:00:47 +0000 (22:00 +0000)]
Windows: Add VS2012 solution files
* As well as try to clean up MS's MSVC mess...
Toby Gray [Mon, 26 Nov 2012 13:25:05 +0000 (13:25 +0000)]
Core: Fix incorrect reference counting of default context when first created.
* See http://libusbx.1081486.n5.nabble.com/Libusbx-devel-stress-program-crashes-in-libusb-exit-NULL-tp474p477.html
Toby Gray [Wed, 21 Nov 2012 14:00:31 +0000 (14:00 +0000)]
Tests: Add libusbx stress test
See https://github.com/tobygray/libusbx/tree/testing as well
as http://libusbx.1081486.n5.nabble.com/Libusbx-devel-Crashes-tt433.html#a438
Peter Stuge [Tue, 23 Oct 2012 00:15:23 +0000 (00:15 +0000)]
Autotools: Carry over 2012.10.23 libusb changes
* Use LIBS instead of PC_LIBS_PRIVATE
* Move THREAD_CFLAGS & VISIBILITY_CFLAGS into AM_CFLAGS
* Use AC_SEARCH_LIBS(clock_gettime) for pthreads on Linux
Peter Stuge [Tue, 30 Oct 2012 00:11:41 +0000 (00:11 +0000)]
Core: Avoid short read failures on broken descriptors
* See http://marc.info/?t=
135132844600001&r=1&w=2
Sean McBride [Thu, 8 Nov 2012 19:02:06 +0000 (19:02 +0000)]
Darwin: kAppleVendorID is not in the 10.5 SDK
* Use kIOUSBVendorIDAppleComputer instead
Nathan Hjelm [Wed, 31 Oct 2012 22:54:07 +0000 (22:54 +0000)]
Darwin: Clean up tabs
* Closes #55
Nathan Hjelm [Tue, 2 Oct 2012 14:07:03 +0000 (08:07 -0600)]
Darwin: Add support for detecting superspeed devices
* IOUSBFamily 5.0.0 or newer
Nathan Hjelm [Sat, 29 Sep 2012 04:13:09 +0000 (22:13 -0600)]
Darwin: Use Release instead of IODestroyPlugInInterface
* This avoids stopping IOServices associated with a device
* Closes #54
Nathan Hjelm [Sat, 29 Sep 2012 03:18:36 +0000 (21:18 -0600)]
Darwin: Don't retry or unsuspend Apple devices during enum
Nathan Hjelm [Sat, 29 Sep 2012 03:18:08 +0000 (21:18 -0600)]
Darwin: Reduce attempts to retrieve a device descriptor during enumeration
Sean McBride [Thu, 25 Oct 2012 18:51:50 +0000 (14:51 -0400)]
Core: Use offsetof() instead of null pointer tricks
Closes #53
Pete Batard [Mon, 29 Oct 2012 23:41:23 +0000 (23:41 +0000)]
Windows: Fix access for composite HID devices
* composite_open was only catering for interfaces with WinUSB-like
drivers and did not properly initialize HID driven ones
* Issue reported by Stefano Di Martino
Ludovic Rousseau [Fri, 12 Oct 2012 21:28:51 +0000 (23:28 +0200)]
All: Use "" instead of <> for local includes
System header files are used with #include <foo.h>
Xcode can't find local headers using this syntax.
Pete Batard [Wed, 3 Oct 2012 22:52:16 +0000 (23:52 +0100)]
Windows: Fix early abort in libusb_close
* We're calling winusbx_close with SUB_API_NOTSET, so
we should attempt to initialize it first.
* Issue reported by Ramon Zambelli and Frank Hibbeln
Pete Batard [Mon, 24 Sep 2012 23:35:32 +0000 (00:35 +0100)]
libusbx-1.0.14
Pete Batard [Thu, 20 Sep 2012 20:58:04 +0000 (21:58 +0100)]
libusbx-1.0.13
Pete Batard [Wed, 19 Sep 2012 21:22:24 +0000 (22:22 +0100)]
Internal: Add fxload exe and sources to the Windows binary snapshot
Pete Batard [Tue, 18 Sep 2012 20:35:23 +0000 (21:35 +0100)]
Misc: Update copyrights, TODO and libusb_version.describe
* Changes suggested by Chuck Cook & Xiaofan Chen
Pete Batard [Sun, 16 Sep 2012 15:24:24 +0000 (16:24 +0100)]
libusbx 1.0.13-rc2
* Also update NEWS with regards to isoc support for the 0/K Windows drivers
Pete Batard [Sun, 16 Sep 2012 15:19:54 +0000 (16:19 +0100)]
Doc: Fix doxygen warnings and issues
* Remove obsolete tags
* Use QUIET = yes to make issues more prominent
* Fix code display for LIBUSBX_API_VERSION and missing parameter
documentation for libusb_get_port_path()
* Most of the above suggested by Ludovic Rousseau
Pete Batard [Sun, 16 Sep 2012 15:11:10 +0000 (16:11 +0100)]
Misc: Fix missing files from dist package
Pete Batard [Sat, 15 Sep 2012 23:16:06 +0000 (00:16 +0100)]
libusbx 1.0.13-rc1
Pete Batard [Sat, 15 Sep 2012 22:57:21 +0000 (23:57 +0100)]
Core: Introduce LIBUSBX_API_VERSION macro
* This macro can be used to detect if the version of libusbx being
compiled against has a specific API feature, as well as to detect
whether compilation occurs against libusb or libusbx.
Hans de Goede [Sat, 15 Sep 2012 10:31:00 +0000 (11:31 +0100)]
Core: Make libusb_error_name also handle transfer status codes
Note that for the code 0 which means success resp. completed we have an
overlap in the codes. This is not a problem since normally one would not
call libusb_error_name on success / normal completion.
Ludovic Rousseau [Sat, 15 Sep 2012 08:18:50 +0000 (10:18 +0200)]
Samples: Fix compiler warnings in fxload
ezusb.c: In function "ezusb_cpucs"
ezusb.c:163: warning: initialization discards qualifiers from pointer target type
ezusb.c: At top level:
ezusb.c:193: warning: no previous prototype for "parse_ihex"
ezusb.c:340: warning: no previous prototype for "parse_bin"
ezusb.c:377: warning: no previous prototype for "parse_iic"
ezusb.c: In function "ram_poke":
ezusb.c:451: warning: enumeration value "_undef" not handled in switch
ezusb.c:491: warning: passing argument 2 of "ezusb_write" discards qualifiers from pointer target type
Pete Batard [Wed, 5 Sep 2012 23:47:08 +0000 (00:47 +0100)]
Core: Update libusb.h header in accordance with the latest USB specs
* IMPORTANT: This update fixes a typo in the API where MaxPower was being
used instead of bMaxPower, with the latter being what is actually in
the specs.
* As a result, applications that were using MaxPower need to be updated
for bMaxPower.
* If you must maintain compatibility with libusb or older versions of
libusbx, you may also want to either use a #define or copy/paste
struct libusb_config_descriptor from libusb.h under a new name, and
then use a cast on calls that require it. For more info, see the
1.0.13 release notes in the NEWS file.
* Also update copyright notice
Ludovic Rousseau [Thu, 13 Sep 2012 13:50:43 +0000 (15:50 +0200)]
Samples: Display VID:PID of the tested device in xusb
* Also amend the wording of the "no option" comment.
* Closes #42
Pete Batard [Thu, 13 Sep 2012 23:10:57 +0000 (00:10 +0100)]
Windows: Switch to ALLOW_PARTIAL_READS pipe policy enabled by default
* This avoids an issue when libusbK is used for bulk transfers, which
is most likely due to a libusbK bug
* See https://sourceforge.net/mailarchive/message.php?msg_id=
29736015
Pete Batard [Tue, 11 Sep 2012 00:01:07 +0000 (01:01 +0100)]
Samples: Add fxload sample for Cypress EZ-USB chips
* This program was modified from the original fxload at:
http://linux-hotplug.sourceforge.net to add libusbx
as well as non HEX images support.
* Only supports RAM upload for now, with EEPROM and FX3
support to be added at a later stage.
Hans de Goede [Wed, 12 Sep 2012 01:03:47 +0000 (02:03 +0100)]
All: Avoid polluting errors reported on device disconnect
* Makes libusb_cancel_transfer not log an error when the cancel fails
with LIBUSB_ERROR_NO_DEVICE, so that apps can properly clean things
up on device disconnect without flooding the console with these errors.
* Also, some devices (Cypress FX) may switch VID:PID on the fly during
firmware upload => reduce severity of the Windows message when that happens.
Pete Batard [Mon, 10 Sep 2012 23:17:39 +0000 (00:17 +0100)]
Doc: Update logging documentation regarding stderr usage