X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=sidebyside;f=pjrc%2Fhost.c;h=b69c6cb20c513af34347200bc6fc686c97f6814a;hb=cec254950509038ca9c805e87feea9091d77d29f;hp=8da88517b5cffb8c59a61a8d62a6f59860e6cda9;hpb=1a7c3585ed9a68099e371b3180a404dd5d08ce1a;p=max%2Ftmk_keyboard.git diff --git a/pjrc/host.c b/pjrc/host.c index 8da88517..b69c6cb2 100644 --- a/pjrc/host.c +++ b/pjrc/host.c @@ -1,4 +1,5 @@ #include +#include #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)