6
« on: September 01, 2015, 06:43:02 AM »
Yes you definitely need to patch.
Here is mine:
--- UHDDevice.cpp 2014-04-16 11:56:39.000000000 +0200
+++ UHDDevice.cpp 2015-08-31 18:03:21.494289230 +0200
@@ -34,6 +34,7 @@
#define B2XX_CLK_RT 52e6
#define B2XX_BASE_RT GSMRATE
+#define X3XX_CLK_RT 104e6
#define B100_BASE_RT 400000
#define USRP2_BASE_RT 390625
#define TX_AMPL 0.3
@@ -44,6 +45,7 @@
USRP2,
B100,
B2XX,
+ X3XX,
UMTRX,
NUM_USRP_TYPES,
};
@@ -73,6 +75,8 @@
{ B100, 4, 7.9307e-5 },
{ B2XX, 1, 9.9692e-5 },
{ B2XX, 4, 6.9248e-5 },
+ { X3XX, 1, 1.5360e-4 },
+ { X3XX, 4, 1.1264e-4 },
{ UMTRX, 1, 9.9692e-5 },
{ UMTRX, 4, 7.3846e-5 },
};
@@ -108,6 +112,8 @@
switch (type) {
case USRP2:
return USRP2_BASE_RT * sps;
+ case X3XX:
+ return USRP2_BASE_RT * sps;
case B100:
return B100_BASE_RT * sps;
case B2XX:
@@ -474,7 +480,7 @@
{
std::string mboard_str, dev_str;
uhd::property_tree::sptr prop_tree;
- size_t usrp1_str, usrp2_str, b100_str, b200_str, b210_str, umtrx_str;
+ size_t usrp1_str, usrp2_str, b100_str, b200_str, b210_str, umtrx_str, x300_str, x310_str;
prop_tree = usrp_dev->get_device()->get_tree();
dev_str = prop_tree->access<std::string>("/name").get();
@@ -486,6 +492,8 @@
b200_str = mboard_str.find("B200");
b210_str = mboard_str.find("B210");
umtrx_str = dev_str.find("UmTRX");
+ x300_str = mboard_str.find("X300");
+ x310_str = mboard_str.find("X310");
if (usrp1_str != std::string::npos) {
LOG(ALERT) << "USRP1 is not supported using the UHD driver";
@@ -504,6 +512,12 @@
dev_type = B2XX;
} else if (b210_str != std::string::npos) {
dev_type = B2XX;
+ } else if (x300_str != std::string::npos) {
+ dev_type = X3XX;
+ LOG(ALERT) << "Chooose X300";
+ } else if (x310_str != std::string::npos) {
+ dev_type = X3XX;
+ LOG(ALERT) << "Choose X310";
} else if (usrp2_str != std::string::npos) {
dev_type = USRP2;
} else if (umtrx_str != std::string::npos) {
@@ -583,6 +597,7 @@
case B100:
return RESAMP_64M;
case USRP2:
+ case X3XX:
return RESAMP_100M;
}