PAlib: Référence du fichier PA_Interrupt.h

Page principale | Modules | Liste des fichiers | Portée globale | Rechercher

# Référence du fichier PA_Interrupt.h

Interrupt system. Plus de détails...

Aller au code source de ce fichier.

## Macros

#define | REG_IME *(u32*)0x04000208
#define | REG_IE *(u32*)0x04000210
#define | REG_IF *(u32*)0x04000214
#define | REG_INTERRUPT IRQ_HANDLER
#define | REG_DISPSTAT DISP_SR
#define | REG_VCOUNT _REG16(0x04000006)
#define | INTVBLANK 0x0001
#define | INTHBLANK 0x0002
#define | INTVCOUNT 0x0004
#define | INTTIMER0 0x0008
#define | INTTIMER1 0x0010
#define | INTTIMER2 0x0020
#define | INTTIMER3 0x0040
#define | INTCOM 0x0080
#define | INTDMA0 0x0100
#define | INTDMA1 0x0200
#define | INTDMA2 0x0400
#define | INTDMA3 0x0800
#define | INTBUTTON 0x1000
#define | INTCART 0x2000
#define | INT_VBLANK 0
#define | INT_HBLANK 1
#define | INT_VCOUNT 2
#define | INT_TIMER0 3
#define | INT_TIMER1 4
#define | INT_TIMER2 5
#define | INT_TIMER3 6
#define | INT_COM 7
#define | INT_DMA0 8
#define | INT_DMA1 9
#define | INT_DMA2 10
#define | INT_DMA3 11
#define | INT_KEY 12
#define | INT_CART 13
#define | ENABLE_VBLANK 8
#define | ENABLE_HBLANK 16
#define | ENABLE_VCOUNT 32
#define | TIMER0COUNT *(volatile u16 *)(0x04000100)
#define | TIMER0CNT *(volatile u16 *)(0x04000102)
#define | TIMER0CNT_TIMER_START (TIMER0CNT |= 0x0080)
#define | TIMER0CNT_IRQ_ENABLE (TIMER0CNT |= 0x0040)
#define | PA_EnableTimer0() {TIMER0CNT_TIMER_START; TIMER0CNT_IRQ_ENABLE;}
#define | TIMER0CNT_TIMER_STOP (TIMER0CNT &= 0xFF7F)
#define | TIMER0CNT_IRQ_DISABLE (TIMER0CNT &= 0xFFBF)
#define | PA_DisableTimer0() {TIMER0CNT_TIMER_STOP; TIMER0CNT_IRQ_DISABLE;}
#define | TIMER1COUNT *(volatile u16 *)(0x04000104)
#define | TIMER1CNT *(volatile u16 *)(0x04000106)
#define | TIMER1CNT_TIMER_START (TIMER1CNT |= 0x0080)
#define | TIMER1CNT_IRQ_ENABLE (TIMER1CNT |= 0x0040)
#define | PA_EnableTimer1() {TIMER1CNT_TIMER_START; TIMER1CNT_IRQ_ENABLE;}
#define | TIMER1CNT_TIMER_STOP (TIMER1CNT &= 0xFF7F)
#define | TIMER1CNT_IRQ_DISABLE (TIMER1CNT &= 0xFFBF)
#define | PA_DisableTimer1() {TIMER1CNT_TIMER_STOP; TIMER1CNT_IRQ_DISABLE;}
#define | TIMER2COUNT *(volatile u16 *)(0x04000108)
#define | TIMER2CNT *(volatile u16 *)(0x0400010A)
#define | TIMER2CNT_TIMER_START (TIMER2CNT |= 0x0080)
#define | TIMER2CNT_IRQ_ENABLE (TIMER2CNT |= 0x0040)
#define | PA_EnableTimer2() {TIMER2CNT_TIMER_START; TIMER2CNT_IRQ_ENABLE;}
#define | TIMER2CNT_TIMER_STOP (TIMER2CNT &= 0xFF7F)
#define | TIMER2CNT_IRQ_DISABLE (TIMER2CNT &= 0xFFBF)
#define | PA_DisableTimer2() {TIMER2CNT_TIMER_STOP; TIMER2CNT_IRQ_DISABLE;}
#define | TIMER3COUNT *(volatile u16 *)(0x0400010C)
#define | TIMER3CNT *(volatile u16 *)(0x0400010E)
#define | TIMER3CNT_TIMER_START (TIMER3CNT |= 0x0080)
#define | TIMER3CNT_IRQ_ENABLE (TIMER3CNT |= 0x0040)
#define | PA_EnableTimer3() {TIMER3CNT_TIMER_START; TIMER3CNT_IRQ_ENABLE;}
#define | TIMER3CNT_TIMER_STOP (TIMER3CNT &= 0xFF7F)
#define | TIMER3CNT_IRQ_DISABLE (TIMER3CNT &= 0xFFBF)
#define | PA_DisableTimer3() {TIMER3CNT_TIMER_STOP; TIMER3CNT_IRQ_DISABLE;}
#define | PA_InitVBL() PA_StartInt(INT_VBLANK, PA_vblFunc)

Initialise une fonction VBL basique. Très pratique pour l'utilisateur non averti, car met à jour l'OAM (les sprites), les touches, et le stylet... On n'a donc plus besoin d'utiliser PA_UpdateOAM, PA_UpdatePad, PA_UpdateStylus, et PA_UpdateRTC dans ce cas !

#define | PA_GetVcount() (REG_VCOUNT&511)
| Récupérer le numéro de ligne tracée

## Typedefs

typedef void(* | funcpointer )(void)

## Fonctions

void | interruptfunction (void)
void | PA_ResetInterrupts (void)
| Remise à 0 du système d'interruption. Désactive toutes les interruptions
void | PA_StartInt (u8 inter, funcpointer interfunc)
| Initialise une interruption donnée
void | PA_StopInt (u8 inter)
| Initialise une interruption donnée
void | PA_vblFunc (void)
| Fonction standard du VBL PAlib... Ceci met à jour le pad, le stylet, le RTC... Utilisez cette fonction si vous faites votre propre VBL...

## Variables

volatile bool | PA_Newframe
volatile bool | PA_vblok
u32 | PA_CPU
u32 | PA_MaxCPU
u32 | PA_lines
u8 | PA_VBLCount
u8 | PA_nVBLs
funcpointer | interruptfunc [14]

## Description détaillée

Interrupt system.

Current working interrupts are VBlank, HBlank, VCount, and Timers