diff options
author | tmk <nobody@nowhere> | 2013-03-27 15:23:57 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-03-27 15:23:57 +0900 |
commit | 969cc4f812e3f86213f97adf340e3c7160fc639e (patch) | |
tree | ad3719c0dd8cce043c235fd2d7e30c8bcd65f7af /protocol/pjrc/main.c | |
parent | 1f19176867b1b1f760c0ec41cd78fbb6832d29ad (diff) | |
parent | ac509aa079bb090017886b5d7e32240ef16a1196 (diff) | |
download | qmk_firmware-969cc4f812e3f86213f97adf340e3c7160fc639e.tar.gz |
Merge branch 'suspend_fix'
Diffstat (limited to 'protocol/pjrc/main.c')
-rw-r--r-- | protocol/pjrc/main.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/protocol/pjrc/main.c b/protocol/pjrc/main.c index 776bfee9d..5f15dbf89 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(); } } |