Commit graph

12 commits

Author SHA1 Message Date
Ludovic Rousseau
686ccc284b examples: fix 3 compiler warnings
fxload.c:202:17: warning: comparison of integers of different signs: 'int' and
      'unsigned long' [-Wsign-compare]
  ...for (j=0; j<ARRAYSIZE(known_device); j++) {
               ~^~~~~~~~~~~~~~~~~~~~~~~~
fxload.c:222:12: warning: comparison of integers of different signs: 'int' and
      'unsigned long' [-Wsign-compare]
                                        if (j < ARRAYSIZE(known_device)) {
                                            ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~
fxload.c:263:13: warning: comparison of integers of different signs: 'int' and
      'unsigned long' [-Wsign-compare]
        for (i=0; i<ARRAYSIZE(path); i++) {
                  ~^~~~~~~~~~~~~~~~

Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr>
2016-03-02 16:07:00 +01:00
Chris Dickens
8c24a1b930 Examples: fxload improvements
* Add two-stage load support
* Fix leaks in error-handling paths
* Closes #12

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2015-08-04 23:51:12 -07:00
Carl Karsten
b38ac3fbb1 examples: fix incorrect error message in fxload
* Closes #3
2014-04-07 22:00:19 +01:00
hjelmn@cs.unm.edu
1eff220474 Misc: Revert all references to libusb/libusb.info 2014-01-08 23:51:01 +00:00
Hans de Goede
02281fda6e examples: use libusb_set_auto_detach_kernel_driver()
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>
2013-06-19 11:04:15 +02:00
Pete Batard
77a37cba54 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
2013-04-14 22:38:52 +01:00
Pete Batard
8aa50632ad 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
2013-03-16 23:44:25 +00:00
Federico Manzan
d345a1ed6b 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
2013-03-15 00:46:24 +00:00
Federico Manzan
b74b7f7390 Samples: Add FX3 firmware upload support for fxload 2013-03-10 23:15:46 +00:00
Pete Batard
0ded9c126e 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
2013-02-27 22:58:49 +00:00
Ludovic Rousseau
38e6eb86b2 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.
2012-10-13 18:34:45 +01:00
Pete Batard
05975333c5 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.
2012-09-13 23:58:09 +01:00