pic.h (998B)
1 #ifndef _PIC_H_ 2 #define _PIC_H_ 3 4 #include <u.h> 5 6 #define PIC_MASTER_CMD 0x20 7 #define PIC_MASTER_DATA (PIC_MASTER_CMD + 1) 8 #define PIC_MASTER_OFFT 0x20 9 #define PIC_SLAVE_CMD 0xa0 10 #define PIC_SLAVE_DATA (PIC_SLAVE_CMD + 1) 11 #define PIC_SLAVE_OFFT (PIC_MASTER_OFFT + 8) 12 13 #define PIC_SET_MASK 0 14 #define PIC_CLEAR_MASK 1 15 #define PIC_EOI 0x20 /* End of interrupt */ 16 17 #define ICW1_ICW4 0x01 /* ICW4 not needed */ 18 #define ICW1_SINGLE 0x02 /* Single cascade mode */ 19 #define ICW1_INTVAL4 0x04 /* Call address interval 4 (8) */ 20 #define ICW1_LEVEL 0x08 /* Level triggered mode */ 21 #define ICW1_INIT 0x10 /* Initialization */ 22 #define ICW4_8086 0x01 /* 8086/88 (MCS-80/85) mode */ 23 #define ICW4_AUTO 0x02 /* Auto EOI */ 24 #define ICW4_BUF_SLAVE 0x08 /* Buffered slave */ 25 #define ICW4_BUF_MASTER 0x0c /* Buffered master */ 26 #define ICW4_SFNM 0x10 /* Special fully nested */ 27 28 void pic_remap(void); 29 void pic_eoi(u_int32_t); 30 void pic_mask(u_int8_t, int); 31 void pic_on(void); 32 void pic_off(void); 33 34 #endif /* _PIC_H_ */