diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2021-04-06 15:55:30 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2021-04-06 15:55:30 +0200 |
| commit | db553d05824ae463752c8b528feac963e41d9f1c (patch) | |
| tree | cbb203f46a83dc8f16ae9fe6809c6b681108e3e0 /src/utils/pic.h | |
| parent | 76c95cff93a8c4832d6276f2f51055bc91e17535 (diff) | |
Add Interrupt management
Diffstat (limited to 'src/utils/pic.h')
| -rw-r--r-- | src/utils/pic.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/utils/pic.h b/src/utils/pic.h new file mode 100644 index 0000000..b8f98ac --- /dev/null +++ b/src/utils/pic.h @@ -0,0 +1,22 @@ +#ifndef PIC_H +#define PIC_H + +#include "types.h" + +#define IDT_TYPE_1 0x8E00 + +typedef struct IDT_ENTRY { + u16 segment; + u32 offset; + u16 type; +} IDT_ENTRY; + +struct IDT_REGISTER { + u16 limit; + u32 base; +} __attribute__((packed)); + +void pic_enable_interrupt(); +void pic_add_idt_entry(IDT_ENTRY entry); + +#endif
\ No newline at end of file |
