diff options
Diffstat (limited to 'protocol')
| -rw-r--r-- | protocol/iwrap/main.c | 3 | ||||
| -rw-r--r-- | protocol/lufa/lufa.c | 11 | ||||
| -rw-r--r-- | protocol/pjrc/main.c | 27 | ||||
| -rw-r--r-- | protocol/vusb/main.c | 4 |
4 files changed, 2 insertions, 43 deletions
diff --git a/protocol/iwrap/main.c b/protocol/iwrap/main.c index c11ff7ab9..05a67337f 100644 --- a/protocol/iwrap/main.c +++ b/protocol/iwrap/main.c | |||
| @@ -131,9 +131,6 @@ int main(void) | |||
| 131 | //pullup_pins(); | 131 | //pullup_pins(); |
| 132 | //set_prr(); | 132 | //set_prr(); |
| 133 | 133 | ||
| 134 | print_enable = true; | ||
| 135 | debug_enable = false; | ||
| 136 | |||
| 137 | #ifdef HOST_VUSB | 134 | #ifdef HOST_VUSB |
| 138 | disable_vusb(); | 135 | disable_vusb(); |
| 139 | #endif | 136 | #endif |
diff --git a/protocol/lufa/lufa.c b/protocol/lufa/lufa.c index bff1f5e8b..68f30dd16 100644 --- a/protocol/lufa/lufa.c +++ b/protocol/lufa/lufa.c | |||
| @@ -461,19 +461,12 @@ int main(void) __attribute__ ((weak)); | |||
| 461 | int main(void) | 461 | int main(void) |
| 462 | { | 462 | { |
| 463 | SetupHardware(); | 463 | SetupHardware(); |
| 464 | keyboard_init(); | ||
| 465 | host_set_driver(&lufa_driver); | ||
| 464 | sei(); | 466 | sei(); |
| 465 | 467 | ||
| 466 | print_enable = true; | ||
| 467 | debug_enable = true; | ||
| 468 | debug_matrix = true; | ||
| 469 | debug_keyboard = true; | ||
| 470 | debug_mouse = true; | ||
| 471 | |||
| 472 | // TODO: can't print here | 468 | // TODO: can't print here |
| 473 | debug("LUFA init\n"); | 469 | debug("LUFA init\n"); |
| 474 | |||
| 475 | keyboard_init(); | ||
| 476 | host_set_driver(&lufa_driver); | ||
| 477 | while (1) { | 470 | while (1) { |
| 478 | keyboard_task(); | 471 | keyboard_task(); |
| 479 | 472 | ||
diff --git a/protocol/pjrc/main.c b/protocol/pjrc/main.c index e0f600fe7..9f664bc43 100644 --- a/protocol/pjrc/main.c +++ b/protocol/pjrc/main.c | |||
| @@ -57,33 +57,6 @@ int main(void) | |||
| 57 | while (!usb_configured()) /* wait */ ; | 57 | while (!usb_configured()) /* wait */ ; |
| 58 | 58 | ||
| 59 | keyboard_init(); | 59 | keyboard_init(); |
| 60 | matrix_scan(); | ||
| 61 | if (matrix_key_count() >= 3) { | ||
| 62 | #ifdef DEBUG_LED | ||
| 63 | for (int i = 0; i < 6; i++) { | ||
| 64 | DEBUG_LED_CONFIG; | ||
| 65 | DEBUG_LED_ON; | ||
| 66 | _delay_ms(500); | ||
| 67 | DEBUG_LED_OFF; | ||
| 68 | _delay_ms(500); | ||
| 69 | } | ||
| 70 | #else | ||
| 71 | _delay_ms(5000); | ||
| 72 | #endif | ||
| 73 | print_enable = true; | ||
| 74 | debug_enable = true; | ||
| 75 | debug_matrix = true; | ||
| 76 | debug_keyboard = true; | ||
| 77 | debug_mouse = true; | ||
| 78 | print("debug enabled.\n"); | ||
| 79 | } | ||
| 80 | if (matrix_key_count() >= 4) { | ||
| 81 | print("jump to bootloader...\n"); | ||
| 82 | _delay_ms(1000); | ||
| 83 | bootloader_jump(); // not return | ||
| 84 | } | ||
| 85 | |||
| 86 | |||
| 87 | host_set_driver(pjrc_driver()); | 60 | host_set_driver(pjrc_driver()); |
| 88 | while (1) { | 61 | while (1) { |
| 89 | keyboard_task(); | 62 | keyboard_task(); |
diff --git a/protocol/vusb/main.c b/protocol/vusb/main.c index e964a69a8..8e4a266e9 100644 --- a/protocol/vusb/main.c +++ b/protocol/vusb/main.c | |||
| @@ -53,10 +53,6 @@ int main(void) | |||
| 53 | uart_init(UART_BAUD_RATE); | 53 | uart_init(UART_BAUD_RATE); |
| 54 | #endif | 54 | #endif |
| 55 | 55 | ||
| 56 | debug_enable = true; | ||
| 57 | print_enable = true; | ||
| 58 | |||
| 59 | debug("keyboard_init()\n"); | ||
| 60 | keyboard_init(); | 56 | keyboard_init(); |
| 61 | host_set_driver(vusb_driver()); | 57 | host_set_driver(vusb_driver()); |
| 62 | 58 | ||
