summaryrefslogtreecommitdiff
path: root/protocol/pjrc
diff options
context:
space:
mode:
authortmk <hasu@tmk-kbd.com>2015-01-03 12:02:48 +0900
committertmk <hasu@tmk-kbd.com>2015-01-03 12:09:41 +0900
commit06527bde4f873ffc6eb8e359fb3b150e880b89ba (patch)
tree347b6886dc485091ff5ffcf211ab87b3c9ceda43 /protocol/pjrc
parent22d99f26af757c0bedb31ba3f63d793e4b2d4ca3 (diff)
bluefruit, pjrc: Update protocols for new API
Diffstat (limited to 'protocol/pjrc')
-rw-r--r--protocol/pjrc/main.c3
-rw-r--r--protocol/pjrc/usb_keyboard.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/protocol/pjrc/main.c b/protocol/pjrc/main.c
index 1ef87f8651..4f87a17364 100644
--- a/protocol/pjrc/main.c
+++ b/protocol/pjrc/main.c
@@ -24,6 +24,7 @@
#include <stdbool.h>
#include <avr/io.h>
#include <avr/interrupt.h>
+#include <avr/wdt.h>
#include <util/delay.h>
#include "keyboard.h"
#include "usb.h"
@@ -60,7 +61,7 @@ int main(void)
#endif
while (1) {
while (suspend) {
- suspend_power_down();
+ suspend_power_down(WDTO_120MS);
if (remote_wakeup && suspend_wakeup_condition()) {
usb_remote_wakeup();
}
diff --git a/protocol/pjrc/usb_keyboard.c b/protocol/pjrc/usb_keyboard.c
index 758a4edc6c..4b87b5d7b5 100644
--- a/protocol/pjrc/usb_keyboard.c
+++ b/protocol/pjrc/usb_keyboard.c
@@ -74,7 +74,7 @@ void usb_keyboard_print_report(report_keyboard_t *report)
{
if (!debug_keyboard) return;
print("keys: ");
- for (int i = 0; i < REPORT_KEYS; i++) { phex(report->keys[i]); print(" "); }
+ for (int i = 0; i < KEYBOARD_REPORT_KEYS; i++) { phex(report->keys[i]); print(" "); }
print(" mods: "); phex(report->mods); print("\n");
}