diff options
author | Josh Blum <josh@joshknows.com> | 2012-03-23 14:37:47 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-03-23 14:37:47 -0700 |
commit | 6acafe3a1762e434529569ad4164a03678996a9e (patch) | |
tree | b780937864c1fb596c443fc5302e75f9ef1ca9e0 /host/lib/usrp | |
parent | 035c1b39a928d1f944c3757b68f45e2d10724d2c (diff) | |
parent | 7e395dab9a2b04933cafab3e93c0b7e098fcb826 (diff) | |
download | uhd-6acafe3a1762e434529569ad4164a03678996a9e.tar.gz uhd-6acafe3a1762e434529569ad4164a03678996a9e.tar.bz2 uhd-6acafe3a1762e434529569ad4164a03678996a9e.zip |
Merge branch 'master' into next
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/cores/rx_frontend_core_200.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/host/lib/usrp/cores/rx_frontend_core_200.cpp b/host/lib/usrp/cores/rx_frontend_core_200.cpp index eb9f39fcf..1813758da 100644 --- a/host/lib/usrp/cores/rx_frontend_core_200.cpp +++ b/host/lib/usrp/cores/rx_frontend_core_200.cpp @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011-2012 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ #define OFFSET_FIXED (1ul << 31) #define OFFSET_SET (1ul << 30) +#define FLAG_MASK (OFFSET_FIXED | OFFSET_SET) static boost::uint32_t fs_to_bits(const double num, const size_t bits){ return boost::int32_t(boost::math::round(num * (1 << (bits-1)))); @@ -59,8 +60,8 @@ public: } void set_dc_offset(const boost::uint32_t flags){ - _iface->poke32(REG_RX_FE_OFFSET_I, flags | _i_dc_off); - _iface->poke32(REG_RX_FE_OFFSET_Q, flags | _q_dc_off); + _iface->poke32(REG_RX_FE_OFFSET_I, flags | (_i_dc_off & ~FLAG_MASK)); + _iface->poke32(REG_RX_FE_OFFSET_Q, flags | (_q_dc_off & ~FLAG_MASK)); } void set_iq_balance(const std::complex<double> &cor){ |