I'm posting this here because it may be more of an electronics issue.
Anyways, I have a program which calls the dkey function to try to get a value based on the key pressed. I have three keys. Two are tied to their own GPIO pins and the third key functions exactly the same as the other two...
This routine is interrupt driven, and will detect either a short or long button press. It's return value is bit encoded and as such it is possible that both a long and short press can be detected. They are valid, since the press is debounced.
The code is not optimized, but written for...