msp430: remove expensive modulo call

This commit is contained in:
Oleg Hahm 2014-03-16 19:12:16 +01:00
parent 28f267f8f6
commit e93b44e8b5

View File

@ -107,9 +107,9 @@ void hwtimer_arch_set(unsigned long offset, short timer)
void hwtimer_arch_set_absolute(unsigned long value, 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); overflow_interrupt[timer] = (uint16_t)(value >> 16);
timer_set(small_value,timer); timer_set(small_value, timer);
} }
void hwtimer_arch_unset(short timer) void hwtimer_arch_unset(short timer)