diff options
author | tmk <nobody@nowhere> | 2011-03-10 00:50:27 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2011-03-10 11:17:54 +0900 |
commit | cec254950509038ca9c805e87feea9091d77d29f (patch) | |
tree | c4f542b18dc080e32508aced1ee0ccce5cbf3a53 /pjrc/host.c | |
parent | 1a7c3585ed9a68099e371b3180a404dd5d08ce1a (diff) | |
download | qmk_firmware-cec254950509038ca9c805e87feea9091d77d29f.tar.gz qmk_firmware-cec254950509038ca9c805e87feea9091d77d29f.zip |
FIX: send last report when idle timeouts. (pjrc)
Diffstat (limited to 'pjrc/host.c')
-rw-r--r-- | pjrc/host.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pjrc/host.c b/pjrc/host.c index 8da88517b5..b69c6cb20c 100644 --- a/pjrc/host.c +++ b/pjrc/host.c @@ -1,4 +1,5 @@ #include <stdint.h> +#include <avr/interrupt.h> #include "usb_keycodes.h" #include "usb_keyboard.h" #include "usb_mouse.h" @@ -58,9 +59,12 @@ void host_add_code(uint8_t code) void host_swap_keyboard_report(void) { + uint8_t sreg = SREG; + cli(); report_keyboard_t *tmp = keyboard_report_prev; keyboard_report_prev = keyboard_report; keyboard_report = tmp; + SREG = sreg; } void host_clear_keyboard_report(void) |