CE process watching WIP
This commit is contained in:
10
libkb/kb.c
10
libkb/kb.c
@@ -13,3 +13,13 @@ int kb_read_key (void) {
|
||||
else
|
||||
return r;
|
||||
}
|
||||
|
||||
int kb_read_key_nonblock (void) {
|
||||
char ch = 0;
|
||||
int r = device_do ("kb", KB_READ_KEY_NONBLOCK, &ch, NULL, NULL, NULL);
|
||||
|
||||
if (r == ST_OK)
|
||||
return (int)ch;
|
||||
else
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
#include <kb_defs.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* \brief Read key from keyboard
|
||||
* \return < 0 status on failure; ascii key on success
|
||||
*/
|
||||
int kb_read_key (void);
|
||||
|
||||
int kb_read_key_nonblock (void);
|
||||
|
||||
#endif // _LIBKB_KB_H
|
||||
|
||||
Reference in New Issue
Block a user