kbd: use generic event synchronization
At the moment kbd_get() is a blocking function that spins without
releasing the CPU until a key is pressed.
Without a voluntary preemption hook the cooperative kernel resuls
completely stuck when kbd_get() is called and no key is pressed.
This basically makes kbd_get() useless in the most part of the cases.
Change this behaviour making kbd_get() a sleepable function and use the
generic events infrastructure to notify the occurrence of key-pressed
events to the sleeping processes.
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4742
38d2e660-2303-0410-9eaa-
f027e97ec537