X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=sidebyside;f=tmk.c;h=53da9aa8604ae37d7b433b2bc23754b4b4cf78b4;hb=a31b31e717a2fa67642be33b321cde4b9b3b496a;hp=ae138623bc2378cff0dcb438b1b8e86921145c2e;hpb=2f80e790c6310ad24a4cb3d4a72c31314364fef7;p=max%2Ftmk_keyboard.git diff --git a/tmk.c b/tmk.c index ae138623..53da9aa8 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<