diff options
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 @@ | |||
| 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 | } |
