aboutsummaryrefslogtreecommitdiff
path: root/protocol/pjrc/main.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-03-26 16:55:45 +0900
committertmk <nobody@nowhere>2013-03-27 15:18:08 +0900
commitafc3148e2341e4be982cdb628543e30923cfdaf7 (patch)
tree523679724e32be013ba461a779c088912c5a72f8 /protocol/pjrc/main.c
parent2c0bb5e7e620b0472f110d2cbc5768bb6d97eec5 (diff)
downloadqmk_firmware-afc3148e2341e4be982cdb628543e30923cfdaf7.tar.gz
qmk_firmware-afc3148e2341e4be982cdb628543e30923cfdaf7.zip
Add supsend and wakeup to pjrc stack
Diffstat (limited to 'protocol/pjrc/main.c')
-rw-r--r--protocol/pjrc/main.c17
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 @@
31#include "print.h" 31#include "print.h"
32#include "debug.h" 32#include "debug.h"
33#include "util.h" 33#include "util.h"
34#include "bootloader.h" 34#include "suspend.h"
35#ifdef PS2_MOUSE_ENABLE
36# include "ps2_mouse.h"
37#endif
38#include "host.h" 35#include "host.h"
39#include "pjrc.h" 36#include "pjrc.h"
40 37
@@ -55,7 +52,17 @@ int main(void)
55 52
56 keyboard_init(); 53 keyboard_init();
57 host_set_driver(pjrc_driver()); 54 host_set_driver(pjrc_driver());
55#ifdef SLEEP_LED_ENABLE
56 sleep_led_init();
57#endif
58 while (1) { 58 while (1) {
59 keyboard_task(); 59 while (suspend) {
60 suspend_power_down();
61 if (remote_wakeup && suspend_wakeup_condition()) {
62 usb_remote_wakeup();
63 }
64 }
65
66 keyboard_task();
60 } 67 }
61} 68}