summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-09-28 17:46:39 -0700
committerNick Foster <nick@nerdnetworks.org>2010-09-28 17:46:39 -0700
commit450abc5b213fc477ae0f2d648405a8b6a55a7b03 (patch)
tree01820d898ecd6541f988378413b4c55f16ebad6d /host/lib/usrp/usrp2
parent7cb95203f8d7173e3d7070d24f68358be67d0b29 (diff)
parentb70d4430d4a898fe99b54740a1c4821ed9a1077b (diff)
downloaduhd-450abc5b213fc477ae0f2d648405a8b6a55a7b03.tar.gz
uhd-450abc5b213fc477ae0f2d648405a8b6a55a7b03.tar.bz2
uhd-450abc5b213fc477ae0f2d648405a8b6a55a7b03.zip
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into tvrx_uhd
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/dsp_impl.cpp24
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp4
2 files changed, 22 insertions, 6 deletions
diff --git a/host/lib/usrp/usrp2/dsp_impl.cpp b/host/lib/usrp/usrp2/dsp_impl.cpp
index 6422142ce..0c85e643f 100644
--- a/host/lib/usrp/usrp2/dsp_impl.cpp
+++ b/host/lib/usrp/usrp2/dsp_impl.cpp
@@ -56,7 +56,9 @@ void usrp2_mboard_impl::init_ddc_config(void){
/***********************************************************************
* DDC Properties
**********************************************************************/
-void usrp2_mboard_impl::ddc_get(const wax::obj &key, wax::obj &val){
+void usrp2_mboard_impl::ddc_get(const wax::obj &key_, wax::obj &val){
+ named_prop_t key = named_prop_t::extract(key_);
+
switch(key.as<dsp_prop_t>()){
case DSP_PROP_NAME:
val = std::string("usrp2 ddc0");
@@ -70,6 +72,10 @@ void usrp2_mboard_impl::ddc_get(const wax::obj &key, wax::obj &val){
val = _ddc_freq;
return;
+ case DSP_PROP_FREQ_SHIFT_NAMES:
+ val = prop_names_t(1, "");
+ return;
+
case DSP_PROP_CODEC_RATE:
val = get_master_clock_freq();
return;
@@ -82,7 +88,9 @@ void usrp2_mboard_impl::ddc_get(const wax::obj &key, wax::obj &val){
}
}
-void usrp2_mboard_impl::ddc_set(const wax::obj &key, const wax::obj &val){
+void usrp2_mboard_impl::ddc_set(const wax::obj &key_, const wax::obj &val){
+ named_prop_t key = named_prop_t::extract(key_);
+
switch(key.as<dsp_prop_t>()){
case DSP_PROP_FREQ_SHIFT:{
@@ -131,7 +139,9 @@ void usrp2_mboard_impl::init_duc_config(void){
/***********************************************************************
* DUC Properties
**********************************************************************/
-void usrp2_mboard_impl::duc_get(const wax::obj &key, wax::obj &val){
+void usrp2_mboard_impl::duc_get(const wax::obj &key_, wax::obj &val){
+ named_prop_t key = named_prop_t::extract(key_);
+
switch(key.as<dsp_prop_t>()){
case DSP_PROP_NAME:
val = std::string("usrp2 duc0");
@@ -145,6 +155,10 @@ void usrp2_mboard_impl::duc_get(const wax::obj &key, wax::obj &val){
val = _duc_freq;
return;
+ case DSP_PROP_FREQ_SHIFT_NAMES:
+ val = prop_names_t(1, "");
+ return;
+
case DSP_PROP_CODEC_RATE:
val = get_master_clock_freq();
return;
@@ -157,7 +171,9 @@ void usrp2_mboard_impl::duc_get(const wax::obj &key, wax::obj &val){
}
}
-void usrp2_mboard_impl::duc_set(const wax::obj &key, const wax::obj &val){
+void usrp2_mboard_impl::duc_set(const wax::obj &key_, const wax::obj &val){
+ named_prop_t key = named_prop_t::extract(key_);
+
switch(key.as<dsp_prop_t>()){
case DSP_PROP_FREQ_SHIFT:{
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index 4e883cf81..65411801d 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -150,7 +150,7 @@ void usrp2_impl::io_init(void){
std::memcpy(send_buff->cast<void*>(), &data, sizeof(data));
send_buff->commit(sizeof(data));
//drain the recv buffers (may have junk)
- while (data_transport->get_recv_buff().get());
+ while (data_transport->get_recv_buff().get()){};
}
//the number of recv frames is the number for the first transport
@@ -189,7 +189,7 @@ bool usrp2_impl::recv_async_msg(
/***********************************************************************
* Send Data
**********************************************************************/
-bool get_send_buffs(
+static bool get_send_buffs(
const std::vector<udp_zero_copy::sptr> &trans,
vrt_packet_handler::managed_send_buffs_t &buffs
){