aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2015-04-30 18:02:02 -0700
committerAshish Chaudhari <ashish@ettus.com>2015-04-30 18:02:02 -0700
commitf2337d6fe0cca7337e0678d8f3ee31f657b608f2 (patch)
tree98c71da44375cc7c4a299e7ff1f2f70147526e8e /host/utils
parenta7150e25f1ec5802963f44c5f748b211c6fcae8f (diff)
parentc6d0daaf034f3c1f20b8a0e6cd5c2555879760e2 (diff)
downloaduhd-f2337d6fe0cca7337e0678d8f3ee31f657b608f2.tar.gz
uhd-f2337d6fe0cca7337e0678d8f3ee31f657b608f2.tar.bz2
uhd-f2337d6fe0cca7337e0678d8f3ee31f657b608f2.zip
Merge branch 'master' into vivado
Diffstat (limited to 'host/utils')
-rw-r--r--host/utils/CMakeLists.txt2
-rw-r--r--host/utils/uhd_usrp_probe.cpp21
-rw-r--r--host/utils/usrp_x3xx_fpga_burner.cpp4
3 files changed, 20 insertions, 7 deletions
diff --git a/host/utils/CMakeLists.txt b/host/utils/CMakeLists.txt
index ed8640187..e24b417c1 100644
--- a/host/utils/CMakeLists.txt
+++ b/host/utils/CMakeLists.txt
@@ -15,8 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-SET(CMAKE_C_COMPILE_OBJECT ${CMAKE_CXX_COMPILE_OBJECT})
-
########################################################################
# Utilities that get installed into the runtime path
########################################################################
diff --git a/host/utils/uhd_usrp_probe.cpp b/host/utils/uhd_usrp_probe.cpp
index a03646cc0..f8a8b5665 100644
--- a/host/utils/uhd_usrp_probe.cpp
+++ b/host/utils/uhd_usrp_probe.cpp
@@ -192,7 +192,10 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
("version", "print the version string and exit")
("args", po::value<std::string>()->default_value(""), "device address args")
("tree", "specify to print a complete property tree")
- ("string", po::value<std::string>(), "query a string value from the properties tree")
+ ("string", po::value<std::string>(), "query a string value from the property tree")
+ ("double", po::value<std::string>(), "query a double precision floating point value from the property tree")
+ ("int", po::value<std::string>(), "query a integer value from the property tree")
+ ("range", po::value<std::string>(), "query a range (gain, bandwidth, frequency, ...) from the property tree")
("init-only", "skip all queries, only initialize device")
;
@@ -219,6 +222,22 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
return EXIT_SUCCESS;
}
+ if (vm.count("double")){
+ std::cout << tree->access<double>(vm["double"].as<std::string>()).get() << std::endl;
+ return EXIT_SUCCESS;
+ }
+
+ if (vm.count("int")){
+ std::cout << tree->access<int>(vm["int"].as<std::string>()).get() << std::endl;
+ return EXIT_SUCCESS;
+ }
+
+ if (vm.count("range")){
+ meta_range_t range = tree->access<meta_range_t>(vm["range"].as<std::string>()).get();
+ std::cout << boost::format("%.1f:%.1f:%.1f") % range.start() % range.step() % range.stop() << std::endl;
+ return EXIT_SUCCESS;
+ }
+
if (vm.count("tree") != 0) print_tree("/", tree);
else if (not vm.count("init-only")) std::cout << make_border(get_device_pp_string(tree)) << std::endl;
diff --git a/host/utils/usrp_x3xx_fpga_burner.cpp b/host/utils/usrp_x3xx_fpga_burner.cpp
index e32e4d636..3c6225531 100644
--- a/host/utils/usrp_x3xx_fpga_burner.cpp
+++ b/host/utils/usrp_x3xx_fpga_burner.cpp
@@ -49,13 +49,9 @@
#include <uhd/utils/safe_main.hpp>
#include <uhd/utils/safe_call.hpp>
-#ifdef _MSC_VER
extern "C" {
-#endif
#include "cdecode.h"
-#ifdef _MSC_VER
}
-#endif
#define X300_FPGA_BIN_SIZE_BYTES 15877916
#define X300_FPGA_BIT_MAX_SIZE_BYTES 15878022