commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r9673 - gnuradio/branches/features/cppdb/usrp/host/lib


From: trondeau
Subject: [Commit-gnuradio] r9673 - gnuradio/branches/features/cppdb/usrp/host/lib/legacy
Date: Sun, 28 Sep 2008 16:03:23 -0600 (MDT)

Author: trondeau
Date: 2008-09-28 16:03:22 -0600 (Sun, 28 Sep 2008)
New Revision: 9673

Modified:
   gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.cc
   gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_dbs_rx.cc
   gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_dbs_rx.h
Log:
wip: set the refclk_reg in db_base. DBSRX frequency sets properly now. I'm 
surprised this hadn't burned me before now.

Modified: gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.cc
===================================================================
--- gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.cc    
2008-09-28 21:02:52 UTC (rev 9672)
+++ gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_base.cc    
2008-09-28 22:03:22 UTC (rev 9673)
@@ -41,6 +41,16 @@
   d_which = which;
   d_tx = tx;
   d_usrp = usrp;
+
+  if(d_tx) {
+    d_slot = d_which * 2;
+  }
+  else {
+    d_slot = d_which * 2 + 1;
+  }
+   
+  int refclktable[4] = {FR_TX_A_REFCLK, FR_RX_A_REFCLK, FR_TX_B_REFCLK, 
FR_RX_B_REFCLK};
+  d_refclk_reg = refclktable[d_slot];
 }
 
 
@@ -267,6 +277,7 @@
   int CLOCK_OUT = 1;   // Clock is on lowest bit
   int REFCLK_ENABLE = 0x80;
   int REFCLK_DIVISOR_MASK = 0x7f;
+
   if(enable) {
     d_usrp->_write_oe(d_which, CLOCK_OUT, CLOCK_OUT); // output enable
     d_usrp->_write_fpga_reg(d_refclk_reg,

Modified: gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_dbs_rx.cc
===================================================================
--- gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_dbs_rx.cc  
2008-09-28 21:02:52 UTC (rev 9672)
+++ gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_dbs_rx.cc  
2008-09-28 22:03:22 UTC (rev 9673)
@@ -63,7 +63,6 @@
   d_gc2 = 31;
   d_diag = 0;
   
-  d_refclk_divisor = 16;
   _enable_refclk(true);
   
   set_gain((gain_min() + gain_max()) / 2.0);       // initialize gain

Modified: gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_dbs_rx.h
===================================================================
--- gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_dbs_rx.h   
2008-09-28 21:02:52 UTC (rev 9672)
+++ gnuradio/branches/features/cppdb/usrp/host/lib/legacy/db_dbs_rx.h   
2008-09-28 22:03:22 UTC (rev 9673)
@@ -36,7 +36,6 @@
   usrp_basic_rx *d_usrp;
   int d_osc, d_cp, d_n, d_div2, d_r, d_r_int;
   int d_fdac, d_m, d_dl, d_ade, d_adl, d_gc1, d_gc2, d_diag;
-  int d_refclk_divisor;
   int d_i2c_addr;
   
   // Internal gain functions





reply via email to

[Prev in Thread] Current Thread [Next in Thread]