diff options
author | Pete Batard <pbatard@gmail.com> | 2010-01-14 01:34:40 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-01-14 01:34:40 +0000 |
commit | 71613013b9e7329b4e49047abdee40fea718eb96 (patch) | |
tree | b8181552af39d2bef19b73fe232da34912eac918 /examples | |
parent | a32c101a47825f3c523081137d972a619a359d34 (diff) | |
download | libusb-71613013b9e7329b4e49047abdee40fea718eb96.tar.gz |
svn r54: - fixes missing config_msvc.h
Diffstat (limited to 'examples')
-rw-r--r-- | examples/lsusb.c | 3 | ||||
-rw-r--r-- | examples/xusb.c | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/examples/lsusb.c b/examples/lsusb.c index 317adf0..43806de 100644 --- a/examples/lsusb.c +++ b/examples/lsusb.c @@ -44,8 +44,7 @@ static void print_devs(libusb_device **devs) int main(void) { libusb_device **devs; - int r; - ssize_t cnt; + int r, cnt; r = libusb_init(NULL); if (r < 0) diff --git a/examples/xusb.c b/examples/xusb.c index 0157f24..080e468 100644 --- a/examples/xusb.c +++ b/examples/xusb.c @@ -20,11 +20,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifdef _MSC_VER
+#include <config_msvc.h>
+#else
+#include <config.h> +#endif #include <stdio.h> #include <sys/types.h> #include <inttypes.h> #include <string.h> -#include "../config.h" #include <libusb/libusb.h> @@ -330,7 +334,8 @@ int test_device(uint16_t vid, uint16_t pid) int i, j, k, r; int iface, nb_ifaces; int test_scsi = 0; - + struct libusb_device_descriptor dev_desc; + printf("Opening device...\n"); handle = libusb_open_device_with_vid_pid(NULL, vid, pid); @@ -341,7 +346,6 @@ int test_device(uint16_t vid, uint16_t pid) dev = libusb_get_device(handle); - struct libusb_device_descriptor dev_desc; printf("reading device descriptor...\n"); CALL_CHECK(libusb_get_device_descriptor(dev, &dev_desc)); printf("length = %d\n", dev_desc.bLength); @@ -439,7 +443,7 @@ int main(int argc, char** argv) printf(" -h: display usage\n"); printf(" -j: test OLIMEX ARM-USB-TINY JTAG, 2 channel composite device\n"); printf(" -k: test Generic 2 GB USB Key\n"); - printf(" -x: test Microsoft XBox Controller Type S\n"); + printf(" -x: test Microsoft XBox Controller Type S (default)\n"); return 0; } switch(argv[1][1]) { |