%}
%include <usrp2/tune_result.h>
+%include <usrp2/mimo_config.h>
%template(uint32_t_vector) std::vector<uint32_t>;
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);
};
return d_u2->fpga_master_clock_freq(freq);
}
+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)
{
/* -*- c++ -*- */
/*
- * Copyright 2008 Free Software Foundation, Inc.
+ * Copyright 2008,2009 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
*/
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
*/
--- /dev/null
+/* -*- 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 */
#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.
// FIXME: get from firmware include
static const int GPIO_TX_BANK = 0;
static const int GPIO_RX_BANK = 1;
-
+
class usrp2 : boost::noncopyable
{
public: