]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
xt_usb: Fix warning on switch-case
authortmk <hasu@tmk-kbd.com>
Fri, 2 Mar 2018 05:09:09 +0000 (14:09 +0900)
committertmk <hasu@tmk-kbd.com>
Wed, 14 Mar 2018 12:32:22 +0000 (21:32 +0900)
tmk_core/protocol/xt_interrupt.c

index 97e93a5a22f0594f26b7c35ae030f1435adf76fd..525dbcf2c318b451177a6aa18253c1a02beaf81b 100644 (file)
@@ -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;