commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r9997 - gnuradio/trunk/usrp2/firmware/include


From: matt
Subject: [Commit-gnuradio] r9997 - gnuradio/trunk/usrp2/firmware/include
Date: Sun, 16 Nov 2008 13:43:58 -0700 (MST)

Author: matt
Date: 2008-11-16 13:43:57 -0700 (Sun, 16 Nov 2008)
New Revision: 9997

Modified:
   gnuradio/trunk/usrp2/firmware/include/usrp2_types.h
Log:
added a utility function to get the integer rounded gain


Modified: gnuradio/trunk/usrp2/firmware/include/usrp2_types.h
===================================================================
--- gnuradio/trunk/usrp2/firmware/include/usrp2_types.h 2008-11-16 01:24:26 UTC 
(rev 9996)
+++ gnuradio/trunk/usrp2/firmware/include/usrp2_types.h 2008-11-16 20:43:57 UTC 
(rev 9997)
@@ -99,7 +99,13 @@
   return ((double) fx) * 1.0/(1 << U2_FPG_RP);
 }
 
+static inline int
+u2_fxpt_gain_round_to_int(u2_fxpt_gain_t fx)
+{ 
+  return (int)((fx+(1<<(U2_FPG_RP-1)))>>U2_FPG_RP);
+}
 
+
 __U2_END_DECLS
 
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]