NOVA User-Level Environment
Version testbox/changed-memory-timing-317-g320d8b5
|
A PS2 keyboard gets characters on the hostbus as input and outputs scancodes on the ps2 bus. More...
Public Member Functions | |
bool | receive (MessageInput &msg) |
bool | receive (MessagePS2 &msg) |
bool | receive (MessageLegacy &msg) |
PS2Keyboard (DBus< MessagePS2 > &bus_ps2, unsigned ps2port, unsigned hostkeyboard) | |
Public Member Functions inherited from StaticReceiver< PS2Keyboard > | |
StaticReceiver () | |
Public Member Functions inherited from Device | |
void | debug_dump () |
Device (const char *debug_name) |
Private Types | |
enum | { MODE_DISABLED = 1 << 0, MODE_RESET = 1 << 1, MODE_RESEND = 1 << 2, MODE_GOT_BREAK = 1 << 3, MODE_STOPPED = 1 << 4 } |
Private Member Functions | |
void | enqueue (unsigned char value) |
Enqueue a single scancode in the buffer. | |
void | enqueue_string (const char *value) |
Enqueue a whole set of characters. | |
void | reset () |
Reset the keyboard to its default state. | |
bool | has_shift_modifiers (unsigned char key) |
Returns whether a keycode respects a shift modifier. | |
void | handle_shift_modifiers (unsigned value) |
Enqueues corresponding shift release or press events for the shift-keys if the shift-modifier is changed for the key. |
Private Attributes | |
DBus< MessagePS2 > & | _bus_ps2 |
unsigned | _ps2port |
unsigned | _hostkeyboard |
unsigned char | _scset |
unsigned char | _buffer [BUFFERSIZE] |
unsigned | _pread |
unsigned | _pwrite |
unsigned | _response |
unsigned char | _no_breakcode [32] |
unsigned char | _indicators |
unsigned char | _last_command |
unsigned char | _last_reply |
unsigned char | _mode |
Static Private Attributes | |
static const unsigned | BUFFERSIZE = 18 |
Additional Inherited Members | |
Static Public Member Functions inherited from StaticReceiver< PS2Keyboard > | |
static bool | receive_static (Device *o, M &msg) |
A PS2 keyboard gets characters on the hostbus as input and outputs scancodes on the ps2 bus.
State: stable Features: scancodeset 1,2,3, keyboard commands, breakcode Missing: typematic keys Documentation: PS2 hitrc chapter 11
|
inline |
|
inlineprivate |
Enqueue a single scancode in the buffer.
Please note that the values are translated if SCS1 is used.
|
inlineprivate |
Enqueue a whole set of characters.
|
inlineprivate |
Enqueues corresponding shift release or press events for the shift-keys if the shift-modifier is changed for the key.
|
inlineprivate |
Returns whether a keycode respects a shift modifier.
|
inline |
|
inline |
|
inline |
|
inlineprivate |
Reset the keyboard to its default state.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |