diff options
author | Josh Blum <josh@joshknows.com> | 2010-03-04 18:34:28 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-03-04 18:34:28 -0800 |
commit | bb86022d5a5f7055cdeebaeb4a55216e1a056fd4 (patch) | |
tree | 8dd96e7b0fcef00fde57da97d44e012cc6177670 /host/lib/usrp/usrp2/dsp_impl.cpp | |
parent | 821c31417894bed5603dc1a18415d4a35ddd7c2d (diff) | |
download | uhd-bb86022d5a5f7055cdeebaeb4a55216e1a056fd4.tar.gz uhd-bb86022d5a5f7055cdeebaeb4a55216e1a056fd4.tar.bz2 uhd-bb86022d5a5f7055cdeebaeb4a55216e1a056fd4.zip |
Moved timeouts into the udp transports.
Simplified the fast path checking in the fw, but it turns out this was not the issue.
Fixed some bad bit operations with the 16sc words (dont forget sign extension).
Added some more documentation to the headers....
Diffstat (limited to 'host/lib/usrp/usrp2/dsp_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/dsp_impl.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp2/dsp_impl.cpp b/host/lib/usrp/usrp2/dsp_impl.cpp index a32f68872..7831b7667 100644 --- a/host/lib/usrp/usrp2/dsp_impl.cpp +++ b/host/lib/usrp/usrp2/dsp_impl.cpp @@ -21,6 +21,9 @@ using namespace uhd; +static const size_t default_decim = 16; +static const size_t default_interp = 16; + /*********************************************************************** * DDC Helper Methods **********************************************************************/ @@ -37,7 +40,7 @@ static uint32_t calculate_freq_word_and_update_actual_freq(freq_t &freq, freq_t } static uint32_t calculate_iq_scale_word(int16_t i, int16_t q){ - return ((i & 0xffff) << 16) | ((q & 0xffff) << 0); + return (uint16_t(i) << 16) | (uint16_t(q) << 0); } void usrp2_impl::init_ddc_config(void){ @@ -48,7 +51,7 @@ void usrp2_impl::init_ddc_config(void){ ); //initial config and update - _ddc_decim = 64; + _ddc_decim = default_decim; _ddc_freq = 0; update_ddc_config(); @@ -196,7 +199,7 @@ void usrp2_impl::init_duc_config(void){ ); //initial config and update - _duc_interp = 64; + _duc_interp = default_interp; _duc_freq = 0; update_duc_config(); } |