summaryrefslogtreecommitdiff
path: root/vusb/host.c
diff options
context:
space:
mode:
Diffstat (limited to 'vusb/host.c')
-rw-r--r--vusb/host.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vusb/host.c b/vusb/host.c
index 05a1f29cd1..901537bcb8 100644
--- a/vusb/host.c
+++ b/vusb/host.c
@@ -1,3 +1,5 @@
+#include <stdint.h>
+#include <avr/interrupt.h>
#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)