mirror of
				https://github.com/RangeNetworks/openbts.git
				synced 2025-10-31 11:53:33 +00:00 
			
		
		
		
	transceiver: uhd: make external reference a compile time option
External reference selection was already compile-time determined by a hard coded value. Make it selectable as a configure option. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2686 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
		| @@ -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(); | ||||
|  | ||||
|   | ||||
| @@ -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"]) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user