We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8dbb347 commit 74c3b73Copy full SHA for 74c3b73
1 file changed
firmware/common/fixed_point.h
@@ -54,3 +54,20 @@ typedef uint64_t fp_28_36_t;
54
#define SR_FP_MHZ(mhz) (mhz##ULL * SR_FP_ONE_MHZ)
55
#define SR_FP_KHZ(khz) (khz##ULL * SR_FP_ONE_KHZ)
56
#define SR_FP_HZ(hz) (hz##ULL * SR_FP_ONE_HZ)
57
+
58
+/* 1.63 fixed point */
59
+typedef uint64_t fp_1_63_t;
60
61
+#define FRAC_ONE (1ULL << 63)
62
63
+/* one hundredth in 1.63 fixed point */
64
+#define FRAC_ONE_PERCENT (FRAC_ONE / (100ULL))
65
66
+/* one thousandth in 1.63 fixed point */
67
+#define FRAC_ONE_PERMILLE (FRAC_ONE / (1000ULL))
68
69
+/* one millionth in 1.63 fixed point */
70
+#define FRAC_ONE_PPM (FRAC_ONE / (1000000ULL))
71
72
+/* one billionth in 1.63 fixed point */
73
+#define FRAC_ONE_PPB (FRAC_ONE / (1000000000ULL))
0 commit comments