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_libusb1.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_libusb1.cc')
-rw-r--r-- | usrp/host/lib/usrp_prims_libusb1.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/usrp/host/lib/usrp_prims_libusb1.cc b/usrp/host/lib/usrp_prims_libusb1.cc index a99adafb3..d75430fe3 100644 --- a/usrp/host/lib/usrp_prims_libusb1.cc +++ b/usrp/host/lib/usrp_prims_libusb1.cc @@ -64,6 +64,24 @@ static const char *default_fpga_filename = "std_2rxhb_2tx.rbf"; #include "std_paths.h" #include <stdio.h> +/* +void +usrp_one_time_init () +{ + usrp_one_time_init (false); +} +*/ + +void +usrp_one_time_init (libusb_context **ctx) +{ + int ret; + + if ((ret = libusb_init (ctx)) < 0) + fprintf (stderr, "usrp: libusb_init failed %i\n", ret); +} + +/* libusb_context * usrp_one_time_init (bool new_context) { @@ -74,7 +92,7 @@ usrp_one_time_init (bool new_context) // On first call create default context in addition to any new requested // context. The default context is probably useless in this form, but keep - // it for now due to compatibility reasons. + // it for now due to possible compatibility reasons. if (first) { first = false; @@ -89,6 +107,7 @@ usrp_one_time_init (bool new_context) return ctx; } +*/ void usrp_rescan () |