projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add type include. Fix semicolon.
[bertos.git]
/
bertos
/
algo
/
ramp.h
diff --git
a/bertos/algo/ramp.h
b/bertos/algo/ramp.h
index f438dc5ebe1d7574566f85a16af5503731b745f5..b1fe716fba0104c3f141355449aea2367a5bb08f 100644
(file)
--- a/
bertos/algo/ramp.h
+++ b/
bertos/algo/ramp.h
@@
-114,7
+114,10
@@
*/
#define FREQ2MICROS(hz) (1000000UL / ((uint32_t)(hz)))
*/
#define FREQ2MICROS(hz) (1000000UL / ((uint32_t)(hz)))
-
+/**
+ * Multiply \p a and \p b two integer at 32 bit and extract the high 16 bit word.
+ */
+#define FIX_MULT32(a,b) (((uint64_t)(a)*(uint32_t)(b)) >> 16)
/**
* Structure holding pre-calculated data for speeding up real-time evaluation
/**
* Structure holding pre-calculated data for speeding up real-time evaluation