summaryrefslogtreecommitdiff
path: root/usrp/host
diff options
context:
space:
mode:
authorThomas Tsou <ttsou@vt.edu>2009-10-12 13:22:24 -0400
committerThomas Tsou <ttsou@vt.edu>2009-10-12 13:26:33 -0400
commit1a8a8124c8bb29326fae8803952eb1c02ca53083 (patch)
tree6aa7e7d54f87d79b8c1cbdeb3b830a38ebeff99b /usrp/host
parent665e6c8dce582e4ba02997f8b93d48c107009554 (diff)
usrp: Disabled libusb-1.0 debug output by default
Debug output may generate excessive amounts of information.
Diffstat (limited to 'usrp/host')
-rw-r--r--usrp/host/lib/usrp_prims_libusb1.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/usrp/host/lib/usrp_prims_libusb1.cc b/usrp/host/lib/usrp_prims_libusb1.cc
index 4e30047973..49d1a7282e 100644
--- a/usrp/host/lib/usrp_prims_libusb1.cc
+++ b/usrp/host/lib/usrp_prims_libusb1.cc
@@ -42,6 +42,8 @@ extern "C" {
using namespace ad9862;
+static const int LIBUSB1_DEBUG = 0;
+
/*
* libusb 0.12 / 1.0 compatibility
*/
@@ -144,9 +146,12 @@ usrp_one_time_init (libusb_context **ctx)
if ((ret = libusb_init (ctx)) < 0)
fprintf (stderr, "usrp: libusb_init failed: %s\n", _get_usb_error_str(ret));
- // Set debug verbosity to max. This will only work if the debug option is
- // compiled into libusb. Otherwise this call does nothing.
- libusb_set_debug(*ctx, 3);
+ // Enable debug verbosity if requested. This will only work if the debug
+ // option is compiled into libusb and may produce a generous amount of output
+ // on stdout. If debug output is not compiled into libusb, this call does
+ // nothing.
+ if (LIBUSB1_DEBUG)
+ libusb_set_debug(*ctx, 3);
}
void