Functions | |
void | hel_IntrAcknowledge (u32 InterruptType) |
Acknowledge interrupt. | |
u32 | hel_IntrGetType (void *pInterruptProc) |
Get type of a started interrupt function. | |
u32 | hel_IntrIsEnabled (u32 InterruptType) |
Check if an interrupt is enabled or disabled. | |
void | hel_IntrStartHandler (u32 InterruptType, void *pInterruptHandler) |
Start an interrupt. | |
void | hel_IntrStopAll (void) |
Stop all interrupts. | |
void | hel_IntrStopHandler (u32 InterruptType) |
Stop an interrupt. | |
void | hel_IntrUpdateHandler (u32 InterruptType, void *pInterruptHandler) |
Update interrupt handler function. |
Here is a list of all Interrupt-Types available:
INT_TYPE_VBL
: LCD Vertical Blank INT_TYPE_HBL
: LCD Horizontal Blank INT_TYPE_VCNT
: LCD V-Counter Match INT_TYPE_TIM0
: Timer 0 INT_TYPE_TIM1
: Timer 1 INT_TYPE_TIM2
: Timer 2 INT_TYPE_TIM3
: Timer 3 INT_TYPE_SIO
: Serial Communication INT_TYPE_DMA0
: DMA Channel 0 INT_TYPE_DMA1
: DMA Channel 1 INT_TYPE_DMA2
: DMA Channel 2 INT_TYPE_DMA3
: DMA Channel 3 INT_TYPE_KEY
: Keypad INT_TYPE_CART
: Game Pak void hel_IntrAcknowledge | ( | u32 | InterruptType | ) |
Acknowledge interrupt.
This function acknowledges an interrupt by writing 1<<InterruptType
value to the IF
register and also logically OR the same value to 0x3007FF8. The latter is required in order to use the BIOS Halt (Low-Power-Consumption) functions.
[in] | InterruptType | Type of interrupt to acknowledge. Please see the detailed description at the top of this document for a list with all available interrupt-types (Interrupt Functions). |
void VBLInterruptHandler(void) { hel_IntrAcknowledge(INT_TYPE_VBL); }
u32 hel_IntrGetType | ( | void * | pInterruptProc | ) |
Get type of a started interrupt function.
[in] | pInterruptProc | Pointer to interrupt function to get type from. |
0xffff
; u32 hel_IntrIsEnabled | ( | u32 | InterruptType | ) |
Check if an interrupt is enabled or disabled.
Use this function to check if the interrupt specified by InterruptType
is whether enabled or disabled.
[in] | InterruptType | Interrupt-Type you want to check. Please see the detailed description at the top of this document for a list with all available interrupt-types (Interrupt Functions). |
TRUE
when the interrupt specified by InterruptType
is enabled, otherwise it returns FALSE
. void hel_IntrStartHandler | ( | u32 | InterruptType, | |
void * | pInterruptHandler | |||
) |
Start an interrupt.
The hel_IntrStartHandler function starts the interrupt specified by InterruptType
.
[in] | InterruptType | The Interrupt-Type you want to start. Please see the detailed description at the top of this document for a list with all available interrupt-types (Interrupt Functions). |
pInterruptHandler | An Interrupt-Handler function, it is triggered when an interrupt with InterruptType occurs. |
void hel_IntrStopAll | ( | void | ) |
Stop all interrupts.
This function stops all enabled/started interrupts.
void hel_IntrStopHandler | ( | u32 | InterruptType | ) |
Stop an interrupt.
The hel_IntrStopHandler function stops the interrupt specified by InterruptType
.
[in] | InterruptType | The Interrupt-Type you want to stop. Please see the detailed description at the top of this document for a list with all available interrupt-types (Interrupt Functions). |
void hel_IntrUpdateHandler | ( | u32 | InterruptType, | |
void * | pInterruptHandler | |||
) |
Update interrupt handler function.
The hel_IntrUpdateHandler function can be used to assign a new interrupt handler for an already started interrupt. You don't need to stop and start an interrupt if you just want to replace the handler function. You can use this function instead, which is much faster because it only needs to replace an entry in the interrupt table.
[in] | InterruptType | Type of Interrupt. Please see the detailed description at the top of this document for a list with all available interrupt-types (Interrupt Functions). |
[in] | pInterruptHandler | Pointer to new interrupt handler function. |