mirror of
https://github.com/gbowne1/ClassicOS.git
synced 2026-02-15 14:55:20 -08:00
Create pic.h
This commit is contained in:
25
kernel/pic.h
Normal file
25
kernel/pic.h
Normal 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
|
||||||
Reference in New Issue
Block a user