summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-06-08 00:00:54 -0700
committerJosh Blum <josh@joshknows.com>2010-06-08 00:00:54 -0700
commitd0039bd4128eed56acccce7b20c913afa8cb7381 (patch)
tree953c6088ef6f8775c61c7beac59a47a9e36e3774 /host/lib/usrp
parent11e2d407ce4a45da8c6981abfd34883cb9174840 (diff)
downloaduhd-d0039bd4128eed56acccce7b20c913afa8cb7381.tar.gz
uhd-d0039bd4128eed56acccce7b20c913afa8cb7381.tar.bz2
uhd-d0039bd4128eed56acccce7b20c913afa8cb7381.zip
Replaced convert types with generated convert types that handles more cases.
Added unit test for generated converter.
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/dsp_utils.hpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/host/lib/usrp/dsp_utils.hpp b/host/lib/usrp/dsp_utils.hpp
index 8a6afb292..cfe5375f8 100644
--- a/host/lib/usrp/dsp_utils.hpp
+++ b/host/lib/usrp/dsp_utils.hpp
@@ -81,15 +81,14 @@ namespace dsp_type1{
/*!
* Calculate the IQ scale factor word from I and Q components.
- * \param i the I component
- * \param q the Q component
+ * \param i the I component of the scalar
+ * \param q the Q component of the scalar
* \return the 32-bit scale factor control word
*/
static inline boost::uint32_t calc_iq_scale_word(
- boost::int16_t i,
- boost::int16_t q
+ boost::int16_t i, boost::int16_t q
){
- return (boost::uint16_t(i) << 16) | (boost::uint16_t(q) << 0);
+ return (boost::uint32_t(i) << 16) | (boost::uint32_t(q) << 0);
}
/*!