summaryrefslogtreecommitdiffstats
path: root/usb_keyboard.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2010-11-26 01:56:21 +0900
committertmk <nobody@nowhere>2010-11-26 01:56:21 +0900
commit37ced39ae2ecfc945c21526faffb2449577bbeb7 (patch)
treeec32b51a56d17f30cabd80e2bec7081a5f49e5b7 /usb_keyboard.c
parentd6da5546879f9979d043a0b223597af7e8dedbf8 (diff)
add build option USB_12KRO.
Diffstat (limited to 'usb_keyboard.c')
-rw-r--r--usb_keyboard.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usb_keyboard.c b/usb_keyboard.c
index 7f32a9083e..3e13ae4e36 100644
--- a/usb_keyboard.c
+++ b/usb_keyboard.c
@@ -64,6 +64,7 @@ int8_t usb_keyboard_send_report(usb_keyboard_report_t *report)
UEINTX = 0x3A;
SREG = intr_state;
+#ifdef USB_12KRO
if (!usb_configured()) return -1;
intr_state = SREG;
cli();
@@ -82,17 +83,18 @@ int8_t usb_keyboard_send_report(usb_keyboard_report_t *report)
cli();
UENUM = KEYBOARD_ENDPOINT2;
}
- UEDATX = 0;
+ UEDATX = report->mods;
UEDATX = 0;
for (i = 6; i < 12; i++) {
UEDATX = report->keys[i];
}
UEINTX = 0x3A;
SREG = intr_state;
+#endif
usb_keyboard_idle_count = 0;
- report->is_sent =true;
- usb_keyboard_print_report(report);
+ report->is_sent =true;
+ usb_keyboard_print_report(report);
return 0;
}