commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r11050 - in gnuradio/trunk: gr-usrp2/src usrp2/host/in


From: jcorgan
Subject: [Commit-gnuradio] r11050 - in gnuradio/trunk: gr-usrp2/src usrp2/host/include/usrp2
Date: Mon, 18 May 2009 21:10:32 -0600 (MDT)

Author: jcorgan
Date: 2009-05-18 21:10:32 -0600 (Mon, 18 May 2009)
New Revision: 11050

Added:
   gnuradio/trunk/usrp2/host/include/usrp2/mimo_config.h
Modified:
   gnuradio/trunk/gr-usrp2/src/usrp2.i
   gnuradio/trunk/gr-usrp2/src/usrp2_base.cc
   gnuradio/trunk/gr-usrp2/src/usrp2_base.h
   gnuradio/trunk/usrp2/host/include/usrp2/Makefile.am
   gnuradio/trunk/usrp2/host/include/usrp2/usrp2.h
Log:
Updates to C++ and Python APIs:

* C++: Adds usrp2::MC_* constants for config_mimo() call in libusrp2

* Python: Adds usrp2.config_mimo(), and usrp2.MC_* constants

* Python: Adds usrp2.sync_every_pps()



Modified: gnuradio/trunk/gr-usrp2/src/usrp2.i
===================================================================
--- gnuradio/trunk/gr-usrp2/src/usrp2.i 2009-05-19 01:42:20 UTC (rev 11049)
+++ gnuradio/trunk/gr-usrp2/src/usrp2.i 2009-05-19 03:10:32 UTC (rev 11050)
@@ -31,6 +31,7 @@
 %}
 
 %include <usrp2/tune_result.h>
+%include <usrp2/mimo_config.h>
 
 %template(uint32_t_vector) std::vector<uint32_t>;
 
@@ -48,7 +49,9 @@
   std::string interface_name() const;
   %rename(_real_fpga_master_clock_freq) fpga_master_clock_freq;
   bool fpga_master_clock_freq(long *freq);
+  bool config_mimo(int flags);
   bool sync_to_pps();
+  bool sync_every_pps(bool enable);
   std::vector<uint32_t> peek32(uint32_t addr, uint32_t words);
   bool poke32(uint32_t addr, const std::vector<uint32_t> &data);
 };

Modified: gnuradio/trunk/gr-usrp2/src/usrp2_base.cc
===================================================================
--- gnuradio/trunk/gr-usrp2/src/usrp2_base.cc   2009-05-19 01:42:20 UTC (rev 
11049)
+++ gnuradio/trunk/gr-usrp2/src/usrp2_base.cc   2009-05-19 03:10:32 UTC (rev 
11050)
@@ -68,11 +68,23 @@
 }
 
 bool
+usrp2_base::config_mimo(int flags)
+{
+  return d_u2->config_mimo(flags);
+}
+
+bool
 usrp2_base::sync_to_pps()
 {
   return d_u2->sync_to_pps();
 }
 
+bool
+usrp2_base::sync_every_pps(bool enable)
+{
+  return d_u2->sync_every_pps(enable);
+}
+
 std::vector<uint32_t>
 usrp2_base::peek32(uint32_t addr, uint32_t words)
 {

Modified: gnuradio/trunk/gr-usrp2/src/usrp2_base.h
===================================================================
--- gnuradio/trunk/gr-usrp2/src/usrp2_base.h    2009-05-19 01:42:20 UTC (rev 
11049)
+++ gnuradio/trunk/gr-usrp2/src/usrp2_base.h    2009-05-19 03:10:32 UTC (rev 
11050)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2008 Free Software Foundation, Inc.
+ * Copyright 2008,2009 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -64,11 +64,21 @@
   bool fpga_master_clock_freq(long *freq) const;
 
   /*!
+   * \brief MIMO configuration
+   */
+  bool config_mimo(int flags);
+  
+  /*!
    * \brief Set master time to 0 at next PPS rising edge
    */
   bool sync_to_pps();
 
   /*!
+   * Reset master time to 0 at every PPS edge
+   */
+  bool sync_every_pps(bool enable);
+
+  /*!
    * \brief Read memory from Wishbone bus as words
    */
   std::vector<uint32_t> peek32(uint32_t addr, uint32_t words);

Modified: gnuradio/trunk/usrp2/host/include/usrp2/Makefile.am
===================================================================
--- gnuradio/trunk/usrp2/host/include/usrp2/Makefile.am 2009-05-19 01:42:20 UTC 
(rev 11049)
+++ gnuradio/trunk/usrp2/host/include/usrp2/Makefile.am 2009-05-19 03:10:32 UTC 
(rev 11050)
@@ -26,6 +26,7 @@
        copy_handler.h \
         data_handler.h \
        metadata.h \
+       mimo_config.h \
        rx_nop_handler.h \
        rx_sample_handler.h \
        strtod_si.h \

Copied: gnuradio/trunk/usrp2/host/include/usrp2/mimo_config.h (from rev 11048, 
gnuradio/trunk/usrp2/firmware/include/usrp2_mimo_config.h)
===================================================================
--- gnuradio/trunk/usrp2/host/include/usrp2/mimo_config.h                       
        (rev 0)
+++ gnuradio/trunk/usrp2/host/include/usrp2/mimo_config.h       2009-05-19 
03:10:32 UTC (rev 11050)
@@ -0,0 +1,50 @@
+/* -*- c -*- */
+/*
+ * Copyright 2008,2009 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_USRP2_MIMO_CONFIG_H
+#define INCLUDED_USRP2_MIMO_CONFIG_H
+
+// FIXME: This duplicates the firmware usrp2_mimo_config.h file
+
+namespace usrp2 {
+
+  static const int _MC_WE_LOCK         = 0x0001;
+  static const int _MC_MIMO_CLK_INPUT  = 0x0002;               // else SMA 
input
+  
+  /*
+   * Derived masks (use these):
+   *
+   * We get our input from 1 of three places:
+   *  Our free running oscilator, our SMA connector, or from the MIMO connector
+   */
+  static const int MC_WE_DONT_LOCK     = 0x0000;
+  static const int MC_WE_LOCK_TO_SMA   = (_MC_WE_LOCK | 0);
+  static const int MC_WE_LOCK_TO_MIMO  = (_MC_WE_LOCK | _MC_MIMO_CLK_INPUT);
+  
+  /*
+   * Independent of the source of the clock, we may or may not drive our
+   * clock onto the mimo connector.  Note that there are dedicated clock
+   * signals in each direction, so disaster doesn't occurs if we're
+   * unnecessarily providing clock.
+   */
+  static const int MC_PROVIDE_CLK_TO_MIMO = 0x0004;
+}
+
+#endif /* INCLUDED_USRP2_MIMO_CONFIG_H */


