diff options
Diffstat (limited to 'devices/pic_8259.c')
-rw-r--r-- | devices/pic_8259.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/devices/pic_8259.c b/devices/pic_8259.c index 74c576a..62164d3 100644 --- a/devices/pic_8259.c +++ b/devices/pic_8259.c @@ -1,4 +1,5 @@ #include "pic.h" +#include <sys/control.h> #include <sys/io.h> #define PIC1 0x20 @@ -28,8 +29,18 @@ pic_init() outb(ICW4_8086, PIC2 + DATA); // PIC masks + outb(0xff, PIC1 + DATA); + outb(0xff, PIC2 + DATA); +} + +void +pic_enable() +{ + // PIC masks outb(0xfc, PIC1 + DATA); outb(0xff, PIC2 + DATA); + + enable_interrupts(); } void |