PKUOS - Pintos
Pintos source browser for PKU Operating System course
|
Go to the source code of this file.
Functions | |
void | input_init (void) |
Initializes the input buffer. More... | |
void | input_putc (uint8_t) |
Adds a key to the input buffer. More... | |
uint8_t | input_getc (void) |
Retrieves a key from the input buffer. More... | |
bool | input_full (void) |
devices/input.h More... | |
bool input_full | ( | void | ) |
Interrupts must be off.
Definition at line 48 of file input.c.
References ASSERT, buffer, intq_full(), intr_get_level(), and INTR_OFF.
Referenced by keyboard_interrupt(), serial_interrupt(), and write_ier().
uint8_t input_getc | ( | void | ) |
Retrieves a key from the input buffer.
If the buffer is empty, waits for a key to be pressed.
Definition at line 31 of file input.c.
References buffer, intq_getc(), intr_disable(), intr_set_level(), and serial_notify().
void input_init | ( | void | ) |
Initializes the input buffer.
Definition at line 11 of file input.c.
References buffer, and intq_init().
Referenced by pintos_init().
void input_putc | ( | uint8_t | key | ) |
Adds a key to the input buffer.
Interrupts must be off and the buffer must not be full.
Definition at line 19 of file input.c.
References ASSERT, buffer, intq_full(), intq_putc(), intr_get_level(), INTR_OFF, and serial_notify().
Referenced by keyboard_interrupt(), and serial_interrupt().