Data Structures | |
struct | IRQ_REC |
Struct for prioritized irq table. More... | |
Options for irq_set | |
#define | ISR_LAST 0x0040 |
Last isr in line (Lowest priority). | |
#define | ISR_REPLACE 0x0080 |
Replace old isr if existing (prio ignored). | |
#define | ISR_PRIO_MASK 0x003F |
Last isr in line (Lowest priority). | |
#define | ISR_PRIO_SHIFT 0 |
Last isr in line (Lowest priority). | |
#define | ISR_PRIO(n) ((n)<<ISR_PRIO_SHIFT) |
Last isr in line (Lowest priority). | |
#define | ISR_DEF (ISR_LAST|ISR_REPLACE) |
Last isr in line (Lowest priority). | |
Defines | |
#define | IRQ_INIT() irq_init(NULL) |
Default irq_init() call: use irq_master_nest() for switchboard. | |
#define | IRQ_SET(irq_id) irq_set(II_##irq_id, NULL, ISR_DEF) |
Default irq_set() call: no isr, add to back of priority stack. | |
#define | IRQ_ADD(irq_id) irq_add(II_##irq_id, NULL) |
Enumerations | |
enum | eIrqIndex { II_VBLANK = 0, II_HBLANK, II_VCOUNT, II_TIMER0, II_TIMER1, II_TIMER2, II_TIMER3, II_SERIAL, II_DMA0, II_DMA1, II_DMA2, II_DMA3, II_KEYPAD, II_GAMEPAK, II_MAX } |
IRQ indices, to be used in most functions. | |
Functions | |
IWRAM_CODE void | isr_master (void) |
IWRAM_CODE void | isr_master_nest (void) |
void | irq_init (fnptr isr) |
Initialize irq business. | |
fnptr | irq_set_master (fnptr isr) |
Set a master ISR. | |
fnptr | irq_add (enum eIrqIndex irq_id, fnptr isr) |
Add a specific ISR. | |
fnptr | irq_delete (enum eIrqIndex irq_id) |
Remove an ISR. | |
fnptr | irq_set (enum eIrqIndex irq_id, fnptr isr, u32 opts) |
General IRQ manager. | |
void | irq_enable (enum eIrqIndex irq_id) |
void | irq_disable (enum eIrqIndex irq_id) |
Variables | |
IRQ_REC | __isr_table [II_MAX+1] |
For details, see tonc:irq
Add a specific ISR.
Special case of irq_set
. If the interrupt has an ISR already it'll be replaced; if not it will add it in the back.
irq_id | Index of irq. | |
isr | Interrupt service routine for this irq; can be NULL |
Remove an ISR.
it'll be replaced; if not it will add it in the back.
irq_id | Index of irq. |
void irq_init | ( | fnptr | isr | ) |
Initialize irq business.
Clears ISR table and sets up a master isr.
isr | Master ISR. If NULL, isr_master_nest is used |
General IRQ manager.
This routine manages the ISRs of interrupts and their priorities.
irq_id | Index of irq. | |
isr | Interrupt service routine for this irq; can be NULL | |
opts | ISR options |
Set a master ISR.
isr | Master ISR. If NULL, isr_master_multi is used |