xref: /reactos/subsystems/mvdm/ntvdm/hardware/pic.h (revision 8a978a17)
1 /*
2  * COPYRIGHT:       GPL - See COPYING in the top level directory
3  * PROJECT:         ReactOS Virtual DOS Machine
4  * FILE:            subsystems/mvdm/ntvdm/hardware/pic.h
5  * PURPOSE:         Programmable Interrupt Controller emulation
6  *                  (Interrupt Controller Adapter (ICA) in Windows terminology)
7  * PROGRAMMERS:     Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
8  */
9 
10 #ifndef _PIC_H_
11 #define _PIC_H_
12 
13 /* DEFINES ********************************************************************/
14 
15 #define PIC_MASTER_CMD  0x20
16 #define PIC_MASTER_DATA 0x21
17 #define PIC_SLAVE_CMD   0xA0
18 #define PIC_SLAVE_DATA  0xA1
19 
20 #define PIC_ICW1        0x10
21 #define PIC_ICW1_ICW4   (1 << 0)
22 #define PIC_ICW1_SINGLE (1 << 1)
23 #define PIC_ICW4_8086   (1 << 0)
24 #define PIC_ICW4_AEOI   (1 << 1)
25 
26 #define PIC_OCW2_NUM_MASK   0x07
27 #define PIC_OCW2_EOI        (1 << 5)
28 #define PIC_OCW2_SL         (1 << 6)
29 
30 #define PIC_OCW3            (1 << 3)
31 #define PIC_OCW3_READ_ISR   0x0B
32 
33 /* FUNCTIONS ******************************************************************/
34 
35 VOID PicInterruptRequest(BYTE Number);
36 BYTE PicGetInterrupt(VOID);
37 
38 VOID PicInitialize(VOID);
39 
40 #endif /* _PIC_H_ */
41