From 1c6d6b90baa35c813c3b21200549e5002af2f8f4 Mon Sep 17 00:00:00 2001 From: Kurtis Heimerl Date: Sat, 26 Nov 2011 03:19:22 +0000 Subject: [PATCH] transceiver: usrp1: select single dboard use at compile time The following option selects single daughterboard use on side A only. Otherwise, the default setting is TX on A and Rx on B. ./configure --with-singledb Other options are possible, as per the following enum, but for simplicity with configure options, there are only two choices. enum dboardConfigType { TXA_RXB, TXB_RXA, TXA_RXA, TXB_RXB }; Signed-off-by: Thomas Tsou git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2687 19bc5d8c-e614-43d4-8b26-e1612bc8e597 --- Transceiver52M/USRPDevice.cpp | 8 ++++++++ configure.ac | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/Transceiver52M/USRPDevice.cpp b/Transceiver52M/USRPDevice.cpp index ff5af40..175b187 100644 --- a/Transceiver52M/USRPDevice.cpp +++ b/Transceiver52M/USRPDevice.cpp @@ -38,6 +38,9 @@ #include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif using namespace std; @@ -48,7 +51,12 @@ enum dboardConfigType { TXB_RXB }; +#ifdef SINGLEDB +const dboardConfigType dboardConfig = TXA_RXA; +#else const dboardConfigType dboardConfig = TXA_RXB; +#endif + const double USRPDevice::masterClockRate = 52.0e6; USRPDevice::USRPDevice (double _desiredSampleRate, bool skipRx) diff --git a/configure.ac b/configure.ac index 22f8452..67a74f7 100644 --- a/configure.ac +++ b/configure.ac @@ -62,6 +62,11 @@ AC_ARG_WITH(usrp1, [ [enable USRP1 gnuradio based transceiver]) ]) +AC_ARG_WITH(singledb, [ + AS_HELP_STRING([--with-singledb], + [enable single daughterboard use on USRP1]) +]) + AC_ARG_WITH(resamp, [ AS_HELP_STRING([--with-resamp], [enable resampling for non-52MHz devices]) @@ -98,6 +103,10 @@ AS_IF([test "x$with_extref" = "xyes"], [ AC_DEFINE(EXTREF, 1, Define to 1 for external reference) ]) +AS_IF([test "x$with_singledb" = "xyes"], [ + AC_DEFINE(SINGLEDB, 1, Define to 1 for single daughterboard) +]) + AM_CONDITIONAL(RESAMPLE, [test "x$with_resamp" = "xyes"]) AM_CONDITIONAL(UHD, [test "x$with_usrp1" != "xyes"])