mirror of
https://github.com/rvtr/ctr_firmware.git
synced 2025-10-31 07:51:08 -04:00
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@88 b871894f-2f95-9b40-918c-086798483c85
135 lines
4.4 KiB
C
135 lines
4.4 KiB
C
/*---------------------------------------------------------------------------*
|
|
Project: CtrBrom - OS - include
|
|
File: interrupt.h
|
|
|
|
Copyright 2008 Nintendo. All rights reserved.
|
|
|
|
These coded instructions, statements, and computer programs contain
|
|
proprietary information of Nintendo of America Inc. and/or Nintendo
|
|
Company Ltd., and are protected by Federal copyright law. They may
|
|
not be disclosed to third parties or copied or duplicated in any form,
|
|
in whole or in part, without the prior written consent of Nintendo.
|
|
|
|
$Date:: $
|
|
$Rev$
|
|
$Author$
|
|
*---------------------------------------------------------------------------*/
|
|
#ifndef BROM_OS_INTERRUPT_H_
|
|
#define BROM_OS_INTERRUPT_H_
|
|
|
|
#include <brom/os/common/interrupt_common.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define OS_IDR_CPU0_TARGET_ENABLE HW_IDR_CPU0_TARGET_ENABLE
|
|
#define OS_IDR_INTR_PRIO_DEFAULT 8 // Interrupt priority default (0-15)
|
|
|
|
|
|
extern OSIntrFunction osIntrTable[OS_INTR_ID_NUM];
|
|
|
|
|
|
OSIntrID i_osReadHighestPendingInterruptRegister( void );
|
|
OSIntrID i_osReadInterruptAcknowledgeRegister( void );
|
|
|
|
|
|
/*---------------------------------------------------------------------------*
|
|
Name: osInitInterrupts
|
|
|
|
Description: Initialize Interrupts
|
|
|
|
Arguments: None
|
|
|
|
Returns: None
|
|
*---------------------------------------------------------------------------*/
|
|
void osInitInterrupt( void );
|
|
|
|
/*---------------------------------------------------------------------------*
|
|
Name: osEnableInterruptID
|
|
|
|
Description: set Interrupt Set Enable Register
|
|
|
|
Arguments: Interrupt Distributor ID
|
|
|
|
Returns: TRUE if last state is pending
|
|
*---------------------------------------------------------------------------*/
|
|
BOOL osEnableInterruptID( OSIntrID id );
|
|
|
|
/*---------------------------------------------------------------------------*
|
|
Name: osDisableInterruptID
|
|
|
|
Description: set Interrupt Clear Enable Register
|
|
|
|
Arguments: Interrupt Distributor ID
|
|
|
|
Returns: TRUE if last state is pending
|
|
*---------------------------------------------------------------------------*/
|
|
BOOL osDisableInterruptID( OSIntrID id );
|
|
|
|
/*---------------------------------------------------------------------------*
|
|
Name: osRestoreInterruptID
|
|
|
|
Description: set Interrupt Clear Enable Register
|
|
|
|
Arguments: id : Interrupt Distributor ID
|
|
state : state whether interrupt is enabled
|
|
|
|
Returns: TRUE if last state is enabled
|
|
*---------------------------------------------------------------------------*/
|
|
BOOL osRestoreInterruptID( OSIntrID id, BOOL state );
|
|
|
|
/*---------------------------------------------------------------------------*
|
|
Name: osSetInterruptPending
|
|
|
|
Description: set Interrupt Set Pending Register
|
|
|
|
Arguments: Interrupt Distributor ID
|
|
|
|
Returns: TRUE if last state is pending
|
|
*---------------------------------------------------------------------------*/
|
|
BOOL osSetInterruptPending( OSIntrID id );
|
|
|
|
/*---------------------------------------------------------------------------*
|
|
Name: osClearInterruptPending
|
|
|
|
Description: set Interrupt Clear Pending Register
|
|
|
|
Arguments: Interrupt Distributor ID
|
|
|
|
Returns: TRUE if last state is pending
|
|
*---------------------------------------------------------------------------*/
|
|
BOOL osClearInterruptPending( OSIntrID id );
|
|
|
|
/*---------------------------------------------------------------------------*
|
|
Name: osRestoreInterruptPending
|
|
|
|
Description: restore Interrupt Pending
|
|
|
|
Arguments: id : Interrupt Distributor ID
|
|
state : state whether interrupt is enabled
|
|
|
|
Returns: TRUE if last state is pending
|
|
*---------------------------------------------------------------------------*/
|
|
BOOL osRestoreInterruptPending( OSIntrID id, BOOL state );
|
|
|
|
/*---------------------------------------------------------------------------*
|
|
Name: osSetEndOfInterruptRegister
|
|
|
|
Description: set ID to End of Interrupt Register
|
|
|
|
change state to Inactive.
|
|
|
|
Arguments: Interrupt Distributor ID
|
|
|
|
Returns: None
|
|
*---------------------------------------------------------------------------*/
|
|
void osSetEndOfInterruptRegister( OSIntrID id );
|
|
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#endif // BROM_OS_INTERRUPT_H_
|