diff options
author | Andrej Rode <andrej.rode@ettus.com> | 2017-02-07 16:37:25 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-02-20 17:13:15 -0800 |
commit | 21aad77c9ca07f4271136b9241f5adb00a6bb908 (patch) | |
tree | 636ffe3ab2296e9afa661d3a12eb359224cd3254 /host/lib/usrp/e100/fpga_downloader.cpp | |
parent | 2b33f2bb4c01d4306fd46f78edf6e355a03e2ed7 (diff) | |
download | uhd-21aad77c9ca07f4271136b9241f5adb00a6bb908.tar.gz uhd-21aad77c9ca07f4271136b9241f5adb00a6bb908.tar.bz2 uhd-21aad77c9ca07f4271136b9241f5adb00a6bb908.zip |
utils: introduce new logging API and remove msg API
Diffstat (limited to 'host/lib/usrp/e100/fpga_downloader.cpp')
-rw-r--r-- | host/lib/usrp/e100/fpga_downloader.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/host/lib/usrp/e100/fpga_downloader.cpp b/host/lib/usrp/e100/fpga_downloader.cpp index 9abde32f7..bfb207f39 100644 --- a/host/lib/usrp/e100/fpga_downloader.cpp +++ b/host/lib/usrp/e100/fpga_downloader.cpp @@ -23,18 +23,13 @@ #include <uhd/device.hpp> #include <uhd/image_loader.hpp> #include <uhd/types/device_addr.hpp> -#include <uhd/utils/msg.hpp> +#include <uhd/utils/log.hpp> #include <uhd/utils/paths.hpp> #include <uhd/utils/static.hpp> #include "e100_impl.hpp" #else //special case when this file is externally included #include <stdexcept> #include <iostream> -#define UHD_MSG(type) std::cout -namespace uhd{ - typedef std::runtime_error os_error; - typedef std::runtime_error io_error; -} #endif #include <sstream> @@ -246,7 +241,7 @@ static void send_file_to_fpga(const std::string &file_name, gpio &error, gpio &d throw uhd::os_error("INIT_B went high, error occured."); if (!done.get_value()) - UHD_MSG(status) << "Configuration complete." << std::endl; + UHD_LOGGER_INFO("E100") << "Configuration complete."; } while (bitstream.gcount() == BUF_SIZE); } @@ -260,20 +255,20 @@ void e100_load_fpga(const std::string &bin_file){ gpio gpio_init_b(INIT_B, IN); gpio gpio_done (DONE, IN); - UHD_MSG(status) << "Loading FPGA image: " << bin_file << "... " << std::flush; + UHD_LOGGER_INFO("E100") << "Loading FPGA image: " << bin_file << "... "; // if(std::system("/sbin/rmmod usrp_e") != 0){ -// UHD_MSG(warning) << "USRP-E100 FPGA downloader: could not unload usrp_e module" << std::endl; +// UHD_LOGGER_WARNING("E100") << "USRP-E100 FPGA downloader: could not unload usrp_e module" ; // } prepare_fpga_for_configuration(gpio_prog_b, gpio_init_b); - UHD_MSG(status) << "done = " << gpio_done.get_value() << std::endl; + UHD_LOGGER_INFO("E100") << "done = " << gpio_done.get_value(); send_file_to_fpga(bin_file, gpio_init_b, gpio_done); // if(std::system("/sbin/modprobe usrp_e") != 0){ -// UHD_MSG(warning) << "USRP-E100 FPGA downloader: could not load usrp_e module" << std::endl; +// UHD_LOGGER_WARNING("E100") << "USRP-E100 FPGA downloader: could not load usrp_e module" ; // } } |