summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2012-04-28 02:24:11 +0900
committertmk <nobody@nowhere>2012-04-28 02:24:11 +0900
commit9dec116bc0f105fa24645e0ab936be2bff208e5d (patch)
treed75924dae4be254c90893207515ffe51ae2c0670
parent12f6e9ffa76f685f7256bf1421f918f90c93add1 (diff)
Workaround for Mac HID SET_IDLE behaviour.
-rw-r--r--pjrc/usb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pjrc/usb.c b/pjrc/usb.c
index 2b69b6a7fa..89087218f3 100644
--- a/pjrc/usb.c
+++ b/pjrc/usb.c
@@ -626,7 +626,7 @@ void usb_remote_wakeup(void)
//
ISR(USB_GEN_vect)
{
- uint8_t intbits, t, i;
+ uint8_t intbits, t;
static uint8_t div4=0;
intbits = UDINT;
@@ -667,13 +667,16 @@ ISR(USB_GEN_vect)
usb_keyboard_idle_count++;
if (usb_keyboard_idle_count == usb_keyboard_idle_config) {
usb_keyboard_idle_count = 0;
+ /* TODO: fix keyboard_report inconsistency */
+/* To avoid Mac SET_IDLE behaviour.
UEDATX = keyboard_report_prev->mods;
UEDATX = 0;
uint8_t keys = usb_keyboard_protocol ? KBD_REPORT_KEYS : 6;
- for (i=0; i<keys; i++) {
+ for (uint8_t i=0; i<keys; i++) {
UEDATX = keyboard_report_prev->keys[i];
}
UEINTX = 0x3A;
+*/
}
}
}