]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - tmk_core/protocol/xt_interrupt.c
xt_usb: Fix warning on switch-case
[max/tmk_keyboard.git] / 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;