00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __KPIC_H
00019 #define __KPIC_H
00020
00021 #include "ktypes.h"
00022
00023 #define PIC1 0x20
00024 #define PIC2 0xA0
00025 #define PIC1_COMMAND PIC1
00026 #define PIC1_DATA (PIC1+1)
00027 #define PIC2_COMMAND PIC2
00028 #define PIC2_DATA (PIC2+1)
00029 #define PIC_EOI 0x20
00030
00031 #define ICW1_ICW4 0x01
00032 #define ICW1_SINGLE 0x02
00033 #define ICW1_INTERVAL4 0x04
00034 #define ICW1_LEVEL 0x08
00035 #define ICW1_INIT 0x10
00036
00037 #define ICW4_8086 0x01
00038 #define ICW4_AUTO 0x02
00039 #define ICW4_BUF_SLAVE 0x08
00040 #define ICW4_BUF_MASTER 0x0C
00041 #define ICW4_SFNM 0x10
00042
00043
00044 #define TIMER 0x1
00045 #define KEYBOARD 0x2
00046
00047 void pic_init();
00048 void pic_enable(DB dev_code);
00049 void pic_disable(DB dev_code);
00050 #endif