diff options
author | Josh Blum <josh@joshknows.com> | 2011-07-04 07:21:53 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-07-04 07:21:53 -0700 |
commit | 729b284f628f3326d774262570b68540d7de9baa (patch) | |
tree | 85bd79634c50fd32423fd4c29f15e18744aff97f /host/lib/usrp/cores | |
parent | 34265334d18589a377ab42df211eb33054340ae6 (diff) | |
download | uhd-729b284f628f3326d774262570b68540d7de9baa.tar.gz uhd-729b284f628f3326d774262570b68540d7de9baa.tar.bz2 uhd-729b284f628f3326d774262570b68540d7de9baa.zip |
usrp: handle frontend swapping if the first subdev is QI or Q
Diffstat (limited to 'host/lib/usrp/cores')
-rw-r--r-- | host/lib/usrp/cores/rx_dsp_core_200.cpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/cores/rx_dsp_core_200.hpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp index 8fcf4df96..0c065e228 100644 --- a/host/lib/usrp/cores/rx_dsp_core_200.cpp +++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp @@ -108,14 +108,14 @@ public: _iface->poke32(REG_RX_CTRL_TIME_TICKS, stream_cmd.time_spec.get_tick_count(_tick_rate)); //latches the command } - void set_mux(const std::string &mode){ + void set_mux(const std::string &mode, const bool fe_swapped){ static const uhd::dict<std::string, boost::uint32_t> mode_to_mux = boost::assign::map_list_of ("IQ", 0) ("QI", FLAG_DSP_RX_MUX_SWAP_IQ) ("I", FLAG_DSP_RX_MUX_REAL_MODE) ("Q", FLAG_DSP_RX_MUX_SWAP_IQ | FLAG_DSP_RX_MUX_REAL_MODE) ; - _iface->poke32(REG_DSP_RX_MUX, mode_to_mux[mode]); + _iface->poke32(REG_DSP_RX_MUX, mode_to_mux[mode] ^ (fe_swapped? FLAG_DSP_RX_MUX_SWAP_IQ : 0)); } void set_tick_rate(const double rate){ diff --git a/host/lib/usrp/cores/rx_dsp_core_200.hpp b/host/lib/usrp/cores/rx_dsp_core_200.hpp index e0b6e18e4..72ed07230 100644 --- a/host/lib/usrp/cores/rx_dsp_core_200.hpp +++ b/host/lib/usrp/cores/rx_dsp_core_200.hpp @@ -40,7 +40,7 @@ public: virtual void issue_stream_command(const uhd::stream_cmd_t &stream_cmd) = 0; - virtual void set_mux(const std::string &mode) = 0; + virtual void set_mux(const std::string &mode, const bool fe_swapped = false) = 0; virtual void set_tick_rate(const double rate) = 0; |