summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/keyboard.c3
-rw-r--r--common/suspend.c3
-rw-r--r--protocol/lufa/lufa.c7
3 files changed, 7 insertions, 6 deletions
diff --git a/common/keyboard.c b/common/keyboard.c
index d1821a099f..601e3abe17 100644
--- a/common/keyboard.c
+++ b/common/keyboard.c
@@ -54,9 +54,6 @@ static bool has_ghost_in_row(uint8_t row)
void keyboard_init(void)
{
- // TODO: configuration of sendchar impl
- print_set_sendchar(sendchar);
-
timer_init();
matrix_init();
#ifdef PS2_MOUSE_ENABLE
diff --git a/common/suspend.c b/common/suspend.c
index 146b96d5cc..5b378892f3 100644
--- a/common/suspend.c
+++ b/common/suspend.c
@@ -51,8 +51,7 @@ bool suspend_wakeup_condition(void)
// run immediately after wakeup
void suspend_wakeup_init(void)
{
- // clear matrix and keyboard state
- matrix_init();
+ // clear keyboard state
clear_keyboard();
#ifdef BACKLIGHT_ENABLE
backlight_init();
diff --git a/protocol/lufa/lufa.c b/protocol/lufa/lufa.c
index c1617cd05a..a4e57b227d 100644
--- a/protocol/lufa/lufa.c
+++ b/protocol/lufa/lufa.c
@@ -531,19 +531,24 @@ static void SetupHardware(void)
// for Console_Task
USB_Device_EnableSOFEvents();
+ print_set_sendchar(sendchar);
}
int main(void) __attribute__ ((weak));
int main(void)
{
SetupHardware();
+ sei();
+ while (USB_DeviceState != DEVICE_STATE_Configured) ;
+ print("USB configured.\n");
+
keyboard_init();
host_set_driver(&lufa_driver);
#ifdef SLEEP_LED_ENABLE
sleep_led_init();
#endif
- sei();
+ print("Keyboard start.\n");
while (1) {
while (USB_DeviceState == DEVICE_STATE_Suspended) {
suspend_power_down();