xt_usb: Fix warning on switch-case

This commit is contained in:
tmk 2018-03-02 14:09:09 +09:00
parent acbea7fb15
commit 1fc989947a

View file

@ -94,7 +94,7 @@ ISR(XT_INT_VECT)
* https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol * https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol
*/ */
static enum { static enum {
START, BIT0, BIT1, BIT2, BIT3, BIT4, BIT5, BIT6, BIT7, END START, BIT0, BIT1, BIT2, BIT3, BIT4, BIT5, BIT6, BIT7
} state = START; } state = START;
static uint8_t data = 0; static uint8_t data = 0;
@ -114,7 +114,7 @@ ISR(XT_INT_VECT)
data |= 0x80; data |= 0x80;
break; break;
} }
if (++state == END) { if (state++ == BIT7) {
pbuf_enqueue(data); pbuf_enqueue(data);
state = START; state = START;
data = 0; data = 0;