Skip to content

Commit

Permalink
HANDLE mouse ps2
Browse files Browse the repository at this point in the history
  • Loading branch information
avan-pra committed Dec 13, 2023
1 parent 32362ca commit d0dd426
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/idt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use core::mem::size_of;
use core::ffi::c_void;

use crate::{print, println};
use crate::io::outb;
use crate::io::{outb, inb};
use crate::keyboard::handle_keypress;

const IDT_ENTRY_AMOUT: usize = 256;
Expand Down Expand Up @@ -236,11 +236,13 @@ extern "C" fn exception_handler(reg: Regs) {

#[no_mangle]
extern "C" fn irq_handler(reg: Regs) {
if reg.int_no == 1 {
handle_keypress();
match reg.int_no {
1 => { handle_keypress(); }
12 => { inb(0x60); }
_ => { }
}

if reg.int_no >= 40 {
if reg.int_no >= 8 {
outb(0xA0, 0x20);
}
outb(0x20, 0x20);
Expand Down

0 comments on commit d0dd426

Please sign in to comment.