commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10914 - in gnuradio/branches/releases/3.2: . gnuradio


From: jcorgan
Subject: [Commit-gnuradio] r10914 - in gnuradio/branches/releases/3.2: . gnuradio-core/src/python/gnuradio/gr gr-qtgui/src/python gr-wxgui/src/python/plotter grc/data/platforms/python/blocks usrp/host/lib/legacy
Date: Sun, 26 Apr 2009 13:57:57 -0600 (MDT)

Author: jcorgan
Date: 2009-04-26 13:57:57 -0600 (Sun, 26 Apr 2009)
New Revision: 10914

Modified:
   gnuradio/branches/releases/3.2/
   gnuradio/branches/releases/3.2/gnuradio-core/src/python/gnuradio/gr/pubsub.py
   gnuradio/branches/releases/3.2/gr-qtgui/src/python/usrp_display.py
   
gnuradio/branches/releases/3.2/gr-wxgui/src/python/plotter/grid_plotter_base.py
   gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_add_xx.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_channel_model.xml
   
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_multiply_xx.xml
   gnuradio/branches/releases/3.2/usrp/host/lib/legacy/db_xcvr2450.cc
   gnuradio/branches/releases/3.2/usrp/host/lib/legacy/db_xcvr2450.h
Log:
Applied changeset r10853 to release-3.2 branch.


Property changes on: gnuradio/branches/releases/3.2
___________________________________________________________________
Modified: svn:mergeinfo
   - /gnuradio/branches/developers/eb/t348:10638-10648
/gnuradio/branches/developers/eb/t378:10683-10688
/gnuradio/branches/developers/jblum/gui_guts:10464-10658
/gnuradio/branches/developers/jblum/vlen:10667-10677
/gnuradio/branches/developers/jcorgan/cpphier:10818-10858
/gnuradio/branches/developers/jcorgan/fw-optimize:10428-10429
/gnuradio/branches/developers/jcorgan/gpio2:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4:10555-10595
/gnuradio/branches/developers/michaelld/two_mods:10540-10546
/gnuradio/trunk:10356-10359,10481-10482,10497-10499,10506-10507,10511,10514,10521,10523-10524,10529,10531,10535,10537-10538,10550-10551,10556,10558-10560,10562-10563,10565,10574-10576,10578-10579,10581-10582,10585,10587,10596-10600,10623-10624,10629,10632-10634,10645-10646,10649-10650,10653-10655,10660-10661,10671,10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793,10826,10847-10848,10850,10852,10859,10861-10862,10864,10884
   + /gnuradio/branches/developers/eb/t348:10638-10648
/gnuradio/branches/developers/eb/t378:10683-10688
/gnuradio/branches/developers/jblum/gui_guts:10464-10658
/gnuradio/branches/developers/jblum/vlen:10667-10677
/gnuradio/branches/developers/jcorgan/cpphier:10818-10858
/gnuradio/branches/developers/jcorgan/fw-optimize:10428-10429
/gnuradio/branches/developers/jcorgan/gpio2:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4:10555-10595
/gnuradio/branches/developers/michaelld/two_mods:10540-10546
/gnuradio/trunk:10356-10359,10481-10482,10497-10499,10506-10507,10511,10514,10521,10523-10524,10529,10531,10535,10537-10538,10550-10551,10556,10558-10560,10562-10563,10565,10574-10576,10578-10579,10581-10582,10585,10587,10596-10600,10623-10624,10629,10632-10634,10645-10646,10649-10650,10653-10655,10660-10661,10671,10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793,10826,10847-10848,10850,10852-10853,10859,10861-10862,10864,10884


Property changes on: 
gnuradio/branches/releases/3.2/gnuradio-core/src/python/gnuradio/gr/pubsub.py
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10638-10648
/gnuradio/branches/developers/eb/t378/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10667-10677
/gnuradio/branches/developers/jcorgan/cpphier/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10818-10858
/gnuradio/branches/developers/jcorgan/gpio2/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10713-10765
/gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10653-10655,10660-10661,10671,10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793,10826,10847-10848,10850,10852,10859,10861-10862,10864,10884
   + 
/gnuradio/branches/developers/eb/t348/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10638-10648
/gnuradio/branches/developers/eb/t378/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10667-10677
/gnuradio/branches/developers/jcorgan/cpphier/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10818-10858
/gnuradio/branches/developers/jcorgan/gpio2/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10713-10765
/gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/pubsub.py:10653-10655,10660-10661,10671,10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793,10826,10847-10848,10850,10852-10853,10859,10861-10862,10864,10884


