I have tried something like below in my interrupt function but i was unable to detect long press ,every time it was detecting short press.static timestamp_pressed=-1;if (timestamp_pressed == -1) {user just pressed the button timestamp_pressed = HAL...