diff --git a/public-trunk/Transceiver52M/UHDDevice.cpp b/public-trunk/Transceiver52M/UHDDevice.cpp index a5b1f0c..b86dd33 100644 --- a/public-trunk/Transceiver52M/UHDDevice.cpp +++ b/public-trunk/Transceiver52M/UHDDevice.cpp @@ -32,8 +32,6 @@ #endif /* - use_ext_ref - Enable external 10MHz clock reference - master_clk_rt - Master clock frequency - ignored if host resampling is enabled @@ -46,7 +44,6 @@ tx_ampl - Transmit amplitude must be between 0 and 1.0 */ -const bool use_ext_ref = false; const double master_clk_rt = 52e6; const size_t smpl_buf_sz = (1 << 20); const float tx_ampl = .3; @@ -426,6 +423,10 @@ bool uhd_device::open() return false; } +#ifdef EXTREF + set_ref_clk(true); +#endif + // Number of samples per over-the-wire packet tx_spp = usrp_dev->get_device()->get_max_send_samps_per_packet(); rx_spp = usrp_dev->get_device()->get_max_recv_samps_per_packet(); @@ -445,9 +446,6 @@ bool uhd_device::open() // Initialize and shadow gain values init_gains(); - // Set reference clock - set_ref_clk(use_ext_ref); - // Print configuration LOG(INFO) << "\n" << usrp_dev->get_pp_string(); diff --git a/public-trunk/configure.ac b/public-trunk/configure.ac index 7b3424a..6a83482 100644 --- a/public-trunk/configure.ac +++ b/public-trunk/configure.ac @@ -67,6 +67,11 @@ AC_ARG_WITH(resamp, [ [enable resampling for non-52MHz devices]) ]) +AC_ARG_WITH(extref, [ + AS_HELP_STRING([--with-extref], + [enable external reference on UHD devices]) +]) + AS_IF([test "x$with_usrp1" = "xyes"], [ # Defines USRP_CFLAGS, USRP_INCLUDEDIR, and USRP_LIBS PKG_CHECK_MODULES(USRP, usrp > 3.1) @@ -89,6 +94,10 @@ AS_IF([test "x$with_resamp" = "xyes"], [ AC_DEFINE(RESAMPLE, 1, Define to 1 for resampling) ]) +AS_IF([test "x$with_extref" = "xyes"], [ + AC_DEFINE(EXTREF, 1, Define to 1 for external reference) +]) + AM_CONDITIONAL(RESAMPLE, [test "x$with_resamp" = "xyes"]) AM_CONDITIONAL(UHD, [test "x$with_usrp1" != "xyes"])