From e93b44e8b5374fa5605832738eb951047bf8e381 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Sun, 16 Mar 2014 19:12:16 +0100 Subject: [PATCH] msp430: remove expensive modulo call --- cpu/msp430-common/hwtimer_cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/msp430-common/hwtimer_cpu.c b/cpu/msp430-common/hwtimer_cpu.c index 40c6867b41..c1dedf6a80 100644 --- a/cpu/msp430-common/hwtimer_cpu.c +++ b/cpu/msp430-common/hwtimer_cpu.c @@ -107,9 +107,9 @@ void hwtimer_arch_set(unsigned long offset, short timer) void hwtimer_arch_set_absolute(unsigned long value, short timer) { - uint16_t small_value = value % 0xFFFF; + uint16_t small_value = value & 0xFFFF; overflow_interrupt[timer] = (uint16_t)(value >> 16); - timer_set(small_value,timer); + timer_set(small_value, timer); } void hwtimer_arch_unset(short timer)