From 45d4a7a89883c3433604d4e011b665796a583008 Mon Sep 17 00:00:00 2001 From: tmk Date: Fri, 29 Oct 2010 15:17:18 +0900 Subject: improve layer switching --- tmk.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'tmk.c') diff --git a/tmk.c b/tmk.c index ae138623b..53da9aa86 100644 --- a/tmk.c +++ b/tmk.c @@ -35,17 +35,17 @@ #include "debug.h" #include "util.h" #include "controller.h" +#include "timer.h" #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) + bool debug_enable = false; bool debug_matrix = false; bool debug_keyboard = false; bool debug_mouse = false; -uint16_t idle_count=0; - int main(void) { @@ -58,14 +58,7 @@ int main(void) usb_init(); while (!usb_configured()) /* wait */ ; - // Configure timer 0 to generate a timer overflow interrupt every - // 256*1024 clock cycles, or approx 61 Hz when using 16 MHz clock - // This demonstrates how to use interrupts to implement a simple - // inactivity timeout. - TCCR0A = 0x00; - TCCR0B = 0x05; - TIMSK0 = (1<