Explorar el Código

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

https://github.com/0x1abin/MultiButton/commit/98d1643e5b919d267a2b40955a309be410bef2c6
Meco Man hace 2 años
padre
commit
cf3a197ecd
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  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;
     }
 }