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

10.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
10.2.5
base_critical_leave
10.2.5
inb
10.3.7



University of Utah Flux Research Group