summaryrefslogtreecommitdiff
path: root/usrp/host/apps
diff options
context:
space:
mode:
authorThomas Tsou2009-09-09 18:52:34 -0400
committerttsou2009-09-16 17:08:51 -0400
commitfff854782eb2fbfc2a49e07ed9941b3beccc3e83 (patch)
tree0b56209bd823d81ab2da869f50e1602806dc064f /usrp/host/apps
parente6cb4a4c14d9aa92d024727965bd45e68c6620ce (diff)
downloadgnuradio-fff854782eb2fbfc2a49e07ed9941b3beccc3e83.tar.gz
gnuradio-fff854782eb2fbfc2a49e07ed9941b3beccc3e83.tar.bz2
gnuradio-fff854782eb2fbfc2a49e07ed9941b3beccc3e83.zip
Fixed swig and usrp apps to work with libusb-0.12 and libusb-1.0 plus minor cleanup
Diffstat (limited to 'usrp/host/apps')
-rw-r--r--usrp/host/apps/usrper.cc11
1 files changed, 8 insertions, 3 deletions
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 <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <libusb-1.0/libusb.h> /* needed for usb functions */
#include <getopt.h>
#include <assert.h>
#include <errno.h>
@@ -36,6 +35,12 @@
#include "usrp_spi_defs.h"
#include <string.h>
+#ifdef HAVE_LIBUSB_1
+#include <libusb-1.0/libusb.h>
+#else
+#include <usb.h>
+#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);