aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/cores
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2015-03-27 13:35:27 -0700
committerMartin Braun <martin.braun@ettus.com>2015-03-27 13:35:27 -0700
commit88ffeb35dadb3d10593be39c9eae2f90c4d7c008 (patch)
tree4dc3fb96097260c3eb46e45ebba39c17efb3af7a /host/lib/usrp/cores
parent5b285598d367b936caf91b615e30e90af8af2a5d (diff)
parent1200721b696751edaceb70a332861f84fb8c16d5 (diff)
downloaduhd-88ffeb35dadb3d10593be39c9eae2f90c4d7c008.tar.gz
uhd-88ffeb35dadb3d10593be39c9eae2f90c4d7c008.tar.bz2
uhd-88ffeb35dadb3d10593be39c9eae2f90c4d7c008.zip
Merge branch 'maint'
Diffstat (limited to 'host/lib/usrp/cores')
-rw-r--r--host/lib/usrp/cores/i2c_core_100_wb32.cpp4
-rw-r--r--host/lib/usrp/cores/radio_ctrl_core_3000.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/usrp/cores/i2c_core_100_wb32.cpp b/host/lib/usrp/cores/i2c_core_100_wb32.cpp
index a85cdea42..530267f6c 100644
--- a/host/lib/usrp/cores/i2c_core_100_wb32.cpp
+++ b/host/lib/usrp/cores/i2c_core_100_wb32.cpp
@@ -70,7 +70,7 @@ public:
void set_clock_rate(const double rate)
{
static const boost::uint32_t i2c_datarate = 400000;
- boost::uint16_t prescaler = rate / (i2c_datarate*5) - 1;
+ boost::uint16_t prescaler = boost::uint16_t(rate / (i2c_datarate*5) - 1);
_iface->poke32(REG_I2C_PRESCALER_LO, prescaler & 0xFF);
_iface->poke32(REG_I2C_PRESCALER_HI, (prescaler >> 8) & 0xFF);
}
@@ -127,7 +127,7 @@ public:
//the default implementation calls read i2c once per byte
byte_vector_t read_eeprom(boost::uint16_t addr, boost::uint16_t offset, size_t num_bytes)
{
- this->write_i2c(addr, byte_vector_t(1, offset));
+ this->write_i2c(addr, byte_vector_t(1, boost::uint8_t(offset)));
return this->read_i2c(addr, num_bytes);
}
diff --git a/host/lib/usrp/cores/radio_ctrl_core_3000.cpp b/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
index 6357102fb..1c9b5c4fa 100644
--- a/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
+++ b/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
@@ -190,7 +190,7 @@ private:
try
{
UHD_ASSERT_THROW(bool(buff));
- UHD_ASSERT_THROW(bool(buff->size()));
+ UHD_ASSERT_THROW(buff->size() > 0);
}
catch(const std::exception &ex)
{