diff options
Diffstat (limited to 'vusb')
-rw-r--r-- | vusb/host.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 <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) |