Commit graph

23 commits

Author SHA1 Message Date
Ludovic Rousseau
6fbd3dd813 Samples: Display VID:PID of the tested device in xusb
* Also amend the wording of the "no option" comment.
* Closes #42
2012-09-14 00:38:06 +01:00
Pete Batard
8b5ba57e56 Samples: xusb improvements
* update and fix usage details
* make topology and speed printout optional (option -i)
* remove unneeded option -g
2012-09-05 22:53:41 +01:00
Pete Batard
d53c599d0b Samples: Make target mandatory with -b option in xusb 2012-08-12 22:57:10 +01:00
Pete Batard
7ec94a45ed Core: Prefix LOG_LEVEL_ with LIBUSB_ to avoid conflicts
* The LOG_LEVEL_ enums, that were moved to the public API
  in 933a319469 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.
2012-07-03 11:01:41 +01:00
Pete Batard
0e0cbb6c27 Windows: Address MSVC Level 4 & WDK's OACR/Prefast warnings
* 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
2012-07-02 18:28:37 +01:00
Xiaofan Chen
5330c3d8ae Samples: Remove USB version for speed designations in xusb 2012-06-14 12:43:26 +01:00
Ludovic Rousseau
56853b54d0 Samples: Fix no previous prototype warnings in xusb 2012-06-04 01:20:45 +01:00
Pete Batard
3fae93a941 Windows: Restore HID support 2012-05-28 10:57:51 +01:00
Pete Batard
933a319469 Core: Define log levels in libusb.h
* Also update xusb sample to use these levels
2012-05-28 10:35:23 +01:00
Pete Batard
cfb8610242 All: Add parent and port topology calls
* 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
2012-05-28 10:26:44 +01:00
Pete Batard
a544e5972b Misc: Ensure all sources are UTF-8
* Also remove extra lines at the end of samples
2012-05-23 18:25:01 +01:00
Pete Batard
2075665352 Samples: prefer __linux__ over __linux define in xusb
* 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
2012-05-10 15:36:34 +01:00
Pete Batard
00d6fed8f2 Samples: fix strcat vs strlcat warning on OpenBSD
* Without this, OpenBSD produces the following warning:
  strcat() is almost always misused, please use strlcat()
2012-05-08 11:01:42 +01:00
Pete Batard
939a4782b2 Samples: Remove interface requests when querying WCID devices
* 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.
2012-05-02 18:02:50 +01:00
Ludovic Rousseau
29d66c1554 Samples: Fix not handled in switch warning in xusb.c
xusb.c: In function ‘test_device’:
xusb.c:722:2: warning: enumeration value ‘USE_GENERIC’ not handled in switch [-Wswitch-enum]
2012-04-20 22:35:38 +01:00
Ludovic Rousseau
d2b7b9f78e Samples: Remove unneeded inline in xusb.c
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]
2012-04-20 22:33:24 +01:00
Ludovic Rousseau
28ab85c418 Samples: Fix initialization discards qualifiers warnings in xusb.c
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
2012-04-15 01:14:09 +01:00
Ludovic Rousseau
baa5563627 Samples: Fix no previous prototype warnings in xusb.c
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’
2012-04-15 01:11:58 +01:00
Pete Batard
37dfd16c8c Core: Add get_version() call
* Also some formatting/typo improvements
2012-04-10 12:46:10 +01:00
Pete Batard
791b7473ec Misc: Rebrand to libusbx
* Mentions of 'libusb' in doxygen are changed to 'libusbx'
* Also update copyright notices and remove unneeded EOF LFs
2012-04-03 15:42:10 +01:00
Pete Batard
985c4fd10d Samples: Fix "warning: no newline at end of file" in xusb.c
* Also remove trailing whitespaces
2012-04-01 21:30:52 +01:00
Pete Batard
d577d4f3f8 Samples: fix a "value is always 0" Clang warning in xusb.c
* Remove the use of os_fd[i].recipient and alter comments with
  regards to Windows Extended Props test limitations with WinUSB
2012-03-28 17:48:12 +01:00
Pete Batard
743fd77dcb Examples: add xusb sample
* Also improvements to WDK build scripts:
  cd to original dir on error, use 2 cores if available
2012-03-28 00:31:50 +01:00