add interrupt init code (and increase rtc tick rate)

This commit is contained in:
Byron Lathi
2023-11-20 22:23:18 -08:00
parent 5e36d0824a
commit 7089b663ca
7 changed files with 244 additions and 230 deletions

View File

@@ -1,8 +1,14 @@
#include <conio.h>
#include "devices/interrupt_controller.h"
#include "interrupts/interrupt.h"
#include "devices/rtc.h"
void handle_rtc_interrupt() {
cputs("In IRQ interrupt!\n");
asm volatile ("rti");
}
int main() {
cputs("Kernel\n");
@@ -19,6 +25,8 @@ int main() {
cputs("Initialize RTC\n");
init_rtc();
register_irq(&handle_rtc_interrupt, 0);
// cputs("Initialize Serial\n");
// // init_serial();
// enable_irq(2, IRQ_EDGE);
@@ -26,4 +34,4 @@ int main() {
while(1);
return 0;
}
}