X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=sidebyside;f=protocol%2Fpjrc%2Fmain.c;h=5f15dbf892c16f42acbf1a80ee0041b27537565d;hb=be8ea3c0940aabb55281863743c7e7d31424c573;hp=776bfee9d610aa0fbe31719f7c727c3b3a477545;hpb=8c80deb775ac151001dc1592a2e94e8677b49964;p=max%2Ftmk_keyboard.git diff --git a/protocol/pjrc/main.c b/protocol/pjrc/main.c index 776bfee9..5f15dbf8 100644 --- a/protocol/pjrc/main.c +++ b/protocol/pjrc/main.c @@ -31,10 +31,7 @@ #include "print.h" #include "debug.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" @@ -55,7 +52,17 @@ int main(void) 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(); } }