Fixed a bug in the interrupt handler in part13 to avoid an infinite loop

This commit is contained in:
babbleberry 2024-02-06 11:56:03 +00:00
parent 753489b857
commit 3faf8d10ff

View file

@ -11,7 +11,7 @@ void disable_interrupt_controller() {
void handle_irq() { void handle_irq() {
unsigned int irq = REGS_IRQ->irq0_pending_0; unsigned int irq = REGS_IRQ->irq0_pending_0;
while(irq) { while(irq & (SYS_TIMER_IRQ_1 | SYS_TIMER_IRQ_3)) {
if (irq & SYS_TIMER_IRQ_1) { if (irq & SYS_TIMER_IRQ_1) {
irq &= ~SYS_TIMER_IRQ_1; irq &= ~SYS_TIMER_IRQ_1;