mirror of
https://github.com/afska/gba-link-connection.git
synced 2026-03-22 01:54:16 -05:00
28 lines
615 B
C++
28 lines
615 B
C++
#include "interrupt.h"
|
|
#include <ugba/ugba.h>
|
|
|
|
void interrupt_init(void) {
|
|
IRQ_Init();
|
|
}
|
|
|
|
void interrupt_add(interrupt_index index, interrupt_vector function) {
|
|
interrupt_set_handler(index, function);
|
|
interrupt_enable(index);
|
|
}
|
|
|
|
void interrupt_set_handler(interrupt_index index, interrupt_vector function) {
|
|
IRQ_SetHandler((irq_index)index, function);
|
|
}
|
|
|
|
void interrupt_enable(interrupt_index index) {
|
|
IRQ_Enable((irq_index)index);
|
|
}
|
|
|
|
void interrupt_disable(interrupt_index index) {
|
|
IRQ_Disable((irq_index)index);
|
|
}
|
|
|
|
void interrupt_set_reference_vcount(unsigned long y) {
|
|
IRQ_SetReferenceVCOUNT(y);
|
|
}
|