summaryrefslogtreecommitdiffstats
path: root/arch/x86/ic/IPic.h
diff options
context:
space:
mode:
authorAlexey Gavrilov <90127298+rebovas@users.noreply.github.com>2024-05-24 14:33:19 +0700
committerGitHub <noreply@github.com>2024-05-24 14:33:19 +0700
commitdc0b89fa63a181bd4add318bfd7a46344702f4e7 (patch)
tree48e25b199ae3459e12c7202f7b18a37cd087bf9b /arch/x86/ic/IPic.h
parent0a50b1758fd3da118408fd724825d0a50a9ecf17 (diff)
parent5fbf41e967ed8e413ecf1e6abb72e8d285169df4 (diff)
Merge pull request #9 from rebovas/interrupts_picHEADmain
Pic + Tuple + refactor PrimaryInitialization class
Diffstat (limited to 'arch/x86/ic/IPic.h')
-rw-r--r--arch/x86/ic/IPic.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/x86/ic/IPic.h b/arch/x86/ic/IPic.h
new file mode 100644
index 0000000..9bb1b4f
--- /dev/null
+++ b/arch/x86/ic/IPic.h
@@ -0,0 +1,40 @@
+#ifndef IPIC_H
+#define IPIC_H
+
+#include <types.h>
+
+
+// Defines
+// ICW1
+
+#define IC4 1
+#define SNGL 2
+#define ADI 4
+#define LTIM 8
+
+// ICW4
+
+#define PM 1
+#define AEOI 2
+#define MSBUF 4
+#define BUF 8
+#define SFNM 16
+
+// PIC
+
+#define PICM_CTRL 0x20
+#define PICM_DATA 0x21
+#define PICS_CTRL 0xA0
+#define PICS_DATA 0xA1
+
+//-------------
+
+class ICW
+{
+ public:
+ virtual const uint8 toByteMasterPic() const = 0;
+ virtual const uint8 toByteSlavePic() const = 0;
+ virtual const uint8 getNumber() const = 0;
+};
+
+#endif