#include <pic.h>
Public Methods | |
void | init () |
void | signal_end_of_irq (unsigned char int_num) |
void | mask_irq (unsigned char int_num) |
void | unmask_irq (unsigned char int_num) |
Static Public Methods | |
unsigned char | int_to_irq (unsigned char irq_num) |
Protected Methods | |
unsigned char | read_register (PIC_io_base io_base, PIC_register register_num) |
void | write_register (PIC_io_base io_base, PIC_register register_num, unsigned char data) |
Protected Attributes | |
unsigned char | masks [2] |
Much of this code is borrowed from Lee Salzman's POS.
|
Remap irqs 0-7 to 0x20-0x27 and 8-15 to 0x28-0x2f, and then set default masks.
|
|
Convert an interrupt number to its original pre-remapped irq number.
|
|
Disable an individual irq (int_num is the remapped int number).
|
|
Read a value from a register on the PIC.
|
|
Irq handlers must signal to the PIC when the handler is complete. Only hardware interrupt handlers need to do this. Note that this int_num is the remapped interrupt number, not the original irq.
|
|
Enable an individual irq (int_num is the remapped int number).
|
|
Write a value to a register on the PIC.
|
|
masks showing which irqs are enabled.
|
Torsion Operating System, Copyright (C) 2000-2002 Dan Helfman