next up previous contents index
Next: 13.13.10 com_cons_putchar: write a Up: (X86 PC) Base Environment: Previous: 13.13.8 com_cons_init: initialize a

13.13.9 com_cons_getchar: wait for and read a character from a serial port

   

SYNOPSIS

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

int com_cons_getchar(int port);

DESCRIPTION

Read a character from the indicated serial port. If none is available, this routine loops polling the status register until a character is available.

PARAMETERS

port
COM port to read from. Must be 1, 2, 3 or 4.

RETURNS

Returns the character read.

DEPENDENCIES

base_critical_enter
13.2.5
base_critical_leave
13.2.5
inb
13.3.7



Utah Flux Research Group