This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

one button, two longpress timers

Hello!

I'm trying to program a code using just one button.

I'm using BSP_BUTTON_ACTION_LONG_PUSH (5) and MY_BSP_BUTTON_ACTION_LONG_PUSH (3) [which is exactly the same as BSP_BUTTON_ACTION_LONG_PUSH but with different timeout]. Both of them work perfectly when they are not defined at the same time, but when they do, the event for the one with longest time (BSP_BUTTON_ACTION_LONG_PUSH in this case) never happens.

My guess is that the handler resets the timer and I think that's why the second timeout never happens. Do you know how to fix this problem?

Thank you!

Parents Reply Children
No Data
Related