]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - tmk.c
changed special mode key for macway: Left Shift + Right Shift
[max/tmk_keyboard.git] / tmk.c
diff --git a/tmk.c b/tmk.c
index f7042bd6fbe2754267d8d48e0c41c72f4c7be1b1..2248a7d71296d2be2c2ca09f2f14a63b995bc5fd 100644 (file)
--- a/tmk.c
+++ b/tmk.c
 #include "print.h"
 #include "debug.h"
 #include "util.h"
-#include "controller.h"
 #include "timer.h"
 #include "jump_bootloader.h"
+#ifdef PS2_MOUSE_ENABLE
+#   include "ps2.h"
+#   include "ps2_mouse.h"
+#endif
 
 
 #define CPU_PRESCALE(n)    (CLKPR = 0x80, CLKPR = (n))
@@ -66,8 +69,7 @@ int main(void)
 
     matrix_init();
     matrix_scan();
-    // bootloader comes up when any 4 or more keys are pressed at startup
-    if (matrix_key_count() >= 4) {
+    if (matrix_key_count() >= 3) {
 #ifdef DEBUG_LED
         for (int i = 0; i < 6; i++) {
             DEBUG_LED_CONFIG;
@@ -80,13 +82,24 @@ int main(void)
         _delay_ms(5000);
 #endif
         print_enable = true;
+        debug_enable = true;
+        debug_matrix = true;
+        debug_keyboard = true;
+        debug_mouse = true;
+        print("debug enabled.\n");
+    }
+    if (matrix_key_count() >= 4) {
         print("jump to bootloader...\n");
         _delay_ms(1000);
         jump_bootloader(); // not return
     }
 
+#ifdef PS2_MOUSE_ENABLE
+    ps2_host_init();
+    ps2_mouse_init();
+#endif
+
     while (1) {
        proc_matrix(); 
-        _delay_ms(2);
     }
 }