Introduction - If you have any usage issues, please Google them yourself
WDT timer 16ms interrupt. In the WDT interrupt, the presence of KEY_Now and KEY_Past record the last two IO state. According to the high to low can determine the key, low before high judgment the key is released, stored in the Key_Dect flag.
Key_Dect as input, using the state machine function Key_SM (), the short and long key press event key events. Are calling their respective event processing function.