Property changes on: 
gnuradio/branches/releases/3.2/gr-qtgui/src/python/usrp_display.py
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/jcorgan/cpphier/gr-qtgui/src/python/usrp_display.py:10818-10858
/gnuradio/trunk/gr-qtgui/src/python/usrp_display.py:10826,10859,10861-10862,10864,10884
   + 
/gnuradio/branches/developers/jcorgan/cpphier/gr-qtgui/src/python/usrp_display.py:10818-10858
/gnuradio/trunk/gr-qtgui/src/python/usrp_display.py:10826,10853,10859,10861-10862,10864,10884


Property changes on: 
gnuradio/branches/releases/3.2/gr-wxgui/src/python/plotter/grid_plotter_base.py
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t378/gr-wxgui/src/python/plotter/grid_plotter_base.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gr-wxgui/src/python/plotter/grid_plotter_base.py:10667-10677
/gnuradio/branches/developers/jcorgan/cpphier/gr-wxgui/src/python/plotter/grid_plotter_base.py:10818-10858
/gnuradio/branches/developers/jcorgan/gpio2/gr-wxgui/src/python/plotter/grid_plotter_base.py:10713-10765
/gnuradio/trunk/gr-wxgui/src/python/plotter/grid_plotter_base.py:10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793,10826,10847-10848,10850,10852,10859,10861-10862,10864,10884
   + 
/gnuradio/branches/developers/eb/t378/gr-wxgui/src/python/plotter/grid_plotter_base.py:10683-10688
/gnuradio/branches/developers/jblum/vlen/gr-wxgui/src/python/plotter/grid_plotter_base.py:10667-10677
/gnuradio/branches/developers/jcorgan/cpphier/gr-wxgui/src/python/plotter/grid_plotter_base.py:10818-10858
/gnuradio/branches/developers/jcorgan/gpio2/gr-wxgui/src/python/plotter/grid_plotter_base.py:10713-10765
/gnuradio/trunk/gr-wxgui/src/python/plotter/grid_plotter_base.py:10673,10678,10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793,10826,10847-10848,10850,10852-10853,10859,10861-10862,10864,10884


Property changes on: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_add_xx.xml
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_add_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_add_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_add_vxx.xml:10464-10658
/gnuradio/branches/developers/jcorgan/cpphier/grc/data/platforms/python/blocks/gr_add_xx.xml:10818-10858
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/gr_add_xx.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_add_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_add_vxx.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_add_xx.xml:10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793,10826,10847-10848,10850,10852,10859,10861-10862,10864,10884
   + 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_add_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_add_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_add_vxx.xml:10464-10658
/gnuradio/branches/developers/jcorgan/cpphier/grc/data/platforms/python/blocks/gr_add_xx.xml:10818-10858
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/gr_add_xx.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_add_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_add_vxx.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_add_xx.xml:10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793,10826,10847-10848,10850,10852-10853,10859,10861-10862,10864,10884


Property changes on: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_channel_model.xml
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/blks2_channel_model.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/blks2_channel_model.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/blks2_channel_model.xml:10464-10658
/gnuradio/branches/developers/jblum/vlen/grc/data/platforms/python/blocks/blks2_channel_model.xml:10667-10677
/gnuradio/branches/developers/jcorgan/cpphier/grc/data/platforms/python/blocks/blks2_channel_model.xml:10818-10858
/gnuradio/branches/developers/jcorgan/fw-optimize/grc/data/platforms/python/blocks/blks2_channel_model.xml:10428-10429
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/blks2_channel_model.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/blks2_channel_model.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/blks2_channel_model.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_channel_model.xml:10826,10864,10884
   + 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/blks2_channel_model.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/blks2_channel_model.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/blks2_channel_model.xml:10464-10658
/gnuradio/branches/developers/jblum/vlen/grc/data/platforms/python/blocks/blks2_channel_model.xml:10667-10677
/gnuradio/branches/developers/jcorgan/cpphier/grc/data/platforms/python/blocks/blks2_channel_model.xml:10818-10858
/gnuradio/branches/developers/jcorgan/fw-optimize/grc/data/platforms/python/blocks/blks2_channel_model.xml:10428-10429
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/blks2_channel_model.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/blks2_channel_model.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/blks2_channel_model.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_channel_model.xml:10826,10853,10864,10884


Property changes on: 
gnuradio/branches/releases/3.2/grc/data/platforms/python/blocks/gr_multiply_xx.xml
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10464-10658
/gnuradio/branches/developers/jcorgan/cpphier/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10818-10858
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793,10826,10847-10848,10850,10852,10859,10861-10862,10864,10884
   + 
