2018-07-20 15:41:58 +02:00
|
|
|
#include "interrupt.h"
|
|
|
|
#include "io.h"
|
|
|
|
#include "irq.h"
|
|
|
|
#include "keyboard.h"
|
|
|
|
#include "pic.h"
|
2018-11-08 21:11:45 +01:00
|
|
|
#include "serial.h"
|
2018-07-20 15:41:58 +02:00
|
|
|
#include "vga.h"
|
|
|
|
|
|
|
|
// Need GCC > 6
|
|
|
|
__attribute__((interrupt)) void keyboard_handler(struct interrupt_frame *frame)
|
|
|
|
{
|
2020-04-27 00:14:37 +02:00
|
|
|
EOIIrq(IRQ_KEYBOARD);
|
|
|
|
keyboard_do_irq();
|
|
|
|
(void)frame;
|
2018-07-20 15:41:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
__attribute__((interrupt)) void timer_handler(struct interrupt_frame *frame)
|
|
|
|
{
|
2020-04-27 00:14:37 +02:00
|
|
|
static int timeCnt = 0;
|
|
|
|
EOIIrq(IRQ_TIMER);
|
|
|
|
printIntDetails(timeCnt++, RED, BLACK, 20, VGA_HEIGHT - 1);
|
|
|
|
(void)frame;
|
2018-07-20 15:41:58 +02:00
|
|
|
}
|
2018-11-08 21:11:45 +01:00
|
|
|
|
|
|
|
__attribute__((interrupt)) void serial_handler(struct interrupt_frame *frame)
|
|
|
|
{
|
2020-04-27 00:14:37 +02:00
|
|
|
EOIIrq(IRQ_COM1);
|
|
|
|
serialDoIrq(frame);
|
2018-11-08 21:11:45 +01:00
|
|
|
}
|