NOVA User-Level Environment
Version testbox/changed-memory-timing-317-g320d8b5
|
A PS/2 host keyboard and mouse driver. More...
Public Member Functions | |
bool | receive (MessageIrq &msg) |
bool | receive (MessageLegacy &msg) |
HostKeyboard (DBus< MessageHwIOIn > &bus_hwioin, DBus< MessageHwIOOut > &bus_hwioout, DBus< MessageInput > &bus_input, Clock *clock, unsigned hostdev, unsigned short base, unsigned irq, unsigned irqaux, unsigned char scset, bool verbose) | |
Public Member Functions inherited from StaticReceiver< HostKeyboard > | |
StaticReceiver () | |
Public Member Functions inherited from Device | |
void | debug_dump () |
Device (const char *debug_name) |
Private Member Functions | |
bool | wait_status (unsigned char mask, unsigned char value) |
bool | wait_output_full () |
bool | wait_input_empty () |
bool | disable_devices () |
bool | enable_devices () |
bool | read_cmd (unsigned char cmd, unsigned char &value) |
bool | write_cmd (unsigned char cmd, unsigned char value) |
bool | wait_ack () |
bool | write_keyboard_ack (unsigned char value) |
bool | write_mouse_ack (unsigned char value) |
void | handle_aux (unsigned char data) |
void | handle_scancode (unsigned char key) |
Handle a scancode send from the keyboard. |
Private Attributes | |
DBus< MessageInput > & | _bus_input |
Clock * | _clock |
unsigned | _hostdev |
unsigned short | _base |
unsigned | _irq |
unsigned | _irqaux |
unsigned | _flags |
unsigned | _mousestate |
bool | _scset1 |
bool | _verbose |
Static Private Attributes | |
static unsigned const | FREQ = 1000 |
static unsigned const | TIMEOUT = 50 |
Additional Inherited Members | |
Static Public Member Functions inherited from StaticReceiver< HostKeyboard > | |
static bool | receive_static (Device *o, M &msg) |
A PS/2 host keyboard and mouse driver.
Translates SCS2 keycodes to single extended keycode and mouse movements to mouse packets. Both are forwarded on the keycode bus.
State: stable Features: scancode set1+2, simple PS2 mouse Missing: z-axis Documentation: PS2 hitrc chapter 7+11, scancodes-13.html
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Handle a scancode send from the keyboard.
There are some bad BIOSes around which do not emulate SC2. We have to convert from SC1.
We have a small state machine here, as the keyboard runs with scancode set 2. SCS3 would be much nicer but is not available everywhere.
|
inlineprivate |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |