Seperate PS/2 keyboard and mouse driver

This commit is contained in:
Jeremy Soller 2016-09-19 09:43:30 -06:00
parent 70a2faa0c7
commit 727647dbf1
6 changed files with 49 additions and 44 deletions

View file

@ -4,6 +4,7 @@ use x86::io;
use device::ps2::{PS2_KEYBOARD, PS2_MOUSE};
use device::serial::{COM1, COM2};
pub static ACKS: Mutex<[usize; 16]> = Mutex::new([0; 16]);
pub static COUNTS: Mutex<[usize; 16]> = Mutex::new([0; 16]);
#[inline(always)]
@ -88,10 +89,6 @@ interrupt!(pci3, {
interrupt!(mouse, {
COUNTS.lock()[12] += 1;
if let Some(ref mut mouse) = *PS2_MOUSE.lock() {
mouse.on_irq();
}
slave_ack();
});
interrupt!(fpu, {