From: tmk Date: Fri, 2 Mar 2018 05:09:09 +0000 (+0900) Subject: xt_usb: Fix warning on switch-case X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=1fc989947a338492315b07d1abf70fce1664f1b1;p=max%2Ftmk_keyboard.git xt_usb: Fix warning on switch-case --- diff --git a/tmk_core/protocol/xt_interrupt.c b/tmk_core/protocol/xt_interrupt.c index 97e93a5a..525dbcf2 100644 --- a/tmk_core/protocol/xt_interrupt.c +++ b/tmk_core/protocol/xt_interrupt.c @@ -94,7 +94,7 @@ ISR(XT_INT_VECT) * https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol */ static enum { - START, BIT0, BIT1, BIT2, BIT3, BIT4, BIT5, BIT6, BIT7, END + START, BIT0, BIT1, BIT2, BIT3, BIT4, BIT5, BIT6, BIT7 } state = START; static uint8_t data = 0; @@ -114,7 +114,7 @@ ISR(XT_INT_VECT) data |= 0x80; break; } - if (++state == END) { + if (state++ == BIT7) { pbuf_enqueue(data); state = START; data = 0;