diff options
author | Marvin Borner | 2019-09-21 18:07:07 +0200 |
---|---|---|
committer | Marvin Borner | 2019-09-21 18:07:07 +0200 |
commit | c31d465a62fbc0ec3194838db4745585471c1050 (patch) | |
tree | 10e544bc856ea1898e39d6c9304f746aa1d74670 /src/kernel/input/ps2 | |
parent | d91024fb750356bad65cce5bdef206e530b37c53 (diff) |
Added ACPI based shutdown command
Diffstat (limited to 'src/kernel/input/ps2')
-rw-r--r-- | src/kernel/input/ps2/keyboard.c | 2 | ||||
-rw-r--r-- | src/kernel/input/ps2/mouse.c | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/kernel/input/ps2/keyboard.c b/src/kernel/input/ps2/keyboard.c index ae17675..c40f1f5 100644 --- a/src/kernel/input/ps2/keyboard.c +++ b/src/kernel/input/ps2/keyboard.c @@ -35,7 +35,7 @@ unsigned char keymap[128] = { void keyboard_handler(struct regs *r) { unsigned char scan_code; - scan_code = receive(0x60); + scan_code = receive_b(0x60); if (scan_code & 0x80) { // Release diff --git a/src/kernel/input/ps2/mouse.c b/src/kernel/input/ps2/mouse.c index 49c5a6c..54d8a3c 100644 --- a/src/kernel/input/ps2/mouse.c +++ b/src/kernel/input/ps2/mouse.c @@ -12,15 +12,15 @@ int mm_n[3] = {0, 0, 0,}; void mouse_handler(struct regs *a_r) { switch (mouse_cycle) { case 0: - mouse_byte[0] = receive(0x60); + mouse_byte[0] = receive_b(0x60); mouse_cycle++; break; case 1: - mouse_byte[1] = receive(0x60); + mouse_byte[1] = receive_b(0x60); mouse_cycle++; break; case 2: - mouse_byte[2] = receive(0x60); + mouse_byte[2] = receive_b(0x60); mouse_x = mouse_byte[1]; mouse_y = mouse_byte[2]; mouse_but_1 = (mouse_byte[0] % 2); @@ -42,14 +42,14 @@ inline void mouse_wait(char a_type) { unsigned int _time_out = 100000; if (a_type == 0) { while (_time_out--) { - if ((receive(0x64) & 1) == 1) { + if ((receive_b(0x64) & 1) == 1) { return; } } return; } else { while (_time_out--) { - if ((receive(0x64) & 2) == 0) { + if ((receive_b(0x64) & 2) == 0) { return; } } @@ -59,14 +59,14 @@ inline void mouse_wait(char a_type) { inline void mouse_write(char a_write) { mouse_wait(1); - send(0x64, 0xD4); + send_b(0x64, 0xD4); mouse_wait(1); - send(0x60, a_write); + send_b(0x60, a_write); } char mouse_read() { mouse_wait(0); - return receive(0x60); + return receive_b(0x60); } void mouse_install() { @@ -74,17 +74,17 @@ void mouse_install() { // Enable auxiliary mouse device mouse_wait(1); - send(0x64, 0xA8); + send_b(0x64, 0xA8); // Enable interrupts mouse_wait(1); - send(0x64, 0x20); + send_b(0x64, 0x20); mouse_wait(0); - _status = (receive(0x60) | 2); + _status = (receive_b(0x60) | 2); mouse_wait(1); - send(0x64, 0x60); + send_b(0x64, 0x60); mouse_wait(1); - send(0x60, _status); + send_b(0x60, _status); // Use default settings mouse_write(0xF6); |