PKUOS - Pintos
Pintos source browser for PKU Operating System course
|
#include <stdint.h>
Go to the source code of this file.
Functions | |
void | serial_init_queue (void) |
Initializes the serial port device for queued interrupt-driven I/O. More... | |
void | serial_putc (uint8_t) |
Sends BYTE to the serial port. More... | |
void | serial_flush (void) |
Flushes anything in the serial buffer out the port in polling mode. More... | |
void | serial_notify (void) |
devices/serial.h More... | |
void serial_flush | ( | void | ) |
Flushes anything in the serial buffer out the port in polling mode.
Definition at line 135 of file serial.c.
References intq_empty(), intq_getc(), intr_disable(), intr_set_level(), putc_poll(), and txq.
Referenced by debug_panic(), and shutdown_power_off().
void serial_init_queue | ( | void | ) |
Initializes the serial port device for queued interrupt-driven I/O.
With interrupt-driven I/O we don't waste CPU time waiting for the serial device to become ready.
Definition at line 82 of file serial.c.
References ASSERT, init_poll(), intr_disable(), intr_register_ext(), intr_set_level(), mode, POLL, QUEUE, serial_interrupt, UNINIT, and write_ier().
Referenced by pintos_init().
void serial_notify | ( | void | ) |
Reassess whether we should block receive interrupts. Called by the input buffer routines when characters are added to or removed from the buffer.
Definition at line 148 of file serial.c.
References ASSERT, intr_get_level(), INTR_OFF, mode, QUEUE, and write_ier().
Referenced by input_getc(), and input_putc().
void serial_putc | ( | uint8_t | byte | ) |
Sends BYTE to the serial port.
Definition at line 99 of file serial.c.
References init_poll(), intq_full(), intq_getc(), intq_putc(), intr_disable(), INTR_OFF, intr_set_level(), mode, putc_poll(), QUEUE, txq, UNINIT, and write_ier().
Referenced by putchar_have_lock().