From 16f08844d7b6ccbdcfdf17963b88cadb7525ddc6 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 24 Feb 2011 14:54:24 -0800 Subject: uhd: renamed the assert header to assert has only the assert has implementation is in this header uhd assert throw moved to the exception header updated code base includes to match --- host/include/uhd/exception.hpp | 9 ++++ host/include/uhd/utils/CMakeLists.txt | 4 +- host/include/uhd/utils/assert.hpp | 53 ---------------------- host/include/uhd/utils/assert.ipp | 52 --------------------- host/include/uhd/utils/assert_has.hpp | 47 +++++++++++++++++++ host/include/uhd/utils/assert_has.ipp | 53 ++++++++++++++++++++++ host/lib/device.cpp | 3 +- host/lib/transport/libusb1_base.cpp | 2 +- host/lib/transport/libusb1_zero_copy.cpp | 2 +- host/lib/transport/vrt_packet_handler.hpp | 2 +- host/lib/types/mac_addr.cpp | 3 +- host/lib/usrp/dboard/db_basic_and_lf.cpp | 2 +- host/lib/usrp/dboard/db_dbsrx.cpp | 2 +- host/lib/usrp/dboard/db_dbsrx2.cpp | 2 +- host/lib/usrp/dboard/db_rfx.cpp | 2 +- host/lib/usrp/dboard/db_tvrx.cpp | 2 +- host/lib/usrp/dboard/db_unknown.cpp | 2 +- host/lib/usrp/dboard/db_wbx.cpp | 2 +- host/lib/usrp/dboard/db_xcvr2450.cpp | 2 +- host/lib/usrp/dboard_eeprom.cpp | 3 +- host/lib/usrp/dboard_manager.cpp | 2 +- host/lib/usrp/dsp_utils.cpp | 2 +- host/lib/usrp/gps_ctrl.cpp | 5 +- host/lib/usrp/misc_utils.cpp | 2 +- host/lib/usrp/multi_usrp.cpp | 2 +- host/lib/usrp/usrp1/clock_ctrl.cpp | 9 +--- host/lib/usrp/usrp1/codec_ctrl.cpp | 2 +- host/lib/usrp/usrp1/codec_impl.cpp | 2 +- host/lib/usrp/usrp1/dboard_iface.cpp | 2 +- host/lib/usrp/usrp1/dboard_impl.cpp | 2 +- host/lib/usrp/usrp1/mboard_impl.cpp | 2 +- host/lib/usrp/usrp1/usrp1_iface.cpp | 2 +- host/lib/usrp/usrp1/usrp1_impl.cpp | 2 +- host/lib/usrp/usrp2/clock_ctrl.cpp | 2 +- host/lib/usrp/usrp2/codec_impl.cpp | 4 +- host/lib/usrp/usrp2/dboard_iface.cpp | 2 +- host/lib/usrp/usrp2/dboard_impl.cpp | 2 +- host/lib/usrp/usrp2/mboard_impl.cpp | 2 +- host/lib/usrp/usrp2/usrp2_iface.cpp | 1 - host/lib/usrp/usrp2/usrp2_impl.cpp | 2 +- host/lib/usrp/usrp_e100/clock_ctrl.cpp | 2 +- host/lib/usrp/usrp_e100/codec_ctrl.cpp | 4 +- host/lib/usrp/usrp_e100/codec_impl.cpp | 2 +- host/lib/usrp/usrp_e100/dboard_iface.cpp | 2 +- host/lib/usrp/usrp_e100/dboard_impl.cpp | 2 +- host/lib/usrp/usrp_e100/fpga_downloader.cpp | 3 +- host/lib/usrp/usrp_e100/mboard_impl.cpp | 2 +- host/lib/usrp/usrp_e100/usrp_e100_iface.cpp | 2 +- host/lib/usrp/usrp_e100/usrp_e100_impl.cpp | 2 +- .../usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp | 2 +- host/lib/utils/gain_group.cpp | 2 +- host/tests/error_test.cpp | 2 +- host/utils/usrp_burn_db_eeprom.cpp | 2 +- 53 files changed, 161 insertions(+), 168 deletions(-) delete mode 100644 host/include/uhd/utils/assert.hpp delete mode 100644 host/include/uhd/utils/assert.ipp create mode 100644 host/include/uhd/utils/assert_has.hpp create mode 100644 host/include/uhd/utils/assert_has.ipp diff --git a/host/include/uhd/exception.hpp b/host/include/uhd/exception.hpp index 71836e22e..9acc768ed 100644 --- a/host/include/uhd/exception.hpp +++ b/host/include/uhd/exception.hpp @@ -114,6 +114,15 @@ namespace uhd{ #define UHD_THROW_INVALID_CODE_PATH() \ throw uhd::system_error(UHD_THROW_SITE_INFO("invalid code path")) + /*! + * Assert the result of the code evaluation. + * If the code evaluates to false, throw an assertion error. + * \param code the code that resolved to a boolean + */ + #define UHD_ASSERT_THROW(code) if (not (code)) \ + throw uhd::assertion_error(UHD_THROW_SITE_INFO(#code)); \ + else void(0) + } //namespace uhd #endif /* INCLUDED_UHD_UTILS_EXCEPTION_HPP */ diff --git a/host/include/uhd/utils/CMakeLists.txt b/host/include/uhd/utils/CMakeLists.txt index b638431d3..4ed7ca460 100644 --- a/host/include/uhd/utils/CMakeLists.txt +++ b/host/include/uhd/utils/CMakeLists.txt @@ -17,8 +17,8 @@ INSTALL(FILES algorithm.hpp - assert.hpp - assert.ipp + assert_has.hpp + assert_has.ipp byteswap.hpp byteswap.ipp gain_group.hpp diff --git a/host/include/uhd/utils/assert.hpp b/host/include/uhd/utils/assert.hpp deleted file mode 100644 index 1be4237d6..000000000 --- a/host/include/uhd/utils/assert.hpp +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright 2010-2011 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// - -#ifndef INCLUDED_UHD_UTILS_ASSERT_HPP -#define INCLUDED_UHD_UTILS_ASSERT_HPP - -#include -#include -#include - -namespace uhd{ - - //! Throw an assert error with throw-site information - #define UHD_ASSERT_THROW(_x) if (not (_x)) throw uhd::assertion_error( \ - UHD_THROW_SITE_INFO("assertion failed: " + std::string(#_x)) \ - ); else void(0) - - /*! - * Check that an element is found in a container. - * If not, throw a meaningful assertion error. - * The "what" in the error will show what is - * being set and a list of known good values. - * - * \param range a list of possible settings - * \param value an element that may be in the list - * \param what a description of what the value is - * \throw assertion_error when elem not in list - */ - template void assert_has( - const Range &range, - const T &value, - const std::string &what = "unknown" - ); - -}//namespace uhd - -#include - -#endif /* INCLUDED_UHD_UTILS_ASSERT_HPP */ diff --git a/host/include/uhd/utils/assert.ipp b/host/include/uhd/utils/assert.ipp deleted file mode 100644 index 4374fff67..000000000 --- a/host/include/uhd/utils/assert.ipp +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright 2010-2011 Ettus Research LLC -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// - -#ifndef INCLUDED_UHD_UTILS_ASSERT_IPP -#define INCLUDED_UHD_UTILS_ASSERT_IPP - -#include -#include -#include -#include - -namespace uhd{ - - template UHD_INLINE void assert_has( - const Range &range, - const T &value, - const std::string &what - ){ - if (std::has(range, value)) return; - std::string possible_values = ""; - size_t i = 0; - BOOST_FOREACH(const T &v, range){ - if (i++ > 0) possible_values += ", "; - possible_values += boost::lexical_cast(v); - } - throw uhd::assertion_error(str(boost::format( - "assertion failed:\n" - " %s is not a valid %s.\n" - " possible values are: [%s].\n" - ) - % boost::lexical_cast(value) - % what % possible_values - )); - } - -}//namespace uhd - -#endif /* INCLUDED_UHD_UTILS_ASSERT_IPP */ diff --git a/host/include/uhd/utils/assert_has.hpp b/host/include/uhd/utils/assert_has.hpp new file mode 100644 index 000000000..eae7652ad --- /dev/null +++ b/host/include/uhd/utils/assert_has.hpp @@ -0,0 +1,47 @@ +// +// Copyright 2010-2011 Ettus Research LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// + +#ifndef INCLUDED_UHD_UTILS_ASSERT_HAS_HPP +#define INCLUDED_UHD_UTILS_ASSERT_HAS_HPP + +#include +#include + +namespace uhd{ + + /*! + * Check that an element is found in a container. + * If not, throw a meaningful assertion error. + * The "what" in the error will show what is + * being set and a list of known good values. + * + * \param range a list of possible settings + * \param value an element that may be in the list + * \param what a description of what the value is + * \throw assertion_error when elem not in list + */ + template void assert_has( + const Range &range, + const T &value, + const std::string &what = "unknown" + ); + +}//namespace uhd + +#include + +#endif /* INCLUDED_UHD_UTILS_ASSERT_HAS_HPP */ diff --git a/host/include/uhd/utils/assert_has.ipp b/host/include/uhd/utils/assert_has.ipp new file mode 100644 index 000000000..a46d172f4 --- /dev/null +++ b/host/include/uhd/utils/assert_has.ipp @@ -0,0 +1,53 @@ +// +// Copyright 2010-2011 Ettus Research LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// + +#ifndef INCLUDED_UHD_UTILS_ASSERT_HAS_IPP +#define INCLUDED_UHD_UTILS_ASSERT_HAS_IPP + +#include +#include +#include +#include +#include + +namespace uhd{ + + template UHD_INLINE void assert_has( + const Range &range, + const T &value, + const std::string &what + ){ + if (std::has(range, value)) return; + std::string possible_values = ""; + size_t i = 0; + BOOST_FOREACH(const T &v, range){ + if (i++ > 0) possible_values += ", "; + possible_values += boost::lexical_cast(v); + } + throw uhd::assertion_error(str(boost::format( + "assertion failed:\n" + " %s is not a valid %s.\n" + " possible values are: [%s].\n" + ) + % boost::lexical_cast(value) + % what % possible_values + )); + } + +}//namespace uhd + +#endif /* INCLUDED_UHD_UTILS_ASSERT_HAS_IPP */ diff --git a/host/lib/device.cpp b/host/lib/device.cpp index 34dd3f854..51c66680a 100644 --- a/host/lib/device.cpp +++ b/host/lib/device.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include @@ -25,7 +25,6 @@ #include #include #include -#include #include using namespace uhd; diff --git a/host/lib/transport/libusb1_base.cpp b/host/lib/transport/libusb1_base.cpp index cfa77d9ca..aea1a2360 100644 --- a/host/lib/transport/libusb1_base.cpp +++ b/host/lib/transport/libusb1_base.cpp @@ -16,7 +16,7 @@ // #include "libusb1_base.hpp" -#include +#include #include #include #include diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp index 87adece45..1b6712871 100644 --- a/host/lib/transport/libusb1_zero_copy.cpp +++ b/host/lib/transport/libusb1_zero_copy.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/lib/transport/vrt_packet_handler.hpp b/host/lib/transport/vrt_packet_handler.hpp index 4f8ce7e52..d74b2c13c 100644 --- a/host/lib/transport/vrt_packet_handler.hpp +++ b/host/lib/transport/vrt_packet_handler.hpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include diff --git a/host/lib/types/mac_addr.cpp b/host/lib/types/mac_addr.cpp index cf3c3fa97..a65c8a45d 100644 --- a/host/lib/types/mac_addr.cpp +++ b/host/lib/types/mac_addr.cpp @@ -16,12 +16,11 @@ // #include -#include +#include #include #include #include #include -#include #include using namespace uhd; diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp index b319289db..3de9adbec 100644 --- a/host/lib/usrp/dboard/db_basic_and_lf.cpp +++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp index 98d9479fc..200822841 100644 --- a/host/lib/usrp/dboard/db_dbsrx.cpp +++ b/host/lib/usrp/dboard/db_dbsrx.cpp @@ -21,7 +21,7 @@ #include "max2118_regs.hpp" #include -#include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp index f4b797995..dd97f76b1 100644 --- a/host/lib/usrp/dboard/db_dbsrx2.cpp +++ b/host/lib/usrp/dboard/db_dbsrx2.cpp @@ -19,7 +19,7 @@ #include "max2112_regs.hpp" #include -#include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp index 3e3cf00f2..5e269fc64 100644 --- a/host/lib/usrp/dboard/db_rfx.cpp +++ b/host/lib/usrp/dboard/db_rfx.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp index 578999432..4d7cb22f8 100644 --- a/host/lib/usrp/dboard/db_tvrx.cpp +++ b/host/lib/usrp/dboard/db_tvrx.cpp @@ -28,7 +28,7 @@ //gain range: [0:1dB:115dB] #include -#include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_unknown.cpp b/host/lib/usrp/dboard/db_unknown.cpp index f0a4c000e..cef4bee4a 100644 --- a/host/lib/usrp/dboard/db_unknown.cpp +++ b/host/lib/usrp/dboard/db_unknown.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_wbx.cpp b/host/lib/usrp/dboard/db_wbx.cpp index 0bc2d0ca1..2e9a1edc8 100644 --- a/host/lib/usrp/dboard/db_wbx.cpp +++ b/host/lib/usrp/dboard/db_wbx.cpp @@ -69,7 +69,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp index f4f74eb86..4eafd6fda 100644 --- a/host/lib/usrp/dboard/db_xcvr2450.cpp +++ b/host/lib/usrp/dboard/db_xcvr2450.cpp @@ -49,7 +49,7 @@ #include "max2829_regs.hpp" #include -#include +#include #include #include #include diff --git a/host/lib/usrp/dboard_eeprom.cpp b/host/lib/usrp/dboard_eeprom.cpp index 5e8e27272..c1e44fb74 100644 --- a/host/lib/usrp/dboard_eeprom.cpp +++ b/host/lib/usrp/dboard_eeprom.cpp @@ -16,7 +16,8 @@ // #include -#include +#include +#include #include #include #include diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp index 75594e670..f9d43901d 100644 --- a/host/lib/usrp/dboard_manager.cpp +++ b/host/lib/usrp/dboard_manager.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/dsp_utils.cpp b/host/lib/usrp/dsp_utils.cpp index 576c4639f..6332f7991 100644 --- a/host/lib/usrp/dsp_utils.cpp +++ b/host/lib/usrp/dsp_utils.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp index b1062fa39..e868568a0 100644 --- a/host/lib/usrp/gps_ctrl.cpp +++ b/host/lib/usrp/gps_ctrl.cpp @@ -16,11 +16,10 @@ // #include -#include +#include #include -#include #include -#include +#include #include #include diff --git a/host/lib/usrp/misc_utils.cpp b/host/lib/usrp/misc_utils.cpp index 2bad83b3c..9074c3fe6 100644 --- a/host/lib/usrp/misc_utils.cpp +++ b/host/lib/usrp/misc_utils.cpp @@ -16,7 +16,7 @@ // #include -#include +#include #include #include #include diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 23049d569..3329ea4fe 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -18,7 +18,7 @@ #include "wrapper_utils.hpp" #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/usrp1/clock_ctrl.cpp b/host/lib/usrp/usrp1/clock_ctrl.cpp index 156f2b0c4..df5353b54 100644 --- a/host/lib/usrp/usrp1/clock_ctrl.cpp +++ b/host/lib/usrp/usrp1/clock_ctrl.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -16,13 +16,6 @@ // #include "clock_ctrl.hpp" -#include "fpga_regs_standard.h" -#include -#include -#include -#include -#include -#include using namespace uhd; diff --git a/host/lib/usrp/usrp1/codec_ctrl.cpp b/host/lib/usrp/usrp1/codec_ctrl.cpp index f3816b377..56c3cee13 100644 --- a/host/lib/usrp/usrp1/codec_ctrl.cpp +++ b/host/lib/usrp/usrp1/codec_ctrl.cpp @@ -20,7 +20,7 @@ #include "clock_ctrl.hpp" #include "ad9862_regs.hpp" #include -#include +#include #include #include #include diff --git a/host/lib/usrp/usrp1/codec_impl.cpp b/host/lib/usrp/usrp1/codec_impl.cpp index 14ecd2d2e..7e4032131 100644 --- a/host/lib/usrp/usrp1/codec_impl.cpp +++ b/host/lib/usrp/usrp1/codec_impl.cpp @@ -16,7 +16,7 @@ // #include "usrp1_impl.hpp" -#include +#include #include #include #include diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp index eec4a52db..67da51ee9 100644 --- a/host/lib/usrp/usrp1/dboard_iface.cpp +++ b/host/lib/usrp/usrp1/dboard_iface.cpp @@ -24,7 +24,7 @@ #include "codec_ctrl.hpp" #include #include -#include +#include #include #include diff --git a/host/lib/usrp/usrp1/dboard_impl.cpp b/host/lib/usrp/usrp1/dboard_impl.cpp index 2130960fb..02906fc45 100644 --- a/host/lib/usrp/usrp1/dboard_impl.cpp +++ b/host/lib/usrp/usrp1/dboard_impl.cpp @@ -19,7 +19,7 @@ #include "usrp_i2c_addr.h" #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/usrp1/mboard_impl.cpp b/host/lib/usrp/usrp1/mboard_impl.cpp index 26d3e41d4..9f0512d6d 100644 --- a/host/lib/usrp/usrp1/mboard_impl.cpp +++ b/host/lib/usrp/usrp1/mboard_impl.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/usrp1/usrp1_iface.cpp b/host/lib/usrp/usrp1/usrp1_iface.cpp index 63fcd5777..947847044 100644 --- a/host/lib/usrp/usrp1/usrp1_iface.cpp +++ b/host/lib/usrp/usrp1/usrp1_iface.cpp @@ -17,7 +17,7 @@ #include "usrp1_iface.hpp" #include "usrp_commands.h" -#include +#include #include #include #include diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp index c395db0b9..1ec332a61 100644 --- a/host/lib/usrp/usrp1/usrp1_impl.cpp +++ b/host/lib/usrp/usrp1/usrp1_impl.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/usrp2/clock_ctrl.cpp b/host/lib/usrp/usrp2/clock_ctrl.cpp index 27ccefb2b..aaafbae53 100644 --- a/host/lib/usrp/usrp2/clock_ctrl.cpp +++ b/host/lib/usrp/usrp2/clock_ctrl.cpp @@ -19,7 +19,7 @@ #include "ad9510_regs.hpp" #include "usrp2_regs.hpp" //spi slave constants #include "usrp2_clk_regs.hpp" -#include +#include #include #include #include diff --git a/host/lib/usrp/usrp2/codec_impl.cpp b/host/lib/usrp/usrp2/codec_impl.cpp index 2135b155a..50320773f 100644 --- a/host/lib/usrp/usrp2/codec_impl.cpp +++ b/host/lib/usrp/usrp2/codec_impl.cpp @@ -16,13 +16,13 @@ // #include "usrp2_impl.hpp" +#include +#include #include #include #include #include #include -#include -#include using namespace uhd; using namespace uhd::usrp; diff --git a/host/lib/usrp/usrp2/dboard_iface.cpp b/host/lib/usrp/usrp2/dboard_iface.cpp index c539b0058..8b2df61d6 100644 --- a/host/lib/usrp/usrp2/dboard_iface.cpp +++ b/host/lib/usrp/usrp2/dboard_iface.cpp @@ -20,7 +20,7 @@ #include "usrp2_regs.hpp" //wishbone address constants #include #include -#include +#include #include #include #include //htonl and ntohl diff --git a/host/lib/usrp/usrp2/dboard_impl.cpp b/host/lib/usrp/usrp2/dboard_impl.cpp index b668d435b..e21fda074 100644 --- a/host/lib/usrp/usrp2/dboard_impl.cpp +++ b/host/lib/usrp/usrp2/dboard_impl.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include //htonl and ntohl diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp index 34a2b7c69..f59b7b7dd 100644 --- a/host/lib/usrp/usrp2/mboard_impl.cpp +++ b/host/lib/usrp/usrp2/mboard_impl.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp index 6426ffd3e..462ebab16 100644 --- a/host/lib/usrp/usrp2/usrp2_iface.cpp +++ b/host/lib/usrp/usrp2/usrp2_iface.cpp @@ -18,7 +18,6 @@ #include "usrp2_regs.hpp" #include "usrp2_iface.hpp" #include -#include #include #include #include diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index 95031d211..afd73401f 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/usrp_e100/clock_ctrl.cpp b/host/lib/usrp/usrp_e100/clock_ctrl.cpp index e29fe18ce..6128894cc 100644 --- a/host/lib/usrp/usrp_e100/clock_ctrl.cpp +++ b/host/lib/usrp/usrp_e100/clock_ctrl.cpp @@ -17,7 +17,7 @@ #include "clock_ctrl.hpp" #include "ad9522_regs.hpp" -#include +#include #include #include "usrp_e100_regs.hpp" //spi slave constants #include diff --git a/host/lib/usrp/usrp_e100/codec_ctrl.cpp b/host/lib/usrp/usrp_e100/codec_ctrl.cpp index b33c8ae65..b5671072c 100644 --- a/host/lib/usrp/usrp_e100/codec_ctrl.cpp +++ b/host/lib/usrp/usrp_e100/codec_ctrl.cpp @@ -18,7 +18,7 @@ #include "codec_ctrl.hpp" #include "ad9862_regs.hpp" #include -#include +#include #include #include #include @@ -227,7 +227,7 @@ double usrp_e100_codec_ctrl_impl::read_aux_adc(aux_adc_t which){ case AUX_ADC_B1: return aux_adc_to_volts(_ad9862_regs.aux_adc_b1_9_2, _ad9862_regs.aux_adc_b1_1_0); case AUX_ADC_B2: return aux_adc_to_volts(_ad9862_regs.aux_adc_b2_9_2, _ad9862_regs.aux_adc_b2_1_0); } - UHD_ASSERT_THROW(false); + UHD_THROW_INVALID_CODE_PATH(); } /*********************************************************************** diff --git a/host/lib/usrp/usrp_e100/codec_impl.cpp b/host/lib/usrp/usrp_e100/codec_impl.cpp index 0d91fb42c..ae198aaa5 100644 --- a/host/lib/usrp/usrp_e100/codec_impl.cpp +++ b/host/lib/usrp/usrp_e100/codec_impl.cpp @@ -16,7 +16,7 @@ // #include "usrp_e100_impl.hpp" -#include +#include #include #include diff --git a/host/lib/usrp/usrp_e100/dboard_iface.cpp b/host/lib/usrp/usrp_e100/dboard_iface.cpp index e4c3856c9..ee6ca3933 100644 --- a/host/lib/usrp/usrp_e100/dboard_iface.cpp +++ b/host/lib/usrp/usrp_e100/dboard_iface.cpp @@ -21,7 +21,7 @@ #include "codec_ctrl.hpp" #include #include -#include +#include #include #include //i2c and spi constants diff --git a/host/lib/usrp/usrp_e100/dboard_impl.cpp b/host/lib/usrp/usrp_e100/dboard_impl.cpp index b533c2657..0b89fed9f 100644 --- a/host/lib/usrp/usrp_e100/dboard_impl.cpp +++ b/host/lib/usrp/usrp_e100/dboard_impl.cpp @@ -17,7 +17,7 @@ #include "usrp_e100_impl.hpp" #include "usrp_e100_regs.hpp" -#include +#include #include #include #include diff --git a/host/lib/usrp/usrp_e100/fpga_downloader.cpp b/host/lib/usrp/usrp_e100/fpga_downloader.cpp index c0013fcbd..9836cbc02 100644 --- a/host/lib/usrp/usrp_e100/fpga_downloader.cpp +++ b/host/lib/usrp/usrp_e100/fpga_downloader.cpp @@ -16,14 +16,13 @@ // #include -#include +#include #include #include #include #include #include -#include #include #include diff --git a/host/lib/usrp/usrp_e100/mboard_impl.cpp b/host/lib/usrp/usrp_e100/mboard_impl.cpp index a4db53715..07476bd6c 100644 --- a/host/lib/usrp/usrp_e100/mboard_impl.cpp +++ b/host/lib/usrp/usrp_e100/mboard_impl.cpp @@ -19,7 +19,7 @@ #include "usrp_e100_regs.hpp" #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/usrp_e100/usrp_e100_iface.cpp b/host/lib/usrp/usrp_e100/usrp_e100_iface.cpp index ad36dd97a..687008df8 100644 --- a/host/lib/usrp/usrp_e100/usrp_e100_iface.cpp +++ b/host/lib/usrp/usrp_e100/usrp_e100_iface.cpp @@ -17,7 +17,7 @@ #include "usrp_e100_iface.hpp" #include "usrp_e100_regs.hpp" -#include +#include #include //ioctl #include //open, close #include //ioctl structures and constants diff --git a/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp b/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp index 40ea56466..d4404fc88 100644 --- a/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp +++ b/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp @@ -19,7 +19,7 @@ #include "usrp_e100_regs.hpp" #include #include -#include +#include #include #include #include diff --git a/host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp b/host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp index c155d426a..f4274dc5a 100644 --- a/host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp +++ b/host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp @@ -17,7 +17,7 @@ #include "usrp_e100_iface.hpp" #include -#include +#include #include #include //mmap #include //getpagesize diff --git a/host/lib/utils/gain_group.cpp b/host/lib/utils/gain_group.cpp index 07aa21115..101620a33 100644 --- a/host/lib/utils/gain_group.cpp +++ b/host/lib/utils/gain_group.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/host/tests/error_test.cpp b/host/tests/error_test.cpp index 9254fbc85..3499c25da 100644 --- a/host/tests/error_test.cpp +++ b/host/tests/error_test.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include diff --git a/host/utils/usrp_burn_db_eeprom.cpp b/host/utils/usrp_burn_db_eeprom.cpp index ac5608f22..617417e09 100644 --- a/host/utils/usrp_burn_db_eeprom.cpp +++ b/host/utils/usrp_burn_db_eeprom.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include -- cgit v1.2.3