diff options
author | ttsou | 2009-09-09 14:46:57 -0400 |
---|---|---|
committer | ttsou | 2009-09-16 17:08:51 -0400 |
commit | e6cb4a4c14d9aa92d024727965bd45e68c6620ce (patch) | |
tree | a8705202c36e1fcf7d4d88ca823a4de46e419d43 /usrp/host/lib/usrp_prims_libusb.cc | |
parent | 158caeaa92df7ffdf363236985f4b8e7825f3950 (diff) | |
download | gnuradio-e6cb4a4c14d9aa92d024727965bd45e68c6620ce.tar.gz gnuradio-e6cb4a4c14d9aa92d024727965bd45e68c6620ce.tar.bz2 gnuradio-e6cb4a4c14d9aa92d024727965bd45e68c6620ce.zip |
Intermediate fix to simplify usrp_one_time_init api
Diffstat (limited to 'usrp/host/lib/usrp_prims_libusb.cc')
-rw-r--r-- | usrp/host/lib/usrp_prims_libusb.cc | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/usrp/host/lib/usrp_prims_libusb.cc b/usrp/host/lib/usrp_prims_libusb.cc index 716e9fd70..4c826fa55 100644 --- a/usrp/host/lib/usrp_prims_libusb.cc +++ b/usrp/host/lib/usrp_prims_libusb.cc @@ -64,12 +64,34 @@ static const char *default_fpga_filename = "std_2rxhb_2tx.rbf"; #include "std_paths.h" #include <stdio.h> +/* void usrp_one_time_init () { static bool first = true; - if (first){ + if (first) { + first = false; + usb_init (); // usb library init + usb_find_busses (); + usb_find_devices (); + } +} + +libusb_context * +usrp_one_time_init (bool new_context) +{ + usrp_one_time_init (); + return NULL; +} +*/ + +void +usrp_one_time_init (libusb_context **ctx) +{ + static bool first = true; + + if (first) { first = false; usb_init (); // usb library init usb_find_busses (); |