aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
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/lib/usrp/usrp2
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/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp8
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp12
2 files changed, 10 insertions, 10 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp b/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp
index efb88eb82..9e8687b94 100644
--- a/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp
@@ -67,7 +67,7 @@ public:
/*******************************************************************
* Peek and poke 32 bit implementation
******************************************************************/
- void poke32(wb_addr_type addr, boost::uint32_t data){
+ void poke32(const wb_addr_type addr, const boost::uint32_t data){
boost::mutex::scoped_lock lock(_mutex);
this->send_pkt((addr - SETTING_REGS_BASE)/4, data, POKE32_CMD);
@@ -75,7 +75,7 @@ public:
this->wait_for_ack(_seq_out-MAX_SEQS_OUT);
}
- boost::uint32_t peek32(wb_addr_type addr){
+ boost::uint32_t peek32(const wb_addr_type addr){
boost::mutex::scoped_lock lock(_mutex);
this->send_pkt((addr - READBACK_BASE)/4, 0, PEEK32_CMD);
@@ -86,11 +86,11 @@ public:
/*******************************************************************
* Peek and poke 16 bit not implemented
******************************************************************/
- void poke16(wb_addr_type, boost::uint16_t){
+ void poke16(const wb_addr_type, const boost::uint16_t){
throw uhd::not_implemented_error("poke16 not implemented in fifo ctrl module");
}
- boost::uint16_t peek16(wb_addr_type){
+ boost::uint16_t peek16(const wb_addr_type){
throw uhd::not_implemented_error("peek16 not implemented in fifo ctrl module");
}
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index 2f2c345be..3ffbf9aac 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -139,19 +139,19 @@ public:
/***********************************************************************
* Peek and Poke
**********************************************************************/
- void poke32(wb_addr_type addr, boost::uint32_t data){
+ void poke32(const wb_addr_type addr, const boost::uint32_t data){
this->get_reg<boost::uint32_t, USRP2_REG_ACTION_FPGA_POKE32>(addr, data);
}
- boost::uint32_t peek32(wb_addr_type addr){
+ boost::uint32_t peek32(const wb_addr_type addr){
return this->get_reg<boost::uint32_t, USRP2_REG_ACTION_FPGA_PEEK32>(addr);
}
- void poke16(wb_addr_type addr, boost::uint16_t data){
+ void poke16(const wb_addr_type addr, const boost::uint16_t data){
this->get_reg<boost::uint16_t, USRP2_REG_ACTION_FPGA_POKE16>(addr, data);
}
- boost::uint16_t peek16(wb_addr_type addr){
+ boost::uint16_t peek16(const wb_addr_type addr){
return this->get_reg<boost::uint16_t, USRP2_REG_ACTION_FPGA_PEEK16>(addr);
}
@@ -219,7 +219,7 @@ public:
//setup the out data
usrp2_ctrl_data_t out_data = usrp2_ctrl_data_t();
out_data.id = htonl(USRP2_CTRL_ID_WRITE_THESE_I2C_VALUES_BRO);
- out_data.data.i2c_args.addr = addr;
+ out_data.data.i2c_args.addr = uint8_t(addr);
out_data.data.i2c_args.bytes = buf.size();
//limitation of i2c transaction size
@@ -237,7 +237,7 @@ public:
//setup the out data
usrp2_ctrl_data_t out_data = usrp2_ctrl_data_t();
out_data.id = htonl(USRP2_CTRL_ID_DO_AN_I2C_READ_FOR_ME_BRO);
- out_data.data.i2c_args.addr = addr;
+ out_data.data.i2c_args.addr = uint8_t(addr);
out_data.data.i2c_args.bytes = num_bytes;
//limitation of i2c transaction size