#include "typedefs.h"
#include "sys.h"
#include "thread.h"
#include "mutex.h"
#include "condvar.h"
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | kbd_buffer_t |
Defines | |
#define | KEYBOARD_PHYSICAL_ADDRESS 0x01000008 |
#define | KEYBOARD_ADDRESS (KEYBOARD_PHYSICAL_ADDRESS | OM_KSEG1) |
#define | KEYBOARD_BUFFER_SIZE 80 |
#define | def_getc() *((volatile char *) KEYBOARD_ADDRESS) |
Functions | |
void | kbd_buffer_init () |
Initializes the keyboard buffer. | |
int | kbd_buffer_empty () |
Keyboard buffer state. | |
int | kbd_buffer_count () |
Count of characters in buffer. | |
int | kbd_buffer_putc (char ch) |
push one key (character) into the keyboard buffer | |
int | kbd_buffer_getc (char *ch) |
pop one key (character) from the keyboard buffer | |
void | init_keyboard () |
Keyboard buffer initialization. | |
Variables | |
mutex_t | keyboard_mtx |
cond_t | keyboard_cnd |
#define def_getc | ( | ) | *((volatile char *) KEYBOARD_ADDRESS) |
Reads a character directly from the keyboard register.
#define KEYBOARD_ADDRESS (KEYBOARD_PHYSICAL_ADDRESS | OM_KSEG1) |
Tanslate keyboard physical address
#define KEYBOARD_BUFFER_SIZE 80 |
Size of keyboard buffer
#define KEYBOARD_PHYSICAL_ADDRESS 0x01000008 |
Defines keyboard physical address
int kbd_buffer_count | ( | ) |
Count of characters in buffer.
int kbd_buffer_empty | ( | ) |
Keyboard buffer state.
int kbd_buffer_getc | ( | char * | ch | ) |
pop one key (character) from the keyboard buffer
ch | - fetched character |
int kbd_buffer_putc | ( | char | ch | ) |
push one key (character) into the keyboard buffer
ch | - character to store |
keyboard pool
keyboard lock