From 298a13ac3d9f9e785bf031e85060569541ca4b6f Mon Sep 17 00:00:00 2001
From: michael-west <michael.west@ettus.com>
Date: Tue, 5 Dec 2017 16:00:44 -0800
Subject: UBX:  Add support for UBX-TDD

---
 host/lib/usrp/dboard/db_ubx.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'host/lib/usrp/dboard/db_ubx.cpp')

diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp
index 9828a7fc2..a144f1c75 100644
--- a/host/lib/usrp/dboard/db_ubx.cpp
+++ b/host/lib/usrp/dboard/db_ubx.cpp
@@ -160,6 +160,8 @@ static const dboard_id_t UBX_V2_160MHZ_TX_ID(0x7D);
 static const dboard_id_t UBX_V2_160MHZ_RX_ID(0x7E);
 static const dboard_id_t UBX_LP_160MHZ_TX_ID(0x0200);
 static const dboard_id_t UBX_LP_160MHZ_RX_ID(0x0201);
+static const dboard_id_t UBX_TDD_160MHZ_TX_ID(0x0202);
+static const dboard_id_t UBX_TDD_160MHZ_RX_ID(0x0203);
 static const freq_range_t ubx_freq_range(10e6, 6.0e9);
 static const gain_range_t ubx_tx_gain_range(0, 31.5, double(0.5));
 static const gain_range_t ubx_rx_gain_range(0, 31.5, double(0.5));
@@ -227,7 +229,7 @@ public:
         _iface = get_iface();
         dboard_id_t rx_id = get_rx_id();
         dboard_id_t tx_id = get_tx_id();
-        size_t revision = boost::lexical_cast<size_t>(get_rx_eeprom().revision);
+        const size_t revision = boost::lexical_cast<size_t>(get_rx_eeprom().revision);
         _high_isolation = false;
         if (rx_id == UBX_PROTO_V3_RX_ID and tx_id == UBX_PROTO_V3_TX_ID) {
             _rev = 0;
@@ -262,6 +264,11 @@ public:
             bw = 160e6;
             _rev = 2;
         }
+        else if (rx_id == UBX_TDD_160MHZ_RX_ID and tx_id == UBX_TDD_160MHZ_TX_ID) {
+            bw = 160e6;
+            _rev = 2;
+            _high_isolation = true;
+        }
         else {
             UHD_THROW_INVALID_CODE_PATH();
         }
@@ -1318,4 +1325,5 @@ UHD_STATIC_BLOCK(reg_ubx_dboards)
     dboard_manager::register_dboard(UBX_V2_40MHZ_RX_ID,  UBX_V2_40MHZ_TX_ID,  &make_ubx, "UBX-40 v2");
     dboard_manager::register_dboard(UBX_V2_160MHZ_RX_ID, UBX_V2_160MHZ_TX_ID, &make_ubx, "UBX-160 v2");
     dboard_manager::register_dboard(UBX_LP_160MHZ_RX_ID, UBX_LP_160MHZ_TX_ID, &make_ubx, "UBX-160-LP");
+    dboard_manager::register_dboard(UBX_TDD_160MHZ_RX_ID, UBX_TDD_160MHZ_TX_ID, &make_ubx, "UBX-TDD");
 }
-- 
cgit v1.2.3