diff options
author | tmk <nobody@nowhere> | 2010-10-29 15:17:18 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2010-10-30 01:16:47 +0900 |
commit | 45d4a7a89883c3433604d4e011b665796a583008 (patch) | |
tree | b9ff5306dc5eb9a06d7e4a2fb7d0873a9b30606d /tmk.c | |
parent | 6c3b9a2ded1afcf4a6bbc69878f52088f4c1a0e8 (diff) | |
download | qmk_firmware-45d4a7a89883c3433604d4e011b665796a583008.tar.gz qmk_firmware-45d4a7a89883c3433604d4e011b665796a583008.zip |
improve layer switching
Diffstat (limited to 'tmk.c')
-rw-r--r-- | tmk.c | 23 |
1 files changed, 3 insertions, 20 deletions
@@ -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<<TOIE0); - + timer_init(); matrix_init(); matrix_scan(); @@ -97,13 +90,3 @@ int main(void) _delay_ms(2); } } - - -// This interrupt routine is run approx 61 times per second. -// A very simple inactivity timeout is implemented, where we -// will send a space character and print a message to the -// hid_listen debug message window. -ISR(TIMER0_OVF_vect) -{ - idle_count++; -} |