summaryrefslogtreecommitdiff
path: root/keyboard
diff options
context:
space:
mode:
authortmk <hasu@tmk-kbd.com>2014-11-29 20:47:15 +0900
committertmk <hasu@tmk-kbd.com>2015-01-15 17:08:48 +0900
commit20caf673d8ba7fb7675e2559bfebad6ddb9d6fd0 (patch)
treee1651c9a8734f33727e9da553cc712c6b51adbc6 /keyboard
parent9179246a1d69024449829218aa7fb967d8ccc3f5 (diff)
Fix lufa sendchar() infinite wait loop
- FrameNumber is not updated when adapter powered - can be blocked in sendchar() when pluged into AC adapter
Diffstat (limited to 'keyboard')
-rw-r--r--keyboard/hhkb_rn42/rn42/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/keyboard/hhkb_rn42/rn42/main.c b/keyboard/hhkb_rn42/rn42/main.c
index a3a37c0747..42b09d8c8c 100644
--- a/keyboard/hhkb_rn42/rn42/main.c
+++ b/keyboard/hhkb_rn42/rn42/main.c
@@ -17,8 +17,8 @@
static int8_t sendchar_func(uint8_t c)
{
- sendchar(c); // LUFA
xmit(c); // SUART
+ sendchar(c); // LUFA
return 0;
}
@@ -85,6 +85,7 @@ int main(void)
print("Keyboard start.\n");
while (1) {
while (USB_DeviceState == DEVICE_STATE_Suspended) {
+ print("[s]");
suspend_power_down();
if (USB_Device_RemoteWakeupEnabled && suspend_wakeup_condition()) {
USB_Device_SendRemoteWakeup();