next up previous contents index
Next: 10.13.9 com_cons_getchar: wait for Up: (X86 PC) Base Environment: Previous: 10.13.7 direct_cons_trygetchar: read an

10.13.8 com_cons_init: initialize a serial port

   

SYNOPSIS

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

void com_cons_init(int port, struct termios *com_params);

DESCRIPTION

This routine must be called once to initialize a COM port for use by other com_cons routines. The supplied termios structure indicates the baud rate and other settings. If com_params is zero, a default of 9600 baud, 8 bit characters, no parity, and 1 stop bit is used.

PARAMETERS

port
COM port to initialize. Must be 1, 2, 3 or 4.
com_params
Pointer to a termios structures with the tty settings to use.

DEPENDENCIES

base_critical_enter
10.2.5
base_critical_leave
10.2.5
base_cooked_termios
10.13.3
inb
10.3.7
outb
10.3.7



University of Utah Flux Research Group