aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1/usrp1_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-15 18:49:06 -0700
committerJosh Blum <josh@joshknows.com>2010-08-15 18:49:06 -0700
commit5c0d3d30606b25c72c98785d49c13cc27ad49ec1 (patch)
tree3abc29f89c400fe03551c06b79ffc6973dbc78bb /host/lib/usrp/usrp1/usrp1_impl.cpp
parent2e978d8835b8f954b7c34c42138b64d3a5767f81 (diff)
downloaduhd-5c0d3d30606b25c72c98785d49c13cc27ad49ec1.tar.gz
uhd-5c0d3d30606b25c72c98785d49c13cc27ad49ec1.tar.bz2
uhd-5c0d3d30606b25c72c98785d49c13cc27ad49ec1.zip
usrp1: created daughterboard duality
everything that should have two is now stored into a dictionary of slot to type the set and get functions are now bound with a third argument for dboard slot the dboard iface has yet to be completed with the correct registers for a vs b
Diffstat (limited to 'host/lib/usrp/usrp1/usrp1_impl.cpp')
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index 1435b981c..ece5f1dea 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -18,11 +18,13 @@
#include "usrp1_impl.hpp"
#include "usrp1_ctrl.hpp"
#include "fpga_regs_standard.h"
+#include "usrp_spi_defs.h"
#include <uhd/transport/usb_control.hpp>
#include <uhd/usrp/device_props.hpp>
#include <uhd/utils/assert.hpp>
#include <uhd/utils/static.hpp>
#include <boost/format.hpp>
+#include <boost/assign/list_of.hpp>
#include <boost/filesystem.hpp>
#include <iostream>
@@ -30,6 +32,10 @@ using namespace uhd;
using namespace uhd::usrp;
using namespace uhd::transport;
+const std::vector<usrp1_impl::dboard_slot_t> usrp1_impl::_dboard_slots = boost::assign::list_of
+ (usrp1_impl::DBOARD_SLOT_A)(usrp1_impl::DBOARD_SLOT_B)
+;
+
/***********************************************************************
* Discovery
**********************************************************************/
@@ -132,7 +138,8 @@ usrp1_impl::usrp1_impl(uhd::transport::usb_zero_copy::sptr data_transport,
_clock_ctrl = usrp1_clock_ctrl::make(_iface);
//create codec interface
- _codec_ctrl = usrp1_codec_ctrl::make(_iface);
+ _codec_ctrls[DBOARD_SLOT_A] = usrp1_codec_ctrl::make(_iface, SPI_ENABLE_CODEC_A);
+ _codec_ctrls[DBOARD_SLOT_B] = usrp1_codec_ctrl::make(_iface, SPI_ENABLE_CODEC_B);
//initialize the codecs
codec_init();
@@ -144,10 +151,10 @@ usrp1_impl::usrp1_impl(uhd::transport::usb_zero_copy::sptr data_transport,
dboard_init();
//initialize the dsps
- rx_ddc_init();
+ rx_dsp_init();
//initialize the dsps
- tx_duc_init();
+ tx_dsp_init();
//initialize the send/recv
io_init();