aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2015-03-30 16:56:01 -0700
committerAshish Chaudhari <ashish@ettus.com>2015-03-30 16:56:01 -0700
commit700bf99bdc483fdcc9deb54abc29bd7f81e16089 (patch)
tree42d4f30e7a4abc9e47dcd01300a2f44ab1b91510 /host/include
parent6a34824ad10eaa2d2b642b959f278f6c4e326d6d (diff)
parent61599b3eaadcc46ac8d24974176d7fd89778d06e (diff)
downloaduhd-700bf99bdc483fdcc9deb54abc29bd7f81e16089.tar.gz
uhd-700bf99bdc483fdcc9deb54abc29bd7f81e16089.tar.bz2
uhd-700bf99bdc483fdcc9deb54abc29bd7f81e16089.zip
Merge branch 'master' into ashish/vivado
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/config.hpp4
-rw-r--r--host/include/uhd/transport/nirio/nirio_driver_iface.h10
-rw-r--r--host/include/uhd/transport/nirio/nirio_fifo.ipp5
-rw-r--r--host/include/uhd/transport/nirio/nirio_resource_manager.h6
-rw-r--r--host/include/uhd/types/CMakeLists.txt1
-rw-r--r--host/include/uhd/types/byte_vector.hpp48
-rw-r--r--host/include/uhd/types/filters.hpp2
-rw-r--r--host/include/uhd/usrp/multi_usrp.hpp1
-rw-r--r--host/include/uhd/usrp_clock/multi_usrp_clock.hpp2
9 files changed, 68 insertions, 11 deletions
diff --git a/host/include/uhd/config.hpp b/host/include/uhd/config.hpp
index 23eb9cdb2..8939cd773 100644
--- a/host/include/uhd/config.hpp
+++ b/host/include/uhd/config.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2011,2014 Ettus Research LLC
+// Copyright 2010-2011,2014-2015 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
@@ -62,7 +62,7 @@ typedef ptrdiff_t ssize_t;
#define UHD_INLINE inline
#define UHD_DEPRECATED __declspec(deprecated)
#define UHD_ALIGNED(x) __declspec(align(x))
- #define UHD_UNUSED(x) x
+ #define UHD_UNUSED(x) x __attribute__((unused))
#elif defined(__GNUG__) && __GNUG__ >= 4
#define UHD_EXPORT __attribute__((visibility("default")))
#define UHD_IMPORT __attribute__((visibility("default")))
diff --git a/host/include/uhd/transport/nirio/nirio_driver_iface.h b/host/include/uhd/transport/nirio/nirio_driver_iface.h
index 3e0e56a7f..c562f0ca5 100644
--- a/host/include/uhd/transport/nirio/nirio_driver_iface.h
+++ b/host/include/uhd/transport/nirio/nirio_driver_iface.h
@@ -1,5 +1,5 @@
//
-// Copyright 2013-2014 Ettus Research LLC
+// Copyright 2013-2015 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
@@ -25,9 +25,13 @@
#include <uhd/config.hpp>
#if defined(UHD_PLATFORM_WIN32)
#include <windows.h>
- #pragma warning(disable:4201) // nonstandard extension used : nameless struct/union
+ #ifdef _MSC_VER
+ #pragma warning(disable:4201) // nonstandard extension used : nameless struct/union
+ #endif
#include <winioctl.h>
- #pragma warning(default:4201)
+ #ifdef _MSC_VER
+ #pragma warning(default:4201)
+ #endif
#elif !defined(UHD_PLATFORM_LINUX)
#include <IOKit/IOKitLib.h>
#endif
diff --git a/host/include/uhd/transport/nirio/nirio_fifo.ipp b/host/include/uhd/transport/nirio/nirio_fifo.ipp
index 49ce43888..72a337ac2 100644
--- a/host/include/uhd/transport/nirio/nirio_fifo.ipp
+++ b/host/include/uhd/transport/nirio/nirio_fifo.ipp
@@ -1,5 +1,5 @@
//
-// Copyright 2013-2014 Ettus Research LLC
+// Copyright 2013-2015 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
@@ -42,7 +42,8 @@ nirio_fifo<data_t>::nirio_fifo(
{
nirio_status status = 0;
nirio_status_chain(_riok_proxy_ptr->set_attribute(RIO_ADDRESS_SPACE, BUS_INTERFACE), status);
- uint32_t base_addr, addr_space_word;
+ uint32_t base_addr = 0;
+ uint32_t addr_space_word = 0;
nirio_status_chain(_riok_proxy_ptr->peek(0x1C, base_addr), status);
nirio_status_chain(_riok_proxy_ptr->peek(0xC, addr_space_word), status);
_dma_base_addr = base_addr + (_fifo_channel * (1<<((addr_space_word>>16)&0xF)));
diff --git a/host/include/uhd/transport/nirio/nirio_resource_manager.h b/host/include/uhd/transport/nirio/nirio_resource_manager.h
index c71f1c8aa..301b588c7 100644
--- a/host/include/uhd/transport/nirio/nirio_resource_manager.h
+++ b/host/include/uhd/transport/nirio/nirio_resource_manager.h
@@ -1,5 +1,5 @@
//
-// Copyright 2013 Ettus Research LLC
+// Copyright 2013,2015 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
@@ -78,7 +78,7 @@ public:
}
if (fifo->get_channel() != fifo_info_ptr->channel) return NiRio_Status_InvalidParameter;
- if (fifo->get_scalar_type() != fifo_info_ptr->scalar_type) return NiRio_Status_InvalidParameter;
+ if (nirio_scalar_type_t(fifo->get_scalar_type()) != fifo_info_ptr->scalar_type) return NiRio_Status_InvalidParameter;
return NiRio_Status_Success;
}
@@ -94,7 +94,7 @@ public:
}
if (fifo->get_channel() != fifo_info_ptr->channel) return NiRio_Status_InvalidParameter;
- if (fifo->get_scalar_type() != fifo_info_ptr->scalar_type) return NiRio_Status_InvalidParameter;
+ if (nirio_scalar_type_t(fifo->get_scalar_type()) != fifo_info_ptr->scalar_type) return NiRio_Status_InvalidParameter;
return NiRio_Status_Success;
}
diff --git a/host/include/uhd/types/CMakeLists.txt b/host/include/uhd/types/CMakeLists.txt
index b82c2b7f2..2a25df35f 100644
--- a/host/include/uhd/types/CMakeLists.txt
+++ b/host/include/uhd/types/CMakeLists.txt
@@ -17,6 +17,7 @@
UHD_INSTALL(FILES
+ byte_vector.hpp
clock_config.hpp
device_addr.hpp
dict.ipp
diff --git a/host/include/uhd/types/byte_vector.hpp b/host/include/uhd/types/byte_vector.hpp
new file mode 100644
index 000000000..b7637fb5d
--- /dev/null
+++ b/host/include/uhd/types/byte_vector.hpp
@@ -0,0 +1,48 @@
+//
+// Copyright 2015 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 <http://www.gnu.org/licenses/>.
+//
+
+#ifndef INCLUDED_UHD_TYPES_BYTE_VECTOR_HPP
+#define INCLUDED_UHD_TYPES_BYTE_VECTOR_HPP
+
+#include <algorithm>
+#include <string>
+#include <vector>
+
+#include <boost/assign.hpp>
+#include <boost/cstdint.hpp>
+
+#include <uhd/config.hpp>
+
+namespace uhd{
+
+ //! Byte vector used for I2C data passing and EEPROM parsing.
+ typedef std::vector<boost::uint8_t> byte_vector_t;
+
+ template<typename RangeSrc, typename RangeDst> UHD_INLINE
+ void byte_copy(const RangeSrc &src, RangeDst &dst){
+ std::copy(boost::begin(src), boost::end(src), boost::begin(dst));
+ }
+
+ //! Create a string from a byte vector, terminate when invalid ASCII encountered
+ UHD_API std::string bytes_to_string(const byte_vector_t &bytes);
+
+ //! Create a byte vector from a string, end at null terminator or max length
+ UHD_API byte_vector_t string_to_bytes(const std::string &str, size_t max_length);
+
+} //namespace uhd
+
+#endif /* INCLUDED_UHD_TYPES_BYTE_VECTOR_HPP */
diff --git a/host/include/uhd/types/filters.hpp b/host/include/uhd/types/filters.hpp
index 0cb23b294..976ae233d 100644
--- a/host/include/uhd/types/filters.hpp
+++ b/host/include/uhd/types/filters.hpp
@@ -224,7 +224,7 @@ namespace uhd{
"\ttaps: "<<std::endl;
os<<"\t\t";
- for(int i = 0; i < _taps.size(); i++)
+ for(size_t i = 0; i < _taps.size(); i++)
{
os<<"(tap "<<i<<": "<<_taps[i]<<")";
if( ((i%10) == 0) && (i != 0))
diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp
index 1c408d56e..f0bb6d8d3 100644
--- a/host/include/uhd/usrp/multi_usrp.hpp
+++ b/host/include/uhd/usrp/multi_usrp.hpp
@@ -22,6 +22,7 @@
#define UHD_USRP_MULTI_USRP_REF_SOURCES_API
#define UHD_USRP_MULTI_USRP_GET_RATES_API
#define UHD_USRP_MULTI_USRP_FRONTEND_CAL_API
+#define UHD_USRP_MULTI_USRP_FRONTEND_IQ_AUTO_API
#define UHD_USRP_MULTI_USRP_COMMAND_TIME_API
#define UHD_USRP_MULTI_USRP_BW_RANGE_API
#define UHD_USRP_MULTI_USRP_USER_REGS_API
diff --git a/host/include/uhd/usrp_clock/multi_usrp_clock.hpp b/host/include/uhd/usrp_clock/multi_usrp_clock.hpp
index 0b50b32ae..48d433d71 100644
--- a/host/include/uhd/usrp_clock/multi_usrp_clock.hpp
+++ b/host/include/uhd/usrp_clock/multi_usrp_clock.hpp
@@ -57,6 +57,8 @@ class UHD_API multi_usrp_clock : boost::noncopyable {
public:
typedef boost::shared_ptr<multi_usrp_clock> sptr;
+ virtual ~multi_usrp_clock(void) = 0;
+
/*!
* Make a new Multi-USRP-Clock from the given device address.
* \param dev_addr the device address