blob: de11f3fb48b6b1778c43ea82fed4948abd3962b7 [file] [log] [blame]
swissChili9b3584b2021-02-18 13:57:27 -08001#pragma once
2
3#include "kint.h"
4#include "registers.h"
5
6#define PIC1 0x20
7#define PIC2 0xa0
8#define PIC1_COMMAND PIC1
9#define PIC1_DATA (PIC1 + 1)
10#define PIC2_COMMAND PIC2
11#define PIC2_DATA (PIC2 + 1)
12
13#define PIC_EOI 0x20 // End of input
14
swissChilidefeb0d2021-02-18 15:28:36 -080015#define IRQ_TO_INT(irq) ((irq) + 32)
16
swissChili9b3584b2021-02-18 13:57:27 -080017void pic_send_eoi(uchar interrupt);
swissChili825d46b2021-02-21 10:14:16 -080018void add_interrupt_handler(uchar interrupt, void (*handler)(struct registers *));
swissChilidefeb0d2021-02-18 15:28:36 -080019
20void pic_remap();