MentOS  0.8.0
The Mentoring Operating System
pic8259.h
Go to the documentation of this file.
1 
9 #pragma once
10 
11 #include "stdint.h"
12 
14 #define IRQ_NUM 16
15 
19 
21 #define IRQ_TIMER 0
22 
24 #define IRQ_KEYBOARD 1
25 
28 #define IRQ_TO_SLAVE_PIC 2
29 
31 #define IRQ_COM2_4 3
32 
34 #define IRQ_COM1_3 4
35 
37 #define IRQ_LPT2 5
38 
40 #define IRQ_FLOPPY 6
41 
43 #define IRQ_LPT1 7
44 
46 #define IRQ_REAL_TIME_CLOCK 8
47 
53 #define IRQ_AVAILABLE_1 9
54 
57 #define IRQ_AVAILABLE_2 10
58 
61 #define IRQ_AVAILABLE_3 11
62 
64 #define IRQ_MOUSE 12
65 
68 #define IRQ_MATH_CPU 13
69 
72 #define IRQ_FIRST_HD 14
73 
75 #define IRQ_SECOND_HD 15
76 
78 
81 void pic8259_init_irq(void);
82 
89 
96 
100 void pic8259_send_eoi(uint32_t irq);
101 
104 //int pic8259_irq_get_current(void);
int pic8259_irq_disable(uint32_t irq)
This function, disable irqs on the pic.
Definition: pic8259.c:114
void pic8259_init_irq(void)
Function that initializes the processor pic 8259 that will manage the interruptions.
Definition: pic8259.c:56
void pic8259_send_eoi(uint32_t irq)
This is issued to the PIC chips at the end of an IRQ-based interrupt routine.
Definition: pic8259.c:134
int pic8259_irq_enable(uint32_t irq)
This function, enable irqs on the pic.
Definition: pic8259.c:89
Standard integer data-types.
unsigned int uint32_t
Define the unsigned 32-bit integer.
Definition: stdint.h:18