summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-06 11:46:19 -0700
committerJosh Blum <josh@joshknows.com>2010-04-06 11:46:19 -0700
commit9a0087da6c58e93fac6050c4541b1683a02b2d5b (patch)
tree495decb3c7a5dd0f1c6dac2b116c1f12859907be /host/lib/usrp/dboard
parent275b29e07f97cdf638ecb22c602d26b7d340547a (diff)
parent8ee3d7200169983e7a20409ed5e8c37907fe66e1 (diff)
downloaduhd-9a0087da6c58e93fac6050c4541b1683a02b2d5b.tar.gz
uhd-9a0087da6c58e93fac6050c4541b1683a02b2d5b.tar.bz2
uhd-9a0087da6c58e93fac6050c4541b1683a02b2d5b.zip
Merge branch 'master' of git@ettus.sourcerepo.com:ettus/uhd into rfx
Diffstat (limited to 'host/lib/usrp/dboard')
-rw-r--r--host/lib/usrp/dboard/db_basic_and_lf.cpp44
1 files changed, 16 insertions, 28 deletions
diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp
index 2f6890b25..5a992339b 100644
--- a/host/lib/usrp/dboard/db_basic_and_lf.cpp
+++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp
@@ -87,8 +87,6 @@ UHD_STATIC_BLOCK(reg_basic_and_lf_dboards){
**********************************************************************/
basic_rx::basic_rx(ctor_args_t const& args, double max_freq) : rx_dboard_base(args){
_max_freq = max_freq;
- // set the gpios to safe values (all inputs)
- get_interface()->set_gpio_ddr(dboard_interface::GPIO_BANK_RX, 0x0000);
}
basic_rx::~basic_rx(void){
@@ -145,8 +143,14 @@ void basic_rx::rx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_IQ_SWAPPED:
+ val = false;
+ return;
+
case SUBDEV_PROP_SPECTRUM_INVERTED:
- case SUBDEV_PROP_LO_INTERFERES:
+ val = false;
+ return;
+
+ case SUBDEV_PROP_USE_LO_OFFSET:
val = false;
return;
}
@@ -170,17 +174,7 @@ void basic_rx::rx_set(const wax::obj &key_, const wax::obj &val){
case SUBDEV_PROP_FREQ:
return; // it wont do you much good, but you can set it
- case SUBDEV_PROP_NAME:
- case SUBDEV_PROP_OTHERS:
- case SUBDEV_PROP_GAIN_RANGE:
- case SUBDEV_PROP_GAIN_NAMES:
- case SUBDEV_PROP_FREQ_RANGE:
- case SUBDEV_PROP_ANTENNA_NAMES:
- case SUBDEV_PROP_QUADRATURE:
- case SUBDEV_PROP_IQ_SWAPPED:
- case SUBDEV_PROP_SPECTRUM_INVERTED:
- case SUBDEV_PROP_LO_INTERFERES:
- throw std::runtime_error(str(boost::format(
+ default: throw std::runtime_error(str(boost::format(
"Error: trying to set read-only property on %s subdev"
) % dboard_id::to_string(get_rx_id())));
}
@@ -191,8 +185,6 @@ void basic_rx::rx_set(const wax::obj &key_, const wax::obj &val){
**********************************************************************/
basic_tx::basic_tx(ctor_args_t const& args, double max_freq) : tx_dboard_base(args){
_max_freq = max_freq;
- // set the gpios to safe values (all inputs)
- get_interface()->set_gpio_ddr(dboard_interface::GPIO_BANK_TX, 0x0000);
}
basic_tx::~basic_tx(void){
@@ -246,8 +238,14 @@ void basic_tx::tx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_IQ_SWAPPED:
+ val = false;
+ return;
+
case SUBDEV_PROP_SPECTRUM_INVERTED:
- case SUBDEV_PROP_LO_INTERFERES:
+ val = false;
+ return;
+
+ case SUBDEV_PROP_USE_LO_OFFSET:
val = false;
return;
}
@@ -271,17 +269,7 @@ void basic_tx::tx_set(const wax::obj &key_, const wax::obj &val){
case SUBDEV_PROP_FREQ:
return; // it wont do you much good, but you can set it
- case SUBDEV_PROP_NAME:
- case SUBDEV_PROP_OTHERS:
- case SUBDEV_PROP_GAIN_RANGE:
- case SUBDEV_PROP_GAIN_NAMES:
- case SUBDEV_PROP_FREQ_RANGE:
- case SUBDEV_PROP_ANTENNA_NAMES:
- case SUBDEV_PROP_QUADRATURE:
- case SUBDEV_PROP_IQ_SWAPPED:
- case SUBDEV_PROP_SPECTRUM_INVERTED:
- case SUBDEV_PROP_LO_INTERFERES:
- throw std::runtime_error(str(boost::format(
+ default: throw std::runtime_error(str(boost::format(
"Error: trying to set read-only property on %s subdev"
) % dboard_id::to_string(get_tx_id())));
}