|
|
|
@ -20,7 +20,7 @@
|
|
|
|
|
#include "bitarithm.h" |
|
|
|
|
#include "cpu.h" |
|
|
|
|
#include "irq.h" |
|
|
|
|
#include "hwtimer.h" |
|
|
|
|
#include "xtimer.h" |
|
|
|
|
|
|
|
|
|
/** min and max portnumber to generate interrupts */ |
|
|
|
|
#define PORTINT_MIN (1) |
|
|
|
@ -163,10 +163,10 @@ interrupt(PORT1_VECTOR) __attribute__((naked)) port1_isr(void)
|
|
|
|
|
/* check interrupt source */ |
|
|
|
|
if (debounce_flags[0] & p1ifg) { |
|
|
|
|
/* check if bouncing */ |
|
|
|
|
diff = hwtimer_now() - debounce_time[0][ifg_num]; |
|
|
|
|
diff = xtimer_now() - debounce_time[0][ifg_num]; |
|
|
|
|
|
|
|
|
|
if (diff > DEBOUNCE_TIMEOUT) { |
|
|
|
|
debounce_time[0][ifg_num] = hwtimer_now(); |
|
|
|
|
debounce_time[0][ifg_num] = xtimer_now(); |
|
|
|
|
|
|
|
|
|
if (cb[0][ifg_num] != NULL) { |
|
|
|
|
cb[0][ifg_num](); |
|
|
|
@ -208,10 +208,10 @@ interrupt(PORT2_VECTOR) __attribute__((naked)) port2_isr(void)
|
|
|
|
|
/* check interrupt source */ |
|
|
|
|
if (debounce_flags[1] & p2ifg) { |
|
|
|
|
/* check if bouncing */ |
|
|
|
|
diff = hwtimer_now() - debounce_time[1][ifg_num]; |
|
|
|
|
diff = xtimer_now() - debounce_time[1][ifg_num]; |
|
|
|
|
|
|
|
|
|
if (diff > DEBOUNCE_TIMEOUT) { |
|
|
|
|
debounce_time[1][ifg_num] = hwtimer_now(); |
|
|
|
|
debounce_time[1][ifg_num] = xtimer_now(); |
|
|
|
|
c1++; |
|
|
|
|
|
|
|
|
|
if (cb[1][ifg_num] != NULL) { |
|
|
|
|