/gnuradio/branches/developers/eb/t348/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10638-10648
/gnuradio/branches/developers/eb/t378/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10683-10688
/gnuradio/branches/developers/jblum/gui_guts/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10464-10658
/gnuradio/branches/developers/jcorgan/cpphier/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10818-10858
/gnuradio/branches/developers/jcorgan/gpio2/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10713-10765
/gnuradio/branches/developers/michaelld/am_swig_4/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/grc/data/platforms/python/blocks/gr_multiply_vxx.xml:10540-10546
/gnuradio/trunk/grc/data/platforms/python/blocks/gr_multiply_xx.xml:10681,10686,10689,10691,10701-10702,10707-10710,10714-10721,10725,10728-10736,10739-10751,10759-10762,10766,10768-10769,10778-10779,10787-10789,10793,10826,10847-10848,10850,10852-10853,10859,10861-10862,10864,10884

Modified: gnuradio/branches/releases/3.2/usrp/host/lib/legacy/db_xcvr2450.cc
===================================================================
--- gnuradio/branches/releases/3.2/usrp/host/lib/legacy/db_xcvr2450.cc  
2009-04-26 19:56:41 UTC (rev 10913)
+++ gnuradio/branches/releases/3.2/usrp/host/lib/legacy/db_xcvr2450.cc  
2009-04-26 19:57:57 UTC (rev 10914)
@@ -96,19 +96,19 @@
 
   d_txgain = 63;       // 0 = min, 63 = max
 
-  // Initialize GPIO and ATR
-  tx_write_io(TX_SAFE_IO, TX_OE_MASK);
-  tx_write_oe(TX_OE_MASK, ~0);
-  tx_set_atr_txval(TX_SAFE_IO);
-  tx_set_atr_rxval(TX_SAFE_IO);
-  tx_set_atr_mask(TX_OE_MASK);
+  // Initialize GPIO and ATR  
+  usrp()->common_write_io(C_TX, d_which, TX_SAFE_IO, TX_OE_MASK);
+  usrp()->_common_write_oe(C_TX, d_which, TX_OE_MASK, 0xffff);
+  usrp()->common_write_atr_txval(C_TX, d_which, TX_SAFE_IO);
+  usrp()->common_write_atr_rxval(C_TX, d_which, TX_SAFE_IO);
+  usrp()->common_write_atr_mask(C_TX, d_which, TX_OE_MASK);
 
-  rx_write_io(RX_SAFE_IO, RX_OE_MASK);
-  rx_write_oe(RX_OE_MASK, ~0);
-  rx_set_atr_rxval(RX_SAFE_IO);
-  rx_set_atr_txval(RX_SAFE_IO);
-  rx_set_atr_mask(RX_OE_MASK);
-        
+  usrp()->common_write_io(C_RX, d_which, RX_SAFE_IO, RX_OE_MASK);
+  usrp()->_common_write_oe(C_RX, d_which, RX_OE_MASK, 0xffff);
+  usrp()->common_write_atr_txval(C_RX, d_which, RX_SAFE_IO);
+  usrp()->common_write_atr_rxval(C_RX, d_which, RX_SAFE_IO);
+  usrp()->common_write_atr_mask(C_RX, d_which, RX_OE_MASK);
+
   // Initialize chipset
   // TODO: perform reset sequence to ensure power up defaults
   set_reg_standby();
@@ -126,10 +126,10 @@
 xcvr2450::~xcvr2450()
 {
   //printf("xcvr2450::destructor\n");
-  tx_set_atr_txval(TX_SAFE_IO);
-  tx_set_atr_rxval(TX_SAFE_IO);
-  rx_set_atr_rxval(RX_SAFE_IO);
-  rx_set_atr_txval(RX_SAFE_IO);
+  usrp()->common_write_atr_txval(C_TX, d_which, TX_SAFE_IO);
+  usrp()->common_write_atr_rxval(C_TX, d_which, TX_SAFE_IO);
+  usrp()->common_write_atr_txval(C_RX, d_which, RX_SAFE_IO);
+  usrp()->common_write_atr_rxval(C_RX, d_which, RX_SAFE_IO);
 }
 
 bool
@@ -274,151 +274,6 @@
   printf("xcvr2450: Setting reg %d to %X\n", (v&15), v);
 }
 
