diff options
author | Thomas Tsou <tom@tsou.cc> | 2013-08-21 17:55:54 -0400 |
---|---|---|
committer | Thomas Tsou <tom@tsou.cc> | 2013-10-18 13:10:17 -0400 |
commit | c88d8d53f8685298b80940361fcd06ef38887152 (patch) | |
tree | 20c0c09ab03480431f5652b5b0e8a32de72ae9f5 | |
parent | 9ccd9f2c3c5fb69c79661568e08e20d7a7582ab5 (diff) |
Transceiver52M: Add UmTRX support
Requires Fairwaves UHD driver.
https://github.com/chemeris/UHD-Fairwaves.git
Signed-off-by: Thomas Tsou <tom@tsou.cc>
-rw-r--r-- | Transceiver52M/UHDDevice.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index 261a32f..8206d3a 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -42,6 +42,7 @@ enum uhd_dev_type { USRP1, USRP2, B100, + UMTRX, NUM_USRP_TYPES, }; @@ -71,6 +72,9 @@ static struct uhd_dev_offset uhd_offsets[NUM_USRP_TYPES * 3] = { { B100, 1, 9.4778e-5 }, { B100, 2, 5.1100e-5 }, { B100, 4, 2.9418e-5 }, + { UMTRX, 1, 9.4778e-5 }, + { UMTRX, 2, 0.0 }, + { UMTRX, 4, 0.0 }, }; static double get_dev_offset(enum uhd_dev_type type, int sps) @@ -106,9 +110,10 @@ static double select_rate(uhd_dev_type type, int sps) switch (type) { case USRP2: return USRP2_BASE_RT * sps; - break; case B100: - return B100_BASE_RT * sps; + case UMTRX: + return GSMRATE * sps; + default: break; } @@ -466,7 +471,7 @@ bool uhd_device::parse_dev_type() { std::string mboard_str, dev_str; uhd::property_tree::sptr prop_tree; - size_t usrp1_str, usrp2_str, b100_str; + size_t usrp1_str, usrp2_str, b100_str, umtrx_str; prop_tree = usrp_dev->get_device()->get_tree(); dev_str = prop_tree->access<std::string>("/name").get(); @@ -475,6 +480,7 @@ bool uhd_device::parse_dev_type() usrp1_str = dev_str.find("USRP1"); usrp2_str = dev_str.find("USRP2"); b100_str = mboard_str.find("B100"); + umtrx_str = dev_str.find("UmTRX"); if (usrp1_str != std::string::npos) { LOG(ALERT) << "USRP1 is not supported using the UHD driver"; @@ -491,6 +497,8 @@ bool uhd_device::parse_dev_type() return true; } else if (usrp2_str != std::string::npos) { dev_type = USRP2; + } else if (umtrx_str != std::string::npos) { + dev_type = UMTRX; } else { LOG(ALERT) << "Unknown UHD device type"; return false; |