Files
mop3/libkb/kb.c
2026-03-18 15:30:41 +01:00

26 lines
449 B
C

#include <devices.h>
#include <kb.h>
#include <status.h>
#include <stdint.h>
#include <system.h>
int kb_read_key (void) {
char ch = 0;
int r = device_do ("kb", KB_READ_KEY, &ch, NULL, NULL, NULL);
if (r == ST_OK)
return (int)ch;
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;
}