X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=protocol%2Fpjrc%2Fmain.c;h=776bfee9d610aa0fbe31719f7c727c3b3a477545;hb=9dfc611ae1903390a41b85da1cba2c6d67c7a8dd;hp=15f14920b4b4514b62bda24d19790b142b83bf25;hpb=62d1ebb91c7b381ce3d88aad9ee0b03bea9fce26;p=max%2Ftmk_keyboard.git diff --git a/protocol/pjrc/main.c b/protocol/pjrc/main.c index 15f14920..776bfee9 100644 --- a/protocol/pjrc/main.c +++ b/protocol/pjrc/main.c @@ -42,17 +42,8 @@ #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) -bool debug_enable = false; -bool debug_matrix = false; -bool debug_keyboard = false; -bool debug_mouse = false; - - int main(void) { - DEBUG_LED_CONFIG; - DEBUG_LED_OFF; - // set for 16 MHz clock CPU_PRESCALE(0); @@ -63,35 +54,8 @@ int main(void) while (!usb_configured()) /* wait */ ; keyboard_init(); - matrix_scan(); - if (matrix_key_count() >= 3) { -#ifdef DEBUG_LED - for (int i = 0; i < 6; i++) { - DEBUG_LED_CONFIG; - DEBUG_LED_ON; - _delay_ms(500); - DEBUG_LED_OFF; - _delay_ms(500); - } -#else - _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); - bootloader_jump(); // not return - } - - host_set_driver(pjrc_driver()); while (1) { - keyboard_proc(); + keyboard_task(); } }