| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
What better way to show how useful libusb_set_auto_detach_kernel_driver() is,
then to use it in our examples?
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds the much requested libusb_strerror() function, taking into
account all issues people raised wrt previous attempts.
Criteria / Decisions underlying this implementation:
- Must support translated messages
- Must not use gettext as that does not work well in combination with Windows
(when building with Visual C, or for Windows CE)
- API compatible with FreeBSD and various patched libusb-s floating around
- KISS:
- Do not add any (other) library dependencies
- Do not try to deal with message encodings (iconv), simply always return UTF-8
making encoding the problem of the application using libusb_strerror.
- Defaults to English, so apps which don't want translated messages,
don't need to do anything special
- Defaults to English (with pure ASCII messages), so apps which don't
call libusb_setlocale() don't need to worry about encoding
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Copied with the author's permission under LGPL-2.1 from
usb-benchmark-project/host/benchmark.c in
git://git.gnumonks.org/sam3u-tests.git commit
74959f7ee88f1597286cd435f312a8ff52c56b7e
http://git.gnumonks.org/cgi-bin/gitweb.cgi?p=sam3u-tests.git;a=blob;f=usb-benchmark-project/host/benchmark.c;h=74959f7ee88f1597286cd435f312a8ff52c56b7e
An Atmel SAM3U test firmware is also available in the above repository.
Conflicts:
.gitignore
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
| |
Based on earlier work done on this by Maya Erez <merez@codeaurora.org>,
Nathan Hjelm <hjelmn@me.com> and Pete Batard <pete@akeo.ie>.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
| |
Based on earlier work done on this by Maya Erez <merez@codeaurora.org>,
Nathan Hjelm <hjelmn@me.com> and Pete Batard <pete@akeo.ie>.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
| |
While at it also simplify the path printing in listdevs
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
| |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
Make fx3_load_ram a static function.
ezusb.c:534: warning: no previous prototype for ‘fx3_load_ram’
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
| |
* Reverts commit 939a4782b28c36dfddb68585c4b027a4d5494a5b.
* Closes #96
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
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);
~ ^~~~~~~~~~~~~~~~~~~~~~~~
|
| |
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
| |
System header files are used with #include <foo.h>
Xcode can't find local headers using this syntax.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
* Also amend the wording of the "no option" comment.
* Closes #42
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* update and fix usage details
* make topology and speed printout optional (option -i)
* remove unneeded option -g
|
| |
|
|
|
|
|
|
|
|
|
| |
* The LOG_LEVEL_ enums, that were moved to the public API
in 933a319469bcccc962031c989e39d9d1f44f2885 may conflict
with applications/headers that also define their own
LOG_LEVEL_ values internally.
* As a matter of fact, as per Trac #31, this produces a
conflict with libusb-compat, as it defines its own levels.
|
|
|
|
|
|
|
|
|
|
| |
* http://sourceforge.net/mailarchive/message.php?msg_id=29418038
* core.c:700:4: warning: Function call argument is an uninitialized value
* darwin_usb.c:1713:11: warning: Access to field 'cfSource' results in a
dereference of a null pointer (loaded from variable 'hpriv')
* sync.c/dpfp.c/dpfp_threaded.c: warning: Result of 'malloc' is converted
to a pointer of type 'unsigned char', which is incompatible with sizeof
operand type
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The library is now compiled with warning level 4 for VS2010
* Move silencing of 4200, 28125 and 28719 to msvc/config.h
* Add fixes in core to silence unused variables warnings
* Ensure that spinlock is always set interlocked in poll_windows
* Add missing check for calloc return value
* Fix data assignation in conditionals warnings
* Fix an OACR/Prefast error related to the use of strncpy in xusb.c
* Also fixes whitespace inconsistencies in core
* Issues reported by Orin Eman and Xiaofan Chen. See:
https://sourceforge.net/mailarchive/message.php?msg_id=29412656
|
| |
|
| |
|
|
|
|
|
| |
* Not applied: AC_PREREQ([2.68]) as this doesn't seem
necessary and 2.68 was released less than 2 years ago.
|
| |
|
|
|
|
| |
* 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
|