From: asterix Date: Tue, 20 May 2008 15:47:18 +0000 (+0000) Subject: Move fix_mul to header. X-Git-Tag: 2.0.0~636 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d3774c5c1c4ebb4710773627068be0ad39a479e3;p=bertos.git Move fix_mul to header. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1298 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/algo/ramp.c b/bertos/algo/ramp.c index 9a2cc92e..8ce091da 100644 --- a/bertos/algo/ramp.c +++ b/bertos/algo/ramp.c @@ -107,11 +107,6 @@ #include // memcpy() -/** - * 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) - void ramp_compute(struct Ramp *ramp, uint32_t clocksRamp, uint16_t clocksMinWL, uint16_t clocksMaxWL) { ASSERT(clocksMaxWL >= clocksMinWL); diff --git a/bertos/algo/ramp.h b/bertos/algo/ramp.h index f438dc5e..b1fe716f 100644 --- a/bertos/algo/ramp.h +++ b/bertos/algo/ramp.h @@ -114,7 +114,10 @@ */ #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