Age | Commit message (Collapse) | Author | Files | Lines |
|
* Also update xusb sample to use these levels
|
|
* Adds libusb_get_port_number, libusb_get_parent and libusb_get_port_path
* Linux implementation provided by Alan Stern, OS X by Nathan Hjelm
* Unsupported for *BSD platforms
|
|
* Also remove extra lines at the end of samples
|
|
* By default automake looks for a source file foo.c for a foo binary.
|
|
* Similar to libusb patch a129732fb45fc424743f26f01c906e4514f11521
|
|
* While both should work, __linux__ seems to be preferred and
what we use in threads_posix.c
* Also fix a typo in .private/README.txt
|
|
* Without this, OpenBSD produces the following warning:
strcat() is almost always misused, please use strlcat()
|
|
* As per MS documentation, querying of the Extended Properties
is a device request (0xC0), not an interface one (0xC1), so
there is no issue with the WinUSB wIndex override.
|
|
xusb.c: In function ‘test_device’:
xusb.c:722:2: warning: enumeration value ‘USE_GENERIC’ not handled in switch [-Wswitch-enum]
|
|
Fixes:
warning: function ‘perr’ can never be inlined because it uses variable argument lists [-Winline]
warning: inlining failed in call to ‘perr’: function not inlinable [-Winline]
|
|
xusb.c: In function ‘read_ms_winsub_feature_descriptors’:
xusb.c:542: warning: initialization discards qualifiers from pointer target type
xusb.c:543: warning: initialization discards qualifiers from pointer target type
xusb.c: In function ‘test_device’:
xusb.c:598: warning: initialization discards qualifiers from pointer target type
xusb.c:598: warning: initialization discards qualifiers from pointer target type
xusb.c:598: warning: initialization discards qualifiers from pointer target type
xusb.c:599: warning: initialization discards qualifiers from pointer target type
xusb.c:599: warning: initialization discards qualifiers from pointer target type
|
|
xusb.c:139: warning: no previous prototype for ‘display_buffer_hex’
xusb.c:169: warning: no previous prototype for ‘display_ps3_status’
xusb.c:260: warning: no previous prototype for ‘display_xbox_status’
xusb.c:281: warning: no previous prototype for ‘set_xbox_actuators’
xusb.c:299: warning: no previous prototype for ‘send_mass_storage_command’
xusb.c:354: warning: no previous prototype for ‘get_mass_storage_status’
xusb.c:401: warning: no previous prototype for ‘get_sense’
xusb.c:431: warning: no previous prototype for ‘test_mass_storage’
xusb.c:530: warning: no previous prototype for ‘read_ms_winsub_feature_descriptors’
xusb.c:583: warning: no previous prototype for ‘test_device’
|
|
* Also some formatting/typo improvements
|
|
The OpenBSD C compiler generates a warning for every use of sprintf()
and for a good reason. Reported in http://marc.info/?m=133376187514495
Reported-by: Xiaofan Chen <xiaofanc@gmail.com>
|
|
* Mentions of 'libusb' in doxygen are changed to 'libusbx'
* Also update copyright notices and remove unneeded EOF LFs
|
|
* Also remove trailing whitespaces
|
|
* Remove the use of os_fd[i].recipient and alter comments with
regards to Windows Extended Props test limitations with WinUSB
|
|
* Also improvements to WDK build scripts:
cd to original dir on error, use 2 cores if available
|
|
This is intended to reduce confusion with the much more significant
lsusb utility which is part of the usbutils package.
|
|
Previous _LDFLAGS included both the freshly built libusb in ../libusb
and -lusb-1.0, where libtool would usually resolve the latter to an
already-installed libusb library in the system. The extra reference
to a second libusb library resulted in failure to build examples on
Mac OS X in some cases, and is plain wrong.
See also the thread at http://marc.info/?m=132637593623667
|
|
Compiling with gcc-4.6 results in the following warnings:
os/linux_usbfs.c: In function 'op_get_configuration':
os/linux_usbfs.c:1144:6: warning: variable 'r' set but not used ...
os/linux_usbfs.c: In function 'op_handle_events':
os/linux_usbfs.c:2091:40: warning: 'status' may be used uninitialized ...
os/linux_usbfs.c:2044:6: note: 'status' was declared here
dpfp.c: In function 'save_to_file':
dpfp.c:228:9: warning: variable 'ignore' set but not used ...
dpfp_threaded.c: In function 'save_to_file':
dpfp_threaded.c:257:9: warning: variable 'ignore' set but not used ...
This patch fixes these. (The second comes from handle_control_completion()
which gcc seems to inline into op_handle_events().)
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[stuge: Add fixes for dpfp examples and update source references]
|
|
|
|
The libusb-1.0 directory name belongs in the compile command, e.g.
via pkg-config --cflags. Fixes #58.
|
|
|
|
Under Windows, a variety of compilers and configurations are available,
meaning that the manner of parameter passing (e.g. registers vs stack)
can vary.
Match the Windows API calling convention and document this appropriately.
This calling convention will be used regardless of the configuration of
the user's development platform.
The only user-level complication is that all functions used as libusb
callbacks must use the same calling convention as libusb. The
LIBUSB_CALL macro is provided to make this easy.
Signed-off-by: Michael Plante <michael.plante@gmail.com>
Signed-off-by: Pete Batard <pbatard@gmail.com>
[dsd: slight change of strategy, add documentation]
|
|
|
|
It's not available on MinGW.
|
|
|
|
This prepares for a Windows backend without dependency on pthreads-w32.
pthread_* is renamed to usbi_* and PTHREAD_* to USBI_*.
A usbi_mutex_static_t and usbi_mutex_static_lock() and _unlock() are
introduced for statically initialized mutexes, since they may be
implemented using other types when pthreads mutexes aren't used.
Move -pthread from libusb/Makefile.am to host-specific THREAD_CFLAGS in
configure.ac. This will enable optional use of -lpthread for cygwin.
[dsd: minor tweaks, and roll in a change based on patches from Pete
Batard to only build dpfp_threaded example when we're using pthreads]
|
|
lsusb.c:26: warning: no previous prototype for ‘print_devs’
|
|
Suggested by David Zeuthen. This allows multiple libraries in the same
process to independently use libusb without interfering.
|
|
This involved moving from select() to poll() because there is no way to
distinguish usbfs's POLLERR condition with select().
|
|
libusb no longer caches descriptors in libusb_device but backends are
intended to be able to provide copies from memory. In the common linux
case we can use sysfs.
|
|
|
|
It was documented to return the list length, but was returning 0.
|
|
|
|
This wasn't a particularly nice API. Cancellation should be handled by
the completion handler.
|
|
|
|
Make it clear that apps should not mess with these structures
|
|
|
|
Due to variable-sized structures, this involved changing allocation
mechanism. All transfers must now be allocated and freed through
libusb.
A synchronous function is missing, and I could do with writing a few
more helper functions to simplify things.
|
|
Hopefully mostly complete. Some constants were renamed and move into
enums.
|
|
This also includes a libusb_get_pollfds API change
|
|
|
|
Transfer length can be inferred from the setup packet.
|
|
Rename API away from "devh" and fix implementation to match header
|
|
Based on feedback from Tim Roberts
|
|
No need to provide the device here.
|
|
|
|
Leads to some hefty API changes. Now we're much more similar to the
Linux kernel model.
Problems with dealing with asynchronous control transfers are passed
on to the user, basically you must allocate a buffer, start with the
setup, and put the data after. This won't make much sense until
documented (soon...)
|