Add supsend and wakeup to pjrc stack
This commit is contained in:
parent
2c0bb5e7e6
commit
afc3148e23
4 changed files with 55 additions and 91 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue