aboutsummaryrefslogtreecommitdiff
path: root/src/int/pic.h
blob: db1cceca0b8d0679d97978a8ee3ba24b0f5f365f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef PIC_H
#define PIC_H

#include "utils/types.h"

#define IDT_INT_GATE 0x8E00
#define IDT_TRAP_GATE 0xEF00

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,int id);

#endif