From cec254950509038ca9c805e87feea9091d77d29f Mon Sep 17 00:00:00 2001 From: tmk Date: Thu, 10 Mar 2011 00:50:27 +0900 Subject: FIX: send last report when idle timeouts. (pjrc) --- vusb/host.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'vusb/host.c') diff --git a/vusb/host.c b/vusb/host.c index 05a1f29cd..901537bcb 100644 --- a/vusb/host.c +++ b/vusb/host.c @@ -1,3 +1,5 @@ +#include +#include #include "usbdrv.h" #include "usbconfig.h" #include "print.h" @@ -63,9 +65,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) -- cgit v1.2.3