-// --------------------------------------------------------------------
-// These methods control the GPIO bus.  Since the board has to access
-// both the io_rx_* and io_tx_* pins, we define our own methods to do so.
-// This bypasses any code in db_base.
-//
-// The board operates in ATR mode, always.  Thus, when the board is first
-// initialized, it is in receive mode, until bits show up in the TX FIFO.
-//
-
-// FIXME these should just call the similarly named common_* method on 
usrp_basic
-
-bool
-xcvr2450::tx_write_oe(int value, int mask)
-{
-  int reg;
-  if(d_which)
-    reg = FR_OE_2;
-  else
-    reg = FR_OE_0;
-  return usrp()->_write_fpga_reg(reg, (mask << 16) | value);
-}
-   
-bool
-xcvr2450::tx_write_io(int value, int mask)
-{
-  int reg;
-  if(d_which)
-    reg = FR_IO_2;
-  else
-    reg = FR_IO_0;
-  return usrp()->_write_fpga_reg(reg, (mask << 16) | value);
-}
-
-int
-xcvr2450::tx_read_io()
-{
-  int val;
-  if(d_which)
-    val = FR_RB_IO_RX_B_IO_TX_B;
-  else
-    val = FR_RB_IO_RX_A_IO_TX_A;
-  int t = usrp()->_read_fpga_reg(val);
-  return t & 0xffff;
-}
-
-bool
-xcvr2450::rx_write_oe(int value, int mask)
-{
-  int reg;
-  if(d_which)
-    reg = FR_OE_3;
-  else
-    reg = FR_OE_1;
-  return usrp()->_write_fpga_reg(reg, (mask << 16) | value);
-}
-
-bool
-xcvr2450::rx_write_io(int value, int mask)
-{
-  int reg;
-  if(d_which)
-    reg = FR_IO_3;
-  else
-    reg = FR_IO_1;
-  return usrp()->_write_fpga_reg(reg, (mask << 16) | value);
-}
-
-int
-xcvr2450::rx_read_io()
-{
-  int val;
-  if(d_which)
-    val = FR_RB_IO_RX_B_IO_TX_B;
-  else
-    val = FR_RB_IO_RX_A_IO_TX_A;
-  int t = usrp()->_read_fpga_reg(val);
-  return (t >> 16) & 0xffff;
-}
-
-bool
-xcvr2450::tx_set_atr_mask(int v)
-{
-  int reg;
-  if(d_which)
-    reg = FR_ATR_MASK_2;
-  else
-    reg = FR_ATR_MASK_0;
-  return usrp()->_write_fpga_reg(reg, v);
-}
-
-bool
-xcvr2450::tx_set_atr_txval(int v)
-{
-  int reg;
-  if(d_which)
-    reg = FR_ATR_TXVAL_2;
-  else
-    reg = FR_ATR_TXVAL_0;
-  return usrp()->_write_fpga_reg(reg, v);
-}
-
-bool
-xcvr2450::tx_set_atr_rxval(int v)
-{
-  int reg;
-  if(d_which)
-    reg = FR_ATR_RXVAL_2;
-  else
-    reg = FR_ATR_RXVAL_0;
-  return usrp()->_write_fpga_reg(reg, v);
-}
-
-bool
-xcvr2450::rx_set_atr_mask(int v)
-{
-  int reg;
-  if(d_which)
-    reg = FR_ATR_MASK_3;
-  else
-    reg = FR_ATR_MASK_1;
-  return usrp()->_write_fpga_reg(reg, v);
-}
-
-bool
-xcvr2450::rx_set_atr_txval(int v)
-{
-  int reg;
-  if(d_which)
-    reg = FR_ATR_TXVAL_3;
-  else
-    reg = FR_ATR_TXVAL_1;
-  return usrp()->_write_fpga_reg(reg, v);
-}
-
-bool
-xcvr2450::rx_set_atr_rxval(int v)
-{
-  int reg;
-  if(d_which)
-    reg = FR_ATR_RXVAL_3;
-  else
-    reg = FR_ATR_RXVAL_1;
-  return usrp()->_write_fpga_reg(reg, v);
-}
-
 // ----------------------------------------------------------------
 
 void
@@ -453,16 +308,21 @@
     tx_pa_sel = LB_PA_OFF;
   else
     tx_pa_sel = HB_PA_OFF;
+ 
+  // Reset GPIO and ATR
+  // FIXME: dont set io, oe, atr mask once basic code stops overriding our 
settings
+  usrp()->common_write_io(C_TX, d_which, TX_SAFE_IO, TX_OE_MASK);
+  usrp()->_common_write_oe(C_TX, d_which, TX_OE_MASK, 0xffff);
+  usrp()->common_write_atr_txval(C_TX, d_which, 
tx_pa_sel|tx_antsel|TX_EN|AD9515DIV);
+  usrp()->common_write_atr_rxval(C_TX, d_which, 
HB_PA_OFF|LB_PA_OFF|rx_antsel|AD9515DIV);
+  usrp()->common_write_atr_mask(C_TX, d_which, TX_OE_MASK);
 
