aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-12 16:01:01 -0800
committerJosh Blum <josh@joshknows.com>2010-03-12 16:01:01 -0800
commit2147c5f61c2eb6ef1a68419d7b1041a54cbb14a2 (patch)
tree48dbcb58924a3c547979cb4a95a5de35278aeec1 /host/lib/usrp/dboard
parentdaed43a8a873ad5cc16ac8a3eb6db5a8fe126fa5 (diff)
downloaduhd-2147c5f61c2eb6ef1a68419d7b1041a54cbb14a2.tar.gz
uhd-2147c5f61c2eb6ef1a68419d7b1041a54cbb14a2.tar.bz2
uhd-2147c5f61c2eb6ef1a68419d7b1041a54cbb14a2.zip
Removed freq min and max and gain min, max, and step...
replaced it with gain and freq range tuples. This simplifies the api calls and subdev properties.
Diffstat (limited to 'host/lib/usrp/dboard')
-rw-r--r--host/lib/usrp/dboard/basic.cpp44
1 files changed, 16 insertions, 28 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: