aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/common/ad9361_driver
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2015-08-17 14:41:46 -0700
committerMartin Braun <martin.braun@ettus.com>2015-08-17 18:10:09 -0700
commit92539438c228b784a0254d9b2aae143686fa672e (patch)
tree7c50343a852d64956ba77e89f5029d5863768428 /host/lib/usrp/common/ad9361_driver
parent868cbac336eb4e4191079ba08c97fa9b40890157 (diff)
downloaduhd-92539438c228b784a0254d9b2aae143686fa672e.tar.gz
uhd-92539438c228b784a0254d9b2aae143686fa672e.tar.bz2
uhd-92539438c228b784a0254d9b2aae143686fa672e.zip
B2XX: Added B200mini support
Diffstat (limited to 'host/lib/usrp/common/ad9361_driver')
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_device.cpp14
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_device.h2
2 files changed, 12 insertions, 4 deletions
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
index c3bc2d32b..0a8a61575 100644
--- a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
+++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
@@ -1286,16 +1286,16 @@ double ad9361_device_t::_tune_helper(direction_t direction, const double value)
/* Set band-specific settings. */
if (value < _client_params->get_band_edge(AD9361_RX_BAND0)) {
- _regs.inputsel = (_regs.inputsel & 0xC0) | 0x30;
+ _regs.inputsel = (_regs.inputsel & 0xC0) | 0x30; // Port C, balanced
} else if ((value
>= _client_params->get_band_edge(AD9361_RX_BAND0))
&& (value
< _client_params->get_band_edge(AD9361_RX_BAND1))) {
- _regs.inputsel = (_regs.inputsel & 0xC0) | 0x0C;
+ _regs.inputsel = (_regs.inputsel & 0xC0) | 0x0C; // Port B, balanced
} else if ((value
>= _client_params->get_band_edge(AD9361_RX_BAND1))
&& (value <= 6e9)) {
- _regs.inputsel = (_regs.inputsel & 0xC0) | 0x03;
+ _regs.inputsel = (_regs.inputsel & 0xC0) | 0x03; // Port A, balanced
} else {
throw uhd::runtime_error("[ad9361_device_t] [_tune_helper] INVALID_CODE_PATH");
}
@@ -2127,7 +2127,7 @@ double ad9361_device_t::set_gain(direction_t direction, chain_t chain, const dou
}
}
-void ad9361_device_t::output_test_tone()
+void ad9361_device_t::output_test_tone() // On RF side!
{
boost::lock_guard<boost::recursive_mutex> lock(_mutex);
/* Output a 480 kHz tone at 800 MHz */
@@ -2137,6 +2137,12 @@ void ad9361_device_t::output_test_tone()
_io_iface->poke8(0x3FE, 0x3F);
}
+void ad9361_device_t::digital_test_tone(bool enb) // Digital output
+{
+ boost::lock_guard<boost::recursive_mutex> lock(_mutex);
+ _io_iface->poke8(0x3F4, 0x02 | (enb ? 0x01 : 0x00));
+}
+
void ad9361_device_t::data_port_loopback(const bool loopback_enabled)
{
boost::lock_guard<boost::recursive_mutex> lock(_mutex);
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.h b/host/lib/usrp/common/ad9361_driver/ad9361_device.h
index efd0f017c..66bc2e8b9 100644
--- a/host/lib/usrp/common/ad9361_driver/ad9361_device.h
+++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.h
@@ -115,6 +115,8 @@ public:
/* Make AD9361 output its test tone. */
void output_test_tone();
+ void digital_test_tone(bool enb); // Digital output
+
/* Turn on/off AD9361's TX port --> RX port loopback. */
void data_port_loopback(const bool loopback_enabled);