-  int io_rx_while_rx = EN|rx_hp|RX_EN;
-  int io_rx_while_tx = EN|rx_hp;
-  int io_tx_while_rx = HB_PA_OFF|LB_PA_OFF|rx_antsel|AD9515DIV;
-  int io_tx_while_tx = tx_pa_sel|tx_antsel|TX_EN|AD9515DIV;
-  rx_set_atr_rxval(io_rx_while_rx);
-  rx_set_atr_txval(io_rx_while_tx);
-  tx_set_atr_rxval(io_tx_while_rx);
-  tx_set_atr_txval(io_tx_while_tx);
-        
+  usrp()->common_write_io(C_RX, d_which, RX_SAFE_IO, RX_OE_MASK);
+  usrp()->_common_write_oe(C_RX, d_which, RX_OE_MASK, 0xffff);
+  usrp()->common_write_atr_txval(C_RX, d_which, EN|rx_hp);
+  usrp()->common_write_atr_rxval(C_RX, d_which, EN|rx_hp|RX_EN);
+  usrp()->common_write_atr_mask(C_RX, d_which, RX_OE_MASK);
+
   //printf("GPIO: RXRX=%04X RXTX=%04X TXRX=%04X TXTX=%04X\n",
   //       io_rx_while_rx, io_rx_while_tx, io_tx_while_rx, io_tx_while_tx);
 }
@@ -532,11 +392,11 @@
     @returns: the value of the VCO/PLL lock detect bit.
     @rtype: 0 or 1
   */
-  if(rx_read_io() & LOCKDET) {
+  if(usrp()->common_read_io(C_RX, d_which) & LOCKDET) {
     return true;
   }
   else {      // Give it a second chance
-    if(rx_read_io() & LOCKDET)
+    if(usrp()->common_read_io(C_RX, d_which) & LOCKDET)
       return true;
     else
       return false;

Modified: gnuradio/branches/releases/3.2/usrp/host/lib/legacy/db_xcvr2450.h
===================================================================
--- gnuradio/branches/releases/3.2/usrp/host/lib/legacy/db_xcvr2450.h   
2009-04-26 19:56:41 UTC (rev 10913)
+++ gnuradio/branches/releases/3.2/usrp/host/lib/legacy/db_xcvr2450.h   
2009-04-26 19:57:57 UTC (rev 10914)
@@ -41,14 +41,7 @@
 #define EN      (1 << 14)
 #define RX_EN   (1 << 13)           // 1 = RX on, 0 = RX off
 #define RX_HP   (1 << 12)
-#define B1      (1 << 11)
-#define B2      (1 << 10)
-#define B3      (1 << 9)
-#define B4      (1 << 8)
-#define B5      (1 << 7)
-#define B6      (1 << 6)
-#define B7      (1 << 5)
-#define RX_OE_MASK EN|RX_EN|RX_HP|B1|B2|B3|B4|B5|B6|B7
+#define RX_OE_MASK EN|RX_EN|RX_HP
 #define RX_SAFE_IO EN
 
 struct xcvr2450_key {
@@ -131,31 +124,7 @@
   
   // Send register write to SPI
   void send_reg(int v);
-  
-  // --------------------------------------------------------------------
-  // These methods control the GPIO bus.  Since the board has to access
-  // both the io_rx_* and io_tx_* pins, we define our own methods to do so.
-  // This bypasses any code in db_base.
-  //
-  // The board operates in ATR mode, always.  Thus, when the board is first
-  // initialized, it is in receive mode, until bits show up in the TX FIFO.
-  //
 
-  // FIXME these should just call the similarly named common_* method on 
usrp_basic
-
-  bool tx_write_oe(int value, int mask);
-  bool tx_write_io(int value, int mask);
-  int  tx_read_io();
-  bool rx_write_oe(int value, int mask);
-  bool rx_write_io(int value, int mask);
-  int  rx_read_io();
-  bool tx_set_atr_mask(int v);
-  bool tx_set_atr_txval(int v);
-  bool tx_set_atr_rxval(int v);
-  bool rx_set_atr_mask(int v);
-  bool rx_set_atr_txval(int v);
-  bool rx_set_atr_rxval(int v);
-
   void set_gpio();
   bool lock_detect();
   bool set_rx_gain(float gain);





reply via email to

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