msp430: remove expensive modulo call
This commit is contained in:
parent
28f267f8f6
commit
e93b44e8b5
@ -107,7 +107,7 @@ 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);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user