diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-10-12 16:26:19 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-10-12 16:26:19 -0700 |
commit | 5b4cbfe4616492d96ad1b48578cf2d94e1216bf4 (patch) | |
tree | 67d843278ead59b2e85725b3dbc3de80562d9ccd /host/lib/usrp/usrp2/codec_impl.cpp | |
parent | 5982ec4ee2c6f9efca1c5068e42dc38b822df7dc (diff) | |
download | uhd-5b4cbfe4616492d96ad1b48578cf2d94e1216bf4.tar.gz uhd-5b4cbfe4616492d96ad1b48578cf2d94e1216bf4.tar.bz2 uhd-5b4cbfe4616492d96ad1b48578cf2d94e1216bf4.zip |
USRP2P: mboard rev works through props interface.
Added usrp2_burn_mb_rev.cpp to utils. It is not installed to the utils install dir.
Not all happy with the mboard_rev setup -- is_usrp2p() is too specific for a generalized mboard_rev concept. I'm not sure where else to put it so for now it stays.
Diffstat (limited to 'host/lib/usrp/usrp2/codec_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/codec_impl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp2/codec_impl.cpp b/host/lib/usrp/usrp2/codec_impl.cpp index 04a11d922..6065b6c28 100644 --- a/host/lib/usrp/usrp2/codec_impl.cpp +++ b/host/lib/usrp/usrp2/codec_impl.cpp @@ -67,7 +67,7 @@ void usrp2_mboard_impl::rx_codec_get(const wax::obj &key_, wax::obj &val){ return; case CODEC_PROP_GAIN_NAMES: - if(_iface->get_hw_rev().to_uint16() >= USRP2P_FIRST_HW_REV) { + if(_iface->get_hw_rev().is_usrp2p()) { val = prop_names_t(codec_rx_gain_ranges.keys()); } else val = prop_names_t(); return; @@ -94,7 +94,7 @@ void usrp2_mboard_impl::rx_codec_set(const wax::obj &key_, const wax::obj &val){ switch(key.as<codec_prop_t>()) { case CODEC_PROP_GAIN_I: case CODEC_PROP_GAIN_Q: - if(_iface->get_hw_rev().to_uint16() < USRP2P_FIRST_HW_REV) UHD_THROW_PROP_SET_ERROR();//this capability is only found in USRP2P + if(!_iface->get_hw_rev().is_usrp2p()) UHD_THROW_PROP_SET_ERROR();//this capability is only found in USRP2P gain = val.as<float>(); this->rx_codec_set_gain(gain, key.name); |