+ #endif // ARCH_BOARD_KC
+
+ /*!
+ * How many timer overflows we must count before calling the real
+ * timer handler.
+ * When the timer is programmed to overflow at 24 kHz, a value of
+ * 24 will result in 1ms between each call.
+ */
+ #define TIMER1_OVF_COUNT 24
+ //#warning TIMER1_OVF_COUNT for timer at 12 kHz
+ //#define TIMER1_OVF_COUNT 12
+
+ static uint8_t count = TIMER1_OVF_COUNT;
+
+ count--;
+ if (!count)
+ {
+ timer_handler();
+ count = TIMER1_OVF_COUNT;
+ }