next up previous contents index
Next: (X86 PC) MultiBoot Startup Up: (X86 PC) Base Environment: Previous: 10.13.11 com_cons_flush: delay until

10.13.12 com_cons_enable_receive_interrupt: enable receive interrupts on a serial port

   

SYNOPSIS

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

void com_cons_enable_receive_interrupt(int port);

DESCRIPTION

Special function to enable receive character interrupts on a serial port.

Since the base COM console operates by polling, there is no need to handle serial interrupts in order to do basic I/O. However, if you want to be notified up when a character is received, call this function immediately after com_cons_init, and make sure the appropriate IDT entry is initialized properly.

For example, the serial debugging code for the PC COM port uses this so that the program can be woken up when the user presses the interrupt character (Ĉ) from the remote debugger.

PARAMETERS

port
COM port to enable receive interrupts on. Must be 1, 2, 3 or 4.

DEPENDENCIES

inb
10.3.7



University of Utah Flux Research Group