feature: start to implement keyboard handler and better isrs/irqs
This commit is contained in:
8
src/drivers/clock.c
Normal file
8
src/drivers/clock.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "interrupts.h"
|
||||
#include "kprintf.h"
|
||||
|
||||
void clock_handler(struct registers *regs)
|
||||
{
|
||||
(void)regs;
|
||||
kprintf("test\n");
|
||||
}
|
8
src/drivers/drivers.c
Normal file
8
src/drivers/drivers.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "drivers.h"
|
||||
#include "interrupts.h"
|
||||
|
||||
void load_drivers(void)
|
||||
{
|
||||
register_interrupt_handler(1, keyboard_handler);
|
||||
register_interrupt_handler(0, clock_handler);
|
||||
}
|
10
src/drivers/keyboard.c
Normal file
10
src/drivers/keyboard.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include "interrupts.h"
|
||||
#include "kprintf.h"
|
||||
#include "terminal.h"
|
||||
#include <stdint.h>
|
||||
|
||||
void keyboard_handler(struct registers *regs)
|
||||
{
|
||||
(void)regs;
|
||||
terminal_putchar(terminal_getkey().c);
|
||||
}
|
Reference in New Issue
Block a user