I have been working on getting a hardware solution to single click, double click, and long press detection operational. My thought process was to do the following:
Switch (resistive pull up) -> Timer -> ISR (Please see attached image. There appears to be no way for me to show it in the editor).
In this way, a double click would be fired off if there were two clicks before the timer period expired. A single click would be when there is no double click. I figured there might already be an FPGA circuit or similar solution to this problem. Does anyone have any input?
P.S. I considered doing a software solution, but I thought it would be better for the CPU to only have to respond to ISRs, keeping it in sleep mode longer.
You need two (different) time-windows: one to distinguish between a double-click from two clicks and another one to distinguish a long press from a click. Doing that in software is the easiest way, look at this example for a PSoC5: http://www.cypress.com/?app=forum&id=2492&rID=68603