aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/twinrx
diff options
context:
space:
mode:
authorBrent Stapleton <brent.stapleton@ettus.com>2019-11-18 14:39:12 +0530
committerBrent Stapleton <brent.stapleton@ettus.com>2020-01-09 09:18:25 -0800
commit708840002eef7104d930e2b25f0d9ca203c5d507 (patch)
tree3b19d154d445b18813e8facadd01479a17070423 /host/lib/usrp/dboard/twinrx
parentd1398bbab629042bf62d4fda93ed503e54cadc7d (diff)
downloaduhd-708840002eef7104d930e2b25f0d9ca203c5d507.tar.gz
uhd-708840002eef7104d930e2b25f0d9ca203c5d507.tar.bz2
uhd-708840002eef7104d930e2b25f0d9ca203c5d507.zip
uhd: fixing MSVC warnings
Small changes to remove various compiler warnings found in MSVC - Adding uhd::narrow_cast to verious spots - wavetable.hpp: all floats literals in the wavetable. - paths_test: unnecessary character escape - replay example: remove unreferenced noc_id - adfXXXX: Fixing qualifiers to match between parent and derived classes - rpc, block_id: Removing unused name in try...catch
Diffstat (limited to 'host/lib/usrp/dboard/twinrx')
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp
index 91cfa22ca..85ed3ddb7 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp
@@ -1,5 +1,6 @@
//
// Copyright 2015-2017 Ettus Research, A National Instruments Company
+// Copyright 2019 Ettus Research, A National Instruments Brand
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
@@ -8,6 +9,7 @@
#include "twinrx_ids.hpp"
#include <uhdlib/usrp/common/adf435x.hpp>
#include <uhdlib/usrp/common/adf535x.hpp>
+#include <uhdlib/utils/narrow.hpp>
#include <uhd/utils/math.hpp>
#include <uhd/utils/safe_call.hpp>
#include <chrono>
@@ -41,7 +43,8 @@ public:
{
// SPI configuration
_spi_config.use_custom_divider = true;
- _spi_config.divider = std::ceil(_db_iface->get_codec_rate(dboard_iface::UNIT_TX) / TWINRX_SPI_CLOCK_FREQ);
+ _spi_config.divider = uhd::narrow_cast<size_t>(std::ceil(
+ _db_iface->get_codec_rate(dboard_iface::UNIT_TX) / TWINRX_SPI_CLOCK_FREQ));
//Initialize dboard clocks
bool found_rate = false;