define fixed point arithmetic constants

gitignore clion files
This commit is contained in:
EDiasAlberto
2024-10-15 14:57:37 +01:00
committed by Gleb Koval
parent 62cca87322
commit f969b02630
2 changed files with 11 additions and 0 deletions

2
.gitignore vendored
View File

@@ -24,3 +24,5 @@
*.nav
*.toc
#ignore files from CLion IDE
.idea

View File

@@ -0,0 +1,9 @@
#ifndef FIXED_POINT_H
#define FIXED_POINT_H
/* Fixed Point Arithmetic bit count constants */
#define NUM_INT_BITS 11
#define NUM_FRAC_BITS 20
#define CONVERSION_CONST 1 << NUM_FRAC_BITS /* f = 2^q, (2^20) */
#endif //FIXED_POINT_H