Ver Fonte

multi_button.c: add the default keyword for the switch case

https://github.com/0x1abin/MultiButton/commit/98d1643e5b919d267a2b40955a309be410bef2c6
Meco Man há 2 anos atrás
pai
commit
cf3a197ecd
1 ficheiros alterados com 4 adições e 0 exclusões
  1. 4 0
      multi_button.c

+ 4 - 0
multi_button.c

@@ -192,6 +192,10 @@ void button_handler(struct button* handle)
             handle->state = 0;
         }
         break;
+
+    default:
+        handle->state = 0; /* reset */
+        break;
     }
 }