Introduction - If you have any usage issues, please Google them yourself
Under the button based on embedded linux key driver to achieve the code. Using the state machine to achieve to jitter, short and long key press functions. With a reference value.