summaryrefslogtreecommitdiff
path: root/usrp
diff options
context:
space:
mode:
Diffstat (limited to 'usrp')
-rw-r--r--usrp/host/apps/usrper.cc4
-rw-r--r--usrp/host/swig/usrp_prims.i6
2 files changed, 5 insertions, 5 deletions
diff --git a/usrp/host/apps/usrper.cc b/usrp/host/apps/usrper.cc
index 1c4beb713..9c6403c9d 100644
--- a/usrp/host/apps/usrper.cc
+++ b/usrp/host/apps/usrper.cc
@@ -191,10 +191,10 @@ main (int argc, char **argv)
const char *cmd = argv[optind++];
nopts--;
- usrp_one_time_init ();
+ libusb_context *ctx = usrp_one_time_init (true);
- struct libusb_device *udev = usrp_find_device (which_board, fx2_ok_p);
+ struct libusb_device *udev = usrp_find_device (which_board, fx2_ok_p, ctx);
if (udev == 0){
fprintf (stderr, "%s: failed to find usrp[%d]\n", prog_name, which_board);
exit (1);
diff --git a/usrp/host/swig/usrp_prims.i b/usrp/host/swig/usrp_prims.i
index 25a3968a8..a93d14cac 100644
--- a/usrp/host/swig/usrp_prims.i
+++ b/usrp/host/swig/usrp_prims.i
@@ -49,7 +49,7 @@ struct libusb_device;
* \brief initialize libusb; probe busses and devices.
* Safe to call more than once.
*/
-void usrp_one_time_init ();
+struct libusb_context *usrp_one_time_init (bool new_context);
void usrp_rescan ();
@@ -63,7 +63,7 @@ void usrp_rescan ();
* configured USRP (firmware loaded)
* unconfigured Cypress FX2 (only if fx2_ok_p is true)
*/
-struct libusb_device *usrp_find_device (int nth, bool fx2_ok_p = false);
+struct libusb_device *usrp_find_device (int nth, bool fx2_ok_p = false, struct libusb_context *ctx);
bool usrp_usrp_p (struct libusb_device *q); //< is this a USRP
bool usrp_usrp0_p (struct libusb_device *q); //< is this a USRP Rev 0
@@ -116,7 +116,7 @@ usrp_load_firmware (struct libusb_device_handle *udh, const char *filename, bool
* then rescans the busses and devices.
*/
usrp_load_status_t
-usrp_load_firmware_nth (int nth, const char *filename, bool force);
+usrp_load_firmware_nth (int nth, const char *filename, bool force, libusb_context *ctx);
/*!
* \brief load fpga configuration bitstream