aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/e300
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-08-01 14:36:07 -0700
committerMartin Braun <martin.braun@ettus.com>2016-08-09 10:21:53 -0700
commit041264b4c46543fcd1a3321017249c1183afa452 (patch)
tree0419864d641d04018f0760ffba23672a5a5d519b /host/lib/usrp/e300
parentce2e7e5197ea7db5454a381c5b75c1c63b2d2d59 (diff)
downloaduhd-041264b4c46543fcd1a3321017249c1183afa452.tar.gz
uhd-041264b4c46543fcd1a3321017249c1183afa452.tar.bz2
uhd-041264b4c46543fcd1a3321017249c1183afa452.zip
ad936x: Loopback check now takes peeker/poker functors instead of assuming any kind of interface
Diffstat (limited to 'host/lib/usrp/e300')
-rw-r--r--host/lib/usrp/e300/e300_impl.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/host/lib/usrp/e300/e300_impl.cpp b/host/lib/usrp/e300/e300_impl.cpp
index 5a589a7fd..114686b4f 100644
--- a/host/lib/usrp/e300/e300_impl.cpp
+++ b/host/lib/usrp/e300/e300_impl.cpp
@@ -510,11 +510,16 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
for(size_t instance = 0; instance < fpga::NUM_RADIOS; instance++)
this->_setup_radio(instance);
- // Radio 0 loopback through AD9361
- _codec_mgr->loopback_self_test(_radio_perifs[0].ctrl, radio::sr_addr(radio::CODEC_IDLE), radio::RB64_CODEC_READBACK);
- // Radio 1 loopback through AD9361
- _codec_mgr->loopback_self_test(_radio_perifs[1].ctrl, radio::sr_addr(radio::CODEC_IDLE), radio::RB64_CODEC_READBACK);
-
+ //now test each radio module's connection to the codec interface
+ BOOST_FOREACH(radio_perifs_t &perif, _radio_perifs)
+ {
+ _codec_mgr->loopback_self_test(
+ boost::bind(
+ &radio_ctrl_core_3000::poke32, perif.ctrl, radio::sr_addr(radio::CODEC_IDLE), _1
+ ),
+ boost::bind(&radio_ctrl_core_3000::peek64, perif.ctrl, radio::RB64_CODEC_READBACK)
+ );
+ }
////////////////////////////////////////////////////////////////////
// internal gpios
////////////////////////////////////////////////////////////////////