wut/include/coreinit/interrupts.h
GaryOderNichts 2c98cc91aa
Some checks failed
C/C++ CI / ubuntu-latest (push) Has been cancelled
Run clang-format
`find . -regex '.*\.\(cpp\|hpp\|cu\|cuh\|c\|h\)' -exec clang-format -style=file -i {} \;`
2025-06-05 11:06:04 +01:00

61 lines
1.2 KiB
C

#pragma once
#include <wut.h>
#include <coreinit/context.h>
/**
* \defgroup coreinit_interrupts Interrupt Management
* \ingroup coreinit
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef enum OSInterruptType
{
OS_INTERRUPT_TYPE_ERROR = 0,
OS_INTERRUPT_TYPE_DSP = 1,
OS_INTERRUPT_TYPE_GPU7 = 2,
OS_INTERRUPT_TYPE_GPIPPC = 3,
OS_INTERRUPT_TYPE_PRIMARYI2C = 4,
OS_INTERRUPT_TYPE_DSPAI = 5,
OS_INTERRUPT_TYPE_DSPAI2 = 6,
OS_INTERRUPT_TYPE_DSPACC = 7,
OS_INTERRUPT_TYPE_DSPDSP = 8,
OS_INTERRUPT_TYPE_IPCPPC0 = 9,
OS_INTERRUPT_TYPE_IPCPPC1 = 10,
OS_INTERRUPT_TYPE_IPCPPC2 = 11,
OS_INTERRUPT_TYPE_AHB = 12
} OSInterruptType;
typedef void (*OSUserInterruptHandler)(OSInterruptType type, OSContext *interruptedContext);
BOOL
OSEnableInterrupts();
BOOL
OSDisableInterrupts();
BOOL
OSRestoreInterrupts(BOOL enable);
BOOL
OSIsInterruptEnabled();
OSUserInterruptHandler
__OSSetInterruptHandler(OSInterruptType type,
OSUserInterruptHandler handler);
void
__OSClearAndEnableInterrupt(OSInterruptType type);
void
__OSDisableInterrupt(OSInterruptType type);
#ifdef __cplusplus
}
#endif
/** @} */