]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - protocol/pjrc/main.c
Fix typo of variable name
[max/tmk_keyboard.git] / protocol / pjrc / main.c
index 776bfee9d610aa0fbe31719f7c727c3b3a477545..1ef87f8651c8a2ee415e7d72590156b20db8c5b8 100644 (file)
 #include "matrix.h"
 #include "print.h"
 #include "debug.h"
+#include "sendchar.h"
 #include "util.h"
-#include "bootloader.h"
-#ifdef PS2_MOUSE_ENABLE
-#   include "ps2_mouse.h"
-#endif
+#include "suspend.h"
 #include "host.h"
 #include "pjrc.h"
 
@@ -53,9 +51,21 @@ int main(void)
     usb_init();
     while (!usb_configured()) /* wait */ ;
 
+    print_set_sendchar(sendchar);
+
     keyboard_init();
     host_set_driver(pjrc_driver());
+#ifdef SLEEP_LED_ENABLE
+    sleep_led_init();
+#endif
     while (1) {
-       keyboard_task(); 
+        while (suspend) {
+            suspend_power_down();
+            if (remote_wakeup && suspend_wakeup_condition()) {
+                usb_remote_wakeup();
+            }
+        }
+
+        keyboard_task(); 
     }
 }