From d83ff60c86ab9c3fae79eddc491adebd15959e1d Mon Sep 17 00:00:00 2001 From: aleph Date: Wed, 29 Sep 2010 13:59:39 +0000 Subject: [PATCH] sam3n port: fix integer comparison in clock initialization git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4351 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/cortex-m3/drv/clock_sam3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bertos/cpu/cortex-m3/drv/clock_sam3.c b/bertos/cpu/cortex-m3/drv/clock_sam3.c index ae70d529..fbc79062 100644 --- a/bertos/cpu/cortex-m3/drv/clock_sam3.c +++ b/bertos/cpu/cortex-m3/drv/clock_sam3.c @@ -65,8 +65,8 @@ INLINE uint32_t evaluate_pll(void) { // RC oscillator set to 12 MHz freq = 12000000 / div * (1 + mul); - if (ABS(CPU_FREQ - freq) < best_delta) { - best_delta = ABS(CPU_FREQ - freq); + if (ABS((int)CPU_FREQ - freq) < best_delta) { + best_delta = ABS((int)CPU_FREQ - freq); best_mul = mul; best_div = div; } -- 2.25.1