kbhit() function (uses termios)
gds at chartertn.net
Fri Sep 5 17:44:42 UTC 2008
The code I am trying to port to rtems uses kbhit() function (you hit a
key with no echo and no ENTER/RETURN) to cause an action based on the
key pressed. Although I am not a big fan of having important things
happen based on an unconfirmed key press, it does not seem to work for
me in rtems. kbhit always returns 0 even after I press a key.
The 3rd party code is copied from here:
but with the addition of a flag to turn off echo:
term.c_lflag &= ~ECHO;
Is there a reason this might not work in rtems? It works ok in linux.
More information about the users