Merge branch 'upstream' into dfsg-orig
[debian/gnuradio] / usrp / host / apps / usrper.cc
index 3740022e0ace1342840bc7d4aa5889755445c86f..593cd7921e1e5694690d45b151f34eeb970117bb 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * USRP - Universal Software Radio Peripheral
  *
- * Copyright (C) 2003,2004 Free Software Foundation, Inc.
+ * Copyright (C) 2003,2004,2009 Free Software Foundation, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * Foundation, Inc., 51 Franklin Street, Boston, MA  02110-1301  USA
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <usb.h>                       /* needed for usb functions */
 #include <getopt.h>
 #include <assert.h>
 #include <errno.h>
 
-#include "usrp_prims.h"
+#include "usrp/usrp_prims.h"
 #include "usrp_spi_defs.h"
-#include <string.h>
 
 char *prog_name;
 
-
 static void
 set_progname (char *path)
 {
@@ -194,7 +195,7 @@ main (int argc, char **argv)
   usrp_one_time_init ();
 
   
-  struct usb_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);
@@ -208,7 +209,7 @@ main (int argc, char **argv)
     fprintf (stderr, "%s: found unconfigured FX2; needs firmware.\n", prog_name);
   }
 
-  struct usb_dev_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);