Hi all I'm working on a small embedded project which runs under a simple RTOS. The Hardware includes a scanned keyboard, LCD display, and various motors & switches etc.
The User Interface requirements call for various commands and navigation within the menu system to be selected by means of combinations of keys, and/or keys being pressed for a longer period of time. Something like "press cancel key to cancel last entry; hold cancel key for 2 seconds to revert to start" - that kind of thing.
I'm familiar with scanning a keyboard and generating keycodes etc., but in an RTOS envirinment with a dedicated keyboard task I'm not sure of the best way to proceed with this. I could make available the keycode + time of pressing/time of releasing', and make the other task work out the delay time, but this doesn't feel very efficient. Can anyone suggest other ways of doing this, or point me towards some prior art?
Thanks for any suggestions.
Regards J^n