Create pic.h

This commit is contained in:
2026-01-28 10:40:41 -08:00
committed by GitHub
parent f572101d6b
commit e376526426

25
kernel/pic.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef PIC_H
#define PIC_H
#include <stdint.h>
/* I/O Ports for the PICs */
#define PIC1_COMMAND 0x20
#define PIC1_DATA 0x21
#define PIC2_COMMAND 0xA0
#define PIC2_DATA 0xA1
/* PIC Commands */
#define PIC_EOI 0x20 /* End of Interrupt */
/* Offset vectors for remapping */
#define PIC1_OFFSET 0x20
#define PIC2_OFFSET 0x28
void pic_init(void);
void pic_send_eoi(uint8_t irq);
void pic_mask(uint8_t irq);
void pic_unmask(uint8_t irq);
void pic_disable(void);
#endif