From fff854782eb2fbfc2a49e07ed9941b3beccc3e83 Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Wed, 9 Sep 2009 18:52:34 -0400 Subject: Fixed swig and usrp apps to work with libusb-0.12 and libusb-1.0 plus minor cleanup --- usrp/host/apps/usrper.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'usrp/host/apps/usrper.cc') diff --git a/usrp/host/apps/usrper.cc b/usrp/host/apps/usrper.cc index f8e98341f..d1270589b 100644 --- a/usrp/host/apps/usrper.cc +++ b/usrp/host/apps/usrper.cc @@ -27,7 +27,6 @@ #include #include #include -#include /* needed for usb functions */ #include #include #include @@ -36,6 +35,12 @@ #include "usrp_spi_defs.h" #include +#ifdef HAVE_LIBUSB_1 +#include +#else +#include +#endif + char *prog_name; static void @@ -197,7 +202,7 @@ main (int argc, char **argv) usrp_one_time_init (); - struct libusb_device *udev = usrp_find_device (which_board, fx2_ok_p); + libusb_device *udev = usrp_find_device (which_board, fx2_ok_p); if (udev == 0){ fprintf (stderr, "%s: failed to find usrp[%d]\n", prog_name, which_board); exit (1); @@ -211,7 +216,7 @@ main (int argc, char **argv) fprintf (stderr, "%s: found unconfigured FX2; needs firmware.\n", prog_name); } - struct libusb_device_handle *udh = usrp_open_cmd_interface (udev); + libusb_device_handle *udh = usrp_open_cmd_interface (udev); if (udh == 0){ fprintf (stderr, "%s: failed to open_cmd_interface\n", prog_name); exit (1); -- cgit