next up previous contents index
Next: 10.13.6 direct_cons_putchar: write a Up: (X86 PC) Base Environment: Previous: 10.13.4 base_raw_termios: Default termios

10.13.5 direct_cons_getchar: wait for and read a character from the keyboard

   

SYNOPSIS

#include <oskit/x86/pc/direct_console.h>

int direct_cons_getchar(void);

DESCRIPTION

Read a character from the PC keyboard. If none is available, this routine loops polling the keyboard status register until a character is available.

Supports only a subset of the available key presses. In particular, only the shifted and unshifted printable ASCII characters along with Escape, Backspace, Tab, and Carriage return. It does not support the remaining control characters or multi-character (function) keys.

RETURNS

Returns the character read.

DEPENDENCIES

base_critical_enter
10.2.5
base_critical_leave
10.2.5
inb
10.3.7



University of Utah Flux Research Group