Skip to content
Snippets Groups Projects
Commit e93b44e8 authored by Oleg Hahm's avatar Oleg Hahm
Browse files

msp430: remove expensive modulo call

parent 28f267f8
No related branches found
No related tags found
No related merge requests found
...@@ -107,9 +107,9 @@ void hwtimer_arch_set(unsigned long offset, short timer) ...@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment