#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;
}
