aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/dboard/basic.cpp44
-rw-r--r--host/lib/usrp/dboard_manager.cpp13
2 files changed, 22 insertions, 35 deletions
diff --git a/host/lib/usrp/dboard/basic.cpp b/host/lib/usrp/dboard/basic.cpp
index 4b74e4a47..1059feb19 100644
--- a/host/lib/usrp/dboard/basic.cpp
+++ b/host/lib/usrp/dboard/basic.cpp
@@ -111,12 +111,13 @@ void basic_rx::rx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_GAIN:
- case SUBDEV_PROP_GAIN_MAX:
- case SUBDEV_PROP_GAIN_MIN:
- case SUBDEV_PROP_GAIN_STEP:
val = gain_t(0);
return;
+ case SUBDEV_PROP_GAIN_RANGE:
+ val = gain_range_t(0, 0, 0);
+ return;
+
case SUBDEV_PROP_GAIN_NAMES:
val = prop_names_t(); //empty
return;
@@ -125,12 +126,8 @@ void basic_rx::rx_get(const wax::obj &key_, wax::obj &val){
val = freq_t(0);
return;
- case SUBDEV_PROP_FREQ_MAX:
- val = +_max_freq;
- return;
-
- case SUBDEV_PROP_FREQ_MIN:
- val = -_max_freq;
+ case SUBDEV_PROP_FREQ_RANGE:
+ val = freq_range_t(+_max_freq, -_max_freq);
return;
case SUBDEV_PROP_ANTENNA:
@@ -177,13 +174,10 @@ void basic_rx::rx_set(const wax::obj &key_, const wax::obj &val){
case SUBDEV_PROP_NAME:
case SUBDEV_PROP_OTHERS:
- case SUBDEV_PROP_GAIN_MAX:
- case SUBDEV_PROP_GAIN_MIN:
- case SUBDEV_PROP_GAIN_STEP:
+ case SUBDEV_PROP_GAIN_RANGE:
case SUBDEV_PROP_GAIN_NAMES:
case SUBDEV_PROP_FREQ:
- case SUBDEV_PROP_FREQ_MAX:
- case SUBDEV_PROP_FREQ_MIN:
+ case SUBDEV_PROP_FREQ_RANGE:
case SUBDEV_PROP_ANTENNA_NAMES:
case SUBDEV_PROP_QUADRATURE:
case SUBDEV_PROP_IQ_SWAPPED:
@@ -223,12 +217,13 @@ void basic_tx::tx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_GAIN:
- case SUBDEV_PROP_GAIN_MAX:
- case SUBDEV_PROP_GAIN_MIN:
- case SUBDEV_PROP_GAIN_STEP:
val = gain_t(0);
return;
+ case SUBDEV_PROP_GAIN_RANGE:
+ val = gain_range_t(0, 0, 0);
+ return;
+
case SUBDEV_PROP_GAIN_NAMES:
val = prop_names_t(); //empty
return;
@@ -237,12 +232,8 @@ void basic_tx::tx_get(const wax::obj &key_, wax::obj &val){
val = freq_t(0);
return;
- case SUBDEV_PROP_FREQ_MAX:
- val = +_max_freq;
- return;
-
- case SUBDEV_PROP_FREQ_MIN:
- val = -_max_freq;
+ case SUBDEV_PROP_FREQ_RANGE:
+ val = freq_range_t(+_max_freq, -_max_freq);
return;
case SUBDEV_PROP_ANTENNA:
@@ -289,13 +280,10 @@ void basic_tx::tx_set(const wax::obj &key_, const wax::obj &val){
case SUBDEV_PROP_NAME:
case SUBDEV_PROP_OTHERS:
- case SUBDEV_PROP_GAIN_MAX:
- case SUBDEV_PROP_GAIN_MIN:
- case SUBDEV_PROP_GAIN_STEP:
+ case SUBDEV_PROP_GAIN_RANGE:
case SUBDEV_PROP_GAIN_NAMES:
case SUBDEV_PROP_FREQ:
- case SUBDEV_PROP_FREQ_MAX:
- case SUBDEV_PROP_FREQ_MIN:
+ case SUBDEV_PROP_FREQ_RANGE:
case SUBDEV_PROP_ANTENNA_NAMES:
case SUBDEV_PROP_QUADRATURE:
case SUBDEV_PROP_IQ_SWAPPED:
diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp
index 08b92e62a..23c2921d2 100644
--- a/host/lib/usrp/dboard_manager.cpp
+++ b/host/lib/usrp/dboard_manager.cpp
@@ -70,16 +70,15 @@ public:
subdev_proxy(dboard_base::sptr subdev, type_t type)
: _subdev(subdev), _type(type){
//initialize gain props struct
- gain_handler::gain_props_t gain_props;
- gain_props.gain_val_prop = SUBDEV_PROP_GAIN;
- gain_props.gain_min_prop = SUBDEV_PROP_GAIN_MIN;
- gain_props.gain_max_prop = SUBDEV_PROP_GAIN_MAX;
- gain_props.gain_step_prop = SUBDEV_PROP_GAIN_STEP;
- gain_props.gain_names_prop = SUBDEV_PROP_GAIN_NAMES;
+ gain_handler::props_t gain_props;
+ gain_props.value = SUBDEV_PROP_GAIN;
+ gain_props.range = SUBDEV_PROP_GAIN_RANGE;
+ gain_props.names = SUBDEV_PROP_GAIN_NAMES;
//make a new gain handler
_gain_handler = gain_handler::make(
- this->get_link(), gain_props, boost::bind(&gain_handler::is_equal<subdev_prop_t>, _1, _2)
+ this->get_link(), gain_props,
+ boost::bind(&gain_handler::is_equal<subdev_prop_t>, _1, _2)
);
}