diff options
| author | Josh Blum <josh@joshknows.com> | 2012-03-23 14:37:35 -0700 | 
|---|---|---|
| committer | Josh Blum <josh@joshknows.com> | 2012-03-23 14:37:35 -0700 | 
| commit | 7e395dab9a2b04933cafab3e93c0b7e098fcb826 (patch) | |
| tree | 1cbcf17cdf167afe1796eeeb33e9b10f3d18153d | |
| parent | e4d3f63ce0bb04287a61e9547acfa02a50e84326 (diff) | |
| parent | b60fccc51495a84a5c434c4e612170e4a75faf12 (diff) | |
| download | uhd-7e395dab9a2b04933cafab3e93c0b7e098fcb826.tar.gz uhd-7e395dab9a2b04933cafab3e93c0b7e098fcb826.tar.bz2 uhd-7e395dab9a2b04933cafab3e93c0b7e098fcb826.zip | |
Merge branch 'maint'
| -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){ | 