Property changes on: gnuradio/trunk/usrp2/host/include/usrp2/mimo_config.h
___________________________________________________________________
Added: svn:mergeinfo
   + 
/gnuradio/branches/developers/eb/t348/usrp2/firmware/include/usrp2_mimo_config.h:10638-10648
/gnuradio/branches/developers/eb/t364/usrp2/firmware/include/usrp2_mimo_config.h:11016-11017
/gnuradio/branches/developers/eb/t367/usrp2/firmware/include/usrp2_mimo_config.h:11021-11025
/gnuradio/branches/developers/eb/t371/usrp2/firmware/include/usrp2_mimo_config.h:10958-10971
/gnuradio/branches/developers/eb/t378/usrp2/firmware/include/usrp2_mimo_config.h:10683-10688
/gnuradio/branches/developers/jblum/grc/usrp2/firmware/include/usrp2_mimo_config.h:10680-10938
/gnuradio/branches/developers/jblum/gui_guts/usrp2/firmware/include/usrp2_mimo_config.h:10464-10658
/gnuradio/branches/developers/jblum/vlen/usrp2/firmware/include/usrp2_mimo_config.h:10667-10677
/gnuradio/branches/developers/jcorgan/cpphier/usrp2/firmware/include/usrp2_mimo_config.h:10818-10858
/gnuradio/branches/developers/jcorgan/deb/usrp2/firmware/include/usrp2_mimo_config.h:10949-10959,11013-11022
/gnuradio/branches/developers/jcorgan/fw-optimize/usrp2/firmware/include/usrp2_mimo_config.h:10428-10429
/gnuradio/branches/developers/jcorgan/gpio2/usrp2/firmware/include/usrp2_mimo_config.h:10713-10765
/gnuradio/branches/developers/jcorgan/iad2/usrp2/firmware/include/usrp2_mimo_config.h:10771-10887
/gnuradio/branches/developers/jcorgan/t161/usrp2/firmware/include/usrp2_mimo_config.h:10876-10880
/gnuradio/branches/developers/michaelld/am_swig_4/usrp2/firmware/include/usrp2_mimo_config.h:10555-10595
/gnuradio/branches/developers/michaelld/two_mods/usrp2/firmware/include/usrp2_mimo_config.h:10540-10546
Added: svn:eol-style
   + native

Modified: gnuradio/trunk/usrp2/host/include/usrp2/usrp2.h
===================================================================
--- gnuradio/trunk/usrp2/host/include/usrp2/usrp2.h     2009-05-19 01:42:20 UTC 
(rev 11049)
+++ gnuradio/trunk/usrp2/host/include/usrp2/usrp2.h     2009-05-19 03:10:32 UTC 
(rev 11050)
@@ -25,8 +25,8 @@
 #include <complex>
 #include <usrp2/rx_sample_handler.h>
 #include <usrp2/tune_result.h>
+#include <usrp2/mimo_config.h>
 
-
 /*
  * N.B., The interfaces described here are still in flux.
  *
@@ -67,7 +67,7 @@
   // FIXME: get from firmware include
   static const int GPIO_TX_BANK = 0;
   static const int GPIO_RX_BANK = 1;
-  
+
   class usrp2 : boost::noncopyable
   {
   public:





reply via email to

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