#include <pic.h>
Public Types | |
typedef unsigned | Status |
The type holding the saved Pic state. | |
enum | { MASTER_PIC_BASE = 0x20, SLAVES_PIC_BASE = 0xa0, OFF_ICW = 0x00, OFF_OCW = 0x01, MASTER_ICW = MASTER_PIC_BASE + OFF_ICW, MASTER_OCW = MASTER_PIC_BASE + OFF_OCW, SLAVES_ICW = SLAVES_PIC_BASE + OFF_ICW, SLAVES_OCW = SLAVES_PIC_BASE + OFF_OCW, ICW_TEMPLATE = 0x10, LEVL_TRIGGER = 0x08, EDGE_TRIGGER = 0x00, ADDR_INTRVL4 = 0x04, ADDR_INTRVL8 = 0x00, SINGLE__MODE = 0x02, CASCADE_MODE = 0x00, ICW4__NEEDED = 0x01, NO_ICW4_NEED = 0x00, SLAVE_ON_IR0 = 0x01, SLAVE_ON_IR1 = 0x02, SLAVE_ON_IR2 = 0x04, SLAVE_ON_IR3 = 0x08, SLAVE_ON_IR4 = 0x10, SLAVE_ON_IR5 = 0x20, SLAVE_ON_IR6 = 0x40, SLAVE_ON_IR7 = 0x80, I_AM_SLAVE_0 = 0x00, I_AM_SLAVE_1 = 0x01, I_AM_SLAVE_2 = 0x02, I_AM_SLAVE_3 = 0x03, I_AM_SLAVE_4 = 0x04, I_AM_SLAVE_5 = 0x05, I_AM_SLAVE_6 = 0x06, I_AM_SLAVE_7 = 0x07, SNF_MODE_ENA = 0x10, SNF_MODE_DIS = 0x00, BUFFERD_MODE = 0x08, NONBUFD_MODE = 0x00, AUTO_EOI_MOD = 0x02, NRML_EOI_MOD = 0x00, I8086_EMM_MOD = 0x01, SET_MCS_MODE = 0x00, PICM_MASK = 0xFF, PICS_MASK = 0xFF, NON_SPEC_EOI = 0x20, SPECIFIC_EOI = 0x60, ROT_NON_SPEC = 0xa0, SET_ROT_AEOI = 0x80, RSET_ROTAEOI = 0x00, ROT_SPEC_EOI = 0xe0, SET_PRIORITY = 0xc0, NO_OPERATION = 0x40, SND_EOI_IR0 = 0x00, SND_EOI_IR1 = 0x01, SND_EOI_IR2 = 0x02, SND_EOI_IR3 = 0x03, SND_EOI_IR4 = 0x04, SND_EOI_IR5 = 0x05, SND_EOI_IR6 = 0x06, SND_EOI_IR7 = 0x07, OCW_TEMPLATE = 0x08, SPECIAL_MASK = 0x40, MASK_MDE_SET = 0x20, MASK_MDE_RST = 0x00, POLL_COMMAND = 0x04, NO_POLL_CMND = 0x00, READ_NEXT_RD = 0x02, READ_IR_ONRD = 0x00, READ_IS_ONRD = 0x01, PICM_ICW1, PICM_ICW3 = SLAVE_ON_IR2, PICM_ICW4, PICS_ICW1, PICS_ICW3 = I_AM_SLAVE_2, PICS_ICW4 } |
Static Public Member Functions | |
static void | init () |
Static initalization of the interrupt controller. | |
static void | disable (unsigned irqnum) |
Disable the given irq. | |
static void | enable (unsigned irqnum, unsigned prio=0) |
Enable the given irq. | |
static void | acknowledge (unsigned irq) |
Acknowledge the given IRQ. | |
static void | block (unsigned irq) |
Block the given IRQ til the next ACK. | |
static void | disable_locked (unsigned irqnum) |
Disable the given irq (without lock protection). | |
static void | enable_locked (unsigned irqnum, unsigned prio=0) |
Enable the given irq (without lock protection). | |
static void | block_locked (unsigned irqnum) |
Temporarily block the IRQ til the next ACK. | |
static Status | disable_all_save () |
Disable all IRQ's and and return the old Pic state. | |
static void | restore_all (Status s) |
Restore the IRQ's to the saved state s. | |
static void | acknowledge_locked (unsigned irq) |
Acknowledge the given IRQ. | |
Static Public Attributes | |
static int | special_fully_nested_mode = 1 |
Static Private Member Functions | |
static FIASCO_INIT void | pic_init (unsigned char master_base, unsigned char slave_base) |
|
The type holding the saved Pic state.
|
|
|
Acknowledge the given IRQ.
|
|
Acknowledge the given IRQ.
|
|
Block the given IRQ til the next ACK.
|
|
Temporarily block the IRQ til the next ACK.
|
|
Disable the given irq.
|
|
Disable all IRQ's and and return the old Pic state.
|
|
Disable the given irq (without lock protection).
|
|
Enable the given irq.
|
|
Enable the given irq (without lock protection).
|
|
Static initalization of the interrupt controller.
|
|
|
|
Restore the IRQ's to the saved state s.
|
|
|