From dfa9f51a6f68169a9217d082b02c08e8bca6dcaf Mon Sep 17 00:00:00 2001 From: Jon Szymaniak Date: Thu, 16 Oct 2014 16:54:33 -0400 Subject: [PATCH] libbladeRF: Added CMake variable to disable USB timeouts When debugging the FX3, NIOS, or FPGA, it's helpful if the host side isn't constantly timing out. These can be disabled by defining: LIBBLADERF_DISABLE_USB_TIMEOUTS=Yes --- host/libraries/libbladeRF/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/host/libraries/libbladeRF/CMakeLists.txt b/host/libraries/libbladeRF/CMakeLists.txt index f7048e8fc..031e2411b 100644 --- a/host/libraries/libbladeRF/CMakeLists.txt +++ b/host/libraries/libbladeRF/CMakeLists.txt @@ -267,6 +267,13 @@ if (MSVC) endif() if(ENABLE_BACKEND_USB) + # Useful when doing FX3, NIOS-II, or FPGA debugging + if(LIBBLADERF_DISABLE_USB_TIMEOUTS) + add_definitions("-DPERIPHERAL_TIMEOUT_MS=0") + add_definitions("-DCTRL_TIMEOUT_MS=0") + add_definitions("-DBULK_TIMEOUT_MS=0") + endif() + set(LIBBLADERF_SOURCE ${LIBBLADERF_SOURCE} src/backend/usb/usb.c) endif()