usrp: Enable debug output
authorThomas Tsou <ttsou@vt.edu>
Fri, 9 Oct 2009 19:10:13 +0000 (15:10 -0400)
committerThomas Tsou <ttsou@vt.edu>
Fri, 9 Oct 2009 19:10:13 +0000 (15:10 -0400)
This only works if libusb-1.0 is compiled with debug logging.

usrp/host/lib/usrp_prims_libusb1.cc

index e755c1d4101f0bd9f2787cede39d6d6681aca0dc..4e30047973facbeece17ce80e1fab643a5b56c32 100644 (file)
@@ -143,6 +143,10 @@ 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);
 }
